ebook img

Array-Based Half-Facet Data Structure for Mixed-Dimensional and Non-manifold Meshes PDF

20 Pages·2013·1.13 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Array-Based Half-Facet Data Structure for Mixed-Dimensional and Non-manifold Meshes

AHF: Array-Based Half-Facet Data Structure for Mixed-Dimensional and Non-manifold Meshes VladimirDyedov1,(cid:2),NavamitaRay1,DanielEinstein2, XiangminJiao1,(cid:2)(cid:2),andTimothyJ.Tautges3 1 Dept.ofAppliedMath.&Statistics,StonyBrookUniversity,StonyBrook,NY11744 [email protected] 2 BiologicalSciencesDivision,PacificNorthwestNationalLaboratory, Richland,WA99352 3 Math.&ComputerScienceDivision,ArgonneNationalLaboratory,Argonne,IL60439 Summary. We present an Array-based Half-Facet mesh data structure, or AHF, for efficient mesh query and modification operations. The AHF extends the com- pact array-based half-edge and half-face data structures (T.J. Alumbaugh and X. Jiao, Compact array-based mesh data structures, IMR, 2005) to support mixed- dimensionaland non-manifoldmeshes. The design goals of our data structure in- clude generality to support such meshes, efficiency of neighborhood queries and mesh modification, compactness of memory footprint, and facilitation of interop- erability of mesh-based application codes. To accomplish these goals, our data structure uses sibling half-facetsas a core abstraction, coupledwith other explicit and implicit representations of entities. A unique feature of our data structure is a comprehensive implementation in MATLAB, which allows rapid prototyping, debugging, testing, and deploymentof meshing algorithms and other mesh-based numerical methods. We have also developed C++ implementation built on top of MOAB (T.J. Tautges, R. Meyers, and K. Merkley, MOAB: A Mesh-Oriented Database, Sandia National Laboratories, 2004). We present some comparisons of thememoryrequirementsandcomputationalcosts,andalsodemonstrateitseffec- tivenesswithafewsampleapplications. Keywords: mesh generation, data structure, non-manifold, mixed-dimensional meshes,siblinghalf-facets,MATLAB. 1 Introduction Mesh data structures are an important technology underlyingmeshing algorithms (such as mesh generation and modification) and mesh-based numerical methods (cid:2) Currentaddress:CD-adapco,Austin,TX78750. (cid:2)(cid:2) Correspondingauthor. J.Sarrate&M.Staten(eds.),Proceedingsofthe22nd 445 InternationalMeshingRoundtable, DOI:10.1007/978-3-319-02335-9_25,(cid:2)c SpringerInternationalPublishingSwitzerland2013 446 V.Dyedovetal. (suchasfinite elementandfinitevolumemethods).While meshdatastructurehas been investigated and used since the inception of mesh generation and computa- tional geometry [1, 2, 8, 10, 11, 13, 16, 17], the increasing complexities and the ever-changing demands of the application codes often pose new requirements to mesh data structures. Examplesof such new demandingapplicationsincludecou- pled multiphysicssimulations and multi-componentsystems, which may pose di- verse requirements within each code as well as requirements on interoperability acrossdifferentcodes.Therefore,meshdatastructurehascontinuedtobeanactive researchtopicinrecentyears. In light of the new challenges of meshing applications, we summarize a few requirementsofmeshdatastructures,whichwillserveasourdesigngoals: Generality: Supportmixed-dimensional,non-manifold(orientedornon-oriented) meshesin1-D,2-D,and3-D,andbeeasilygeneralizabletohigherdimensions. Efficiency: Supportalllocaladjacencyqueriesinconstanttime,assumingtheva- lenceofeachmeshentityisboundedbyasmallconstant. Simplicity: Besimpleandintuitive,andbeeasytoimplement. Extensibility: Allowextensibilityforperformanceandparallelization. Interoperability: Facilitateinteroperabilitywithapplicationcodes,suchassimu- lationcodes,multigridsolvers,etc. Compactnessofmemoryfootprint: Require minimal storage in addition to ele- mentconnectivity. In this paper, we strive to develop a mesh data structure that meets all the above requirements. We refer to our data structure as the Array-based Half-Facet data structure, or AHF. The AHF unifies the array-based half-edge and half-face data structuresforsurfaceandvolumemeshes[1],andfurthergeneralizesthemtosup- port mixed-dimensional and non-manifold meshes by introducing the concept of sibling half-facets. It can be used to perform efficient mesh queries and modification. Thekeycontributionsofthispaperaretwofold:First,weintroduceasimpledata model for mixed-dimensional and non-manifold meshes. Our data model is easy toimplementandisefficientin bothmemoryandcomputationalcost. Inaddition, someofitsdatafieldscanbecreateddynamicallyforfine-grainoperationsandbe removedafterwards.Second,asanarray-baseddatastructure,AHFfacilitatesbetter interoperabilityacrossdifferentapplicationcodes,differentprogramminglanguages (such as MATLAB, C/C++, FORTRAN, etc.), and different hardware platforms. OurC++implementationontopofMOAB[17]furtherimprovesitsinteroperabil- ity through the iMesh interface (http://www.itaps.org/). In addition, our data structure is uniquein its comprehensiveimplementationin MATLAB, which allows rapid prototyping and deploymentof meshing algorithms and other mesh- basednumericalmethodsinaproductivefashion. Theremainderofthepaperisorganizedasfollows.Section2reviewssomeback- ground knowledge and related mesh data structures. Section 3 describes our data model for non-manifold and mixed-dimensional meshes. Section 4 describes the AHF:Array-BasedHalf-FacetDataStructure 447 algorithmsfortheconstruction,query,meshmodificationoperations,aswellastheir implementationsinMATLAB.Section5describestheC++implementationontop ofMOAB.Section6presentssomecomparisonsofAHFagainstothersintermsof storageandcomputationalcost.Section7concludesthepaperwithadiscussion. 2 Background and RelatedWork In this section, we review some terminology and other existing data structures, whichwillestablishthefoundationofourproposeddatastructure. 2.1 Terminology Wedevelopdatastructuresforrepresentingdiscretegeometricandtopologicalob- jectsin1-D,2-D,or3-D,arisingfromnumericalcomputationsinengineeringand scientific applications.These objectscorrespondto curves, surfaces, andvolumes, respectively, typically embedded in two- or three-dimensional Euclidean spaces. Topologically, a d-dimensional object is a manifold with boundary if every point inithasaneighborhoodhomeomorphictoeitherad-dimensionalballorhalf-ball, wherethepointswhoseneighborhoodishomeomorphictoahalf-ballareboundary (orborder)points.Inpractice,itis quitecommonto havetopologicalobjectsthat arenon-manifold,especiallyforcurvesandsurfaces.Thesenon-manifoldsaretyp- ically composed of a union of a finite number of manifolds with boundaries, and sometimes embeddedin a higher-dimensionalmanifold structure. In 3-D space, a surface is oriented if it is possible to make a consistent choice of surface normal vectorateverypoint;otherwiseitisnon-oriented. Inoursetting,ameshisasimplicialcomplexrepresentingdiscretelyageometric ortopologicalobject.Wesayameshis1-D,2-D,or3-Diftheobjectthatitrepre- sentsis topologically1-D,2-D, or3-D,respectively.We say a mesh isa manifold ornon-manifoldifitsgeometricrealizationisamanifoldornon-manifold,respec- tively.Ameshiscomposedof0-D,1-D,2-D,and3-Dentities,whichwerefertoas vertices,edges,faces,andcells,respectively.Typically,afaceiseitheratriangleor quadrilateral,andacellisatetrahedron,prism,pyramid,orhexahedron,especially forfiniteelementmethods,althoughgeneralpolygonsandpolyhedraarealsooften usedin finitevolumemeshes.We focusonfinite-elementmeshes,andwillbriefly describethegeneralizationtopolyhedralmeshesinSection7. Inad-dimensionalmesh,werefertothed-dimensionalentitiesaselements,and refer to the (d − 1)-dimensional sub-entities as its facets. More specifically, the facetsofacellareitsfaces,thefacetsofafaceareitsedges,andafacetofanedge are its vertices. Each facet has an orientation with respect to the containing ele- ment.Forexample,eachedgeofatrianglehasadirection,andalltheedgesforman orientedloop.Thusitmakessensetocallthefacetsashalf-facets.Eachfacetmay havemultipleincidentelements,especiallyfornon-manifoldentities.Werefertoall 448 V.Dyedovetal. such half-facetsas sibling half-facets.A half-facetwithoutanysibling is aborder half-facet,andrefertoverticesincidentonaborderhalf-facetasabordervertex.A meshissaidtobeconformalifthepairwiseintersectionofanytwoentitiesiseither anotherentityorisempty.Inthispaper,weconsideronlyconformalmeshes,which maybemanifoldornon-manifold.Inthecaseofsurfacemeshes,themeshmaybe orientedornon-oriented. Insomeengineeringapplications,especiallyincoupledormulti-componentsys- tems, the domain of interest may be composed of a union of topologically 1-D, 2-D,and3-Dobjects,suchasamixtureofcables,thin-shells,andsolids.Werefer to such a domainand its mesh as mixed-dimensional.1 We refer to a subsetof the mesh corresponding to a 1-D, 2-D, and 3-D object in the domain as a sub-mesh. Itiscommon,althoughnotrequired,forthesub-meshestosharesomemesh enti- ties, especiallysharedvertices.Our goalisto designdata structuresforconsistent representationsformixed-dimensionalmesheswithsharedentities. 2.2 Half-EdgeDataStructure The half-edge data structure, a.k.a. the doubly-connected edge list (DCEL), is a popular data structure for 2-D and surface meshes (see e.g. [5]), especially ori- ented, manifold, polygonalsurface meshes with or without boundary.The DCEL uses edgesas the core object. The edge within each face is called a directed edge orhalf-edge.Inanorientedmanifoldsurfacemesh,supposetheedgeswithineach facecanbeorderedincounter-clockwiseorderwithrespecttooutwardnormal(or upwardnormalfor2-Dmeshes).Eachedgehastwoincidentfaces,andthetwohalf- edgeshaveoppositeorientationsandhencearesaidtobeoppositeortwinofeach other.Anedgeontheboundarydoesnothaveatwinhalf-edge. TherearevariousimplementationsofDCEL.Atypicalimplementation,suchas thoseinCGAL[10,7],OpenMesh[3]andSurface_Mesh[15],storesthemappings fromeachhalf-edgetoitsoppositehalf-edge,itspreviousandnexthalf-edgewithin itsface,itsvertices,itsincidentface,aswellasthemappingfromeachvertexand eachfacetoanincidenthalf-edge.Morecompactrepresentations,suchas[1],can beobtainedbystoringonlythemappingbetweenoppositehalf-edge,optionallythe mapping from each vertex to an incident half-edge, along with the element con- nectivity.Theaboveimplementationsdonotsupportnon-manifoldornon-oriented meshes,whichweovercomeintheproposeddatastructure. 2.3 Half-FaceDataStructure A generalization of the concept of DCEL to volume meshes is the so-called the half-face data structure [1, 13]. Within each cell, suppose the edges of each face are orientedin counter-clockwiseorder with respectto the outward normalof the cell.Werefertotheorientedfacesashalf-faces.Fortypicalmeshesinengineering 1Thesemeshesaresometimesreferredtoasmixedorhybridmeshes,whichweavoidhere sincetheymayalsorefertomesheswithmixed-typesofelementsofthesamedimension. AHF:Array-BasedHalf-FacetDataStructure 449 applications,eachfaceintheinteriorofavolumemeshhastwocorrespondinghalf- faceswithoppositeorientations,whicharesaidtobeoppositeortwinofeachother. Thedatastructurein[1]wasdesignedfor3-manifoldwithboundarycomposed of the standard elements. Although this is the typical case in applications, a vol- umemeshmay alsobe non-manifold.Forexample,thiscanhappenif the domain contains two objects that intersect at a single vertex or along an edge. For gener- ality, we consider volume meshes that may be manifold or non-manifold,and al- lowthemtobeorientedornon-oriented.OpenVolumeMesh[13]wasdevelopedfor general polytopal meshes, which may be non-manifold.However, the data model in OpenVolumeMeshis quite complicated, because unlike the edges in a cell, the faces within a cell do not have a natural topologicalorder. A mesh data structure for non-manifold meshes in arbitrary dimensions was proposed in [4]. This data structurestoresnotonlytheadjacencyinformationofthehighestdimensionalele- mentsbutalso some adjacencyinformationof intermediateelements, whichincur extrastorageoverhead.Inaddition,initsproposedform,itcouldnothandlemixed- dimensionalmeshesthatcontainsubmeshesofdifferentdimensions.Weseekasim- plerandamoreunifieddatamodel. 2.4 Pointer-BasedVersus Array-Based Implementations A mesh data structure may be implemented using either pointers or arrays . The pointer-basedimplementationsaremorecommon,sincetheyarerelativelyeasyto manipulate. For example, the DCEL implementation in CGAL is pointer-based. Other examples, which are not based on half-edges or half-faces, include FMDB [16],MSTK[8],libMesh[11],etc.Insuchanimplementation,theentitiesarerep- resentedas“objects”explicitly,andpointers(orhandles)areusedtorefertothese explicitobjects. In contrast, in an array-based implementation, we do not represent the entities in the meshas objects.Instead,anattribute ofallthe entitiesof thesame typeare storedinoneorafewarrays,andtheattributesforasingleentitymaybedistributed indifferentarrays.AnentitymaybereferencedthroughanIDor“handle”,which can bemappedeasily to arrayindices.The half-edgeand half-facedata structures in[1],MOAB[17],andOpenVolumeMesh[13]arearray-based. In our work, we choose to use array-based, pointer-free implementations for a numberof reasons.First, in an array-basedimplementation,we can treatinterme- diate dimensional entities (such as half-facets) as implicit entities, and reference themwithoutformingexplicitobjects.Thiscanleadto significantsavingsinstor- age, especially on computers with 64-bit pointers. Second, using arrays can also lead to faster memoryaccess and hence better efficiency.In addition, array-based implementationsalsoofferbetterinteroperabilityacrossapplicationcodes,different programminglanguages,anddifferenthardwareplatforms(suchasbetweenGPUs andCPUs). 450 V.Dyedovetal. 3 Data Model forNon-manifoldand Mixed-Dimensional Meshes Thebasichalf-edgeandhalf-facedatastructuresaresimple,buttheywererestricted to oriented, manifoldmeshes (with or withoutboundary)in 2-D and 3-D, respec- tively. In this section, we present a simple and unified generalization to mixed- dimensionalmeshes,whichmaybenon-manifoldand/ornon-oriented. 3.1 UnificationofHalf-Edgesand Half-Faces Weunifythedatamodelsofhalf-edgeandhalf-facedatastructures.Inthisunified datamodel,thekeyabstractionsforad-dimensionalmeshare: vertices: 0-dimensionalentities(a.k.a.nodes); elements: d-dimensionalentities(facesandcellsin2-Dand3-D,respectively); half-facets: (d−1)-dimensionalsub-entitiesofad-dimensionalentity(half-edges andhalf-facesofa2-Dand3-Delement). Inthisdatamodel,weassumethattheelementhasastandardnumberingconvention foritsverticesanditsfacets.Forstandardelements,wefollowtheconventionofthe CGNS(CFDGeneralNotationSystem)[12,18],asillustratedinFig.1.Wedonot 3 4 3 4 5 6 7 6 3 4 3 4 3 4 5 5 8 56 1 2 1 2 1 2 1 3 4 34 5 12 3 1 4 33 2 43 15 23 2 1 21 2 2 1 2 1 24 1 Fig.1CGNSnumberingconventionsfor2-Dand3-Delements.Underscorednumberscor- respondtolocaledgeIDs,andcircledonescorrespondtolocalfaceIDs. require explicit representationof intermediate dimensionalentities between 1 and d−1.Instead,wetreatthehalf-facetasanimplicitentity,andrefertoahalf-facet usingtheelementIDanditslocalIDwithintheelement.Werefertothisdatamodel asthehalf-facetdatastructure. Theaboveunifiedmodelisnotlimitedtod = 2and3.Infact,itcanbeapplied to any d, as long as the numbering convention is predefined for the vertices and itsfacets. Inparticular,ford = 1,werefertothisrepresentationforcurvesasthe half-vertexdatastructure,whichisa specializationofthehalf-facetdatastructure to curves.For d ≥ 2, it providesa compactrepresentation,since the intermediate dimensionalentitiesarenotstoredbutreferencedimplicitlyinstead.Inaddition,this datamodelcanalsobeusedformesheswithhigh-orderelements(suchassix-node trianglesor10-nodetetrahedra),wherethemid-edge,mid-faceormid-cellnodesdo notaffectthedefinitionandidentificationofthehalf-facets. AHF:Array-BasedHalf-FacetDataStructure 451 We store the data structure similar to that in [1]. The element connectivity is storedinarraysinamannersimilartoatypicalfiniteelementcode.Themappings betweensiblinghalf-facetsare storedina 2-D arrayorin separatearrays,oneper uniqueelementtype.Let |E| and f denote the numberof elementsand the maxi- mumnumberoffacetsinanelement,respectively.We denoteeachhalf-facetbya two tuple (cid:3)eid,lfid(cid:4),whereeiddenotesthe elementID, whichstarts from1, and lfid denotes the local facet ID, which starts from 0. For typical meshes, the two tuple can be encodedinto a single 32-bitunsigned integer,by using first d bits to storingthelocalfacetIDofad-dimensionalelement,andusingtheremainingbits tostoringtheelementID.Thisallowsuptoabout500millionelementsforvolume meshes.Forverylargemeshes,weassigna32-bitunsignedintegertotheelement IDandanunsigned8-bitintegertothelocalID,andstoretheminseparatearrays. Thisallowsupto4billionelementswithminimalextrastorageoverhead.Depend- ingonwhetherthehalf-facetIDsareencodedinasingleintegerorintwointegers, wecanstorethemappingsineitherasinglearrayortwoarrays,respectively,where eacharrayisofsize|E|×f.Inaddition,thevertextohalf-facetmappingisstoredin asingle1-Darray.Formostmeshes,weneedtostoreonlyoneincidenthalf-facet. Somecomplicationsmayarisefornon-manifoldvertices,whichweaddressnext. 3.2 GeneralizationtoNon-manifoldMeshes In a non-manifold mesh, there can be more than two elements abutting the same facet, unlikea manifoldmesh wherethere can beonlyup to two. We still referto an oriented facet within an element as a half-facet, but it no longer has a “twin” or“opposite”half-facetingeneral.Werefertothehalf-facetscorrespondingtothe samefacetassiblinghalf-facets.Theorientationsoftwosiblinghalf-facetsarenot requiredtobe oppositetoeach other,andthereforethisgeneralizationalso allows representingnon-orientedmeshes,suchastheMöbiusstrip. An important issue is the storage for mapping between the sibling half-facets. Insteadofdoubly-connectedlinkedlist fortwin half-facets,weuse acycliclinked list, which allows us to preserve the storage structure and also to traverse all the elements incident on a half-facet. Figure 2 shows an example of a non-manifold edge(edgejoiningvertex2and3)presentinthegiventriangulatedmesh,aswellas the the element connectivity,sibling half-edgemap and vertexto half-edgemaps. Notethatwedonotnecessarilyneedtosortthehalf-facetsinanyparticularorder.In fact,anorderingmaynotbewell-definedinsomecases.However,thedatastructure doesnotexcludetheuserfromorderingthehalf-facets. In a d-dimensional non-manifoldmesh, when d > 1, there may exist a vertex whoseneighborhoodisnotad-dimensionalballorhalf-ball,butinsteadtheunion of two or mored-dimensionalballor half-ballsthatintersectatan entity of lower than(d−1)dimension(suchasatthevertexinasurfacemesh,oratavertexoredge inavolumemesh).Werefertosuchavertexasanon-manifoldvertex.Someminor modificationtothedatastructureisnecessaryinthissetting.Inparticular,atanon- manifoldvertex,weneedtostorea1-to-nmappinginsteadofa1-to-1mappingto 452 V.Dyedovetal. (cid:6) elementconnectivity (cid:5) element vertices (cid:5) 1 1 2 3 (cid:2) (cid:3) (cid:4) 2 2 4 3 (cid:2) (cid:3) 3 2 5 3 (cid:4) 4 2 3 6 (cid:7) vertextohalf-edges siblinghalf-edges vertices v2he element sibhes 1 (cid:2)1,0(cid:3) 1 nil (cid:2)2,2(cid:3) nil 2 (cid:2)3,0(cid:3) 2 nil nil (cid:2)3,2(cid:3) 3 (cid:2)4,1(cid:3) 3 nil nil (cid:2)4,0(cid:3) 4 (cid:2)2,1(cid:3) 4 (cid:2)1,1(cid:3) nil nil 5 (cid:2)3,1(cid:3) 6 (cid:2)4,2(cid:3) Fig. 2Example of anon-manifold mesh, along withitselement connectivity, sibling half- edges,andmappingfromeachvertextoanincidenthalf-edge itsincidenthalf-facets.Notethatthisalsocoversthecasewherethereexistanedge inavolumemeshwhoseneighborhoodistheunionoftwoormored-dimensional ballorhalf-ballsthatintersectonlyatthevertex. 3.3 GeneralizationtoMixed-DimensionalMeshes The concept of sibling half-facets unifies the half-vertex,half-edge, and half-face data structures for 1-D, 2-D, and 3-D meshes, which may be manifold or non- manifoldwithboundary.Inamixed-dimensionalmesh,thesub-meshesofdifferent dimensions can share entities. In particular, it is most common for the meshes to sharevertices.However,theseentitiesmayhavedifferentrepresentations. Thisunificationallowsaneasyextensiontosupportmixed-dimensionalmeshes, which may be composed of sub-meshes of 1-D, 2-D, and 3-D. Figure 3 shows a diagramofatypicalhalf-facetdatastructure,wherethehalf-verticesandhalf-edges areonlyrequiredforexplicitedgesandfacesinthemesh,respectively.Wereferto this data structure for mixed-dimensionalmeshes as Array-based Half-Facetdata structure,orAHF.Thisdatastructureisverysimpleandmodular,astheindividual sub-meshesofdifferentdimensionsareself-contained,andtheycanbemaintained separately.Theyalsoallowusto traversebetweenmultipledimensionsefficiently. The interactions of the different dimensions are all performedthrough the shared vertices. AHF:Array-BasedHalf-FacetDataStructure 453 sibhf sibhe Cells Exp-Faces v2hf v2he faces cells edges Exp-Edges Vertices v2hv sibhv Fig.3TypicalAHFformixed-dimensional meshesiscomposed half-vertex(black, forex- plicitedgesonly),half-edge(blue,forexplicitfacesonly),andhalf-face(red)datastructures. 4 Construction, Query, andModificationofAHF Inthissection,wedescribesomedetailedalgorithmsfortheconstructionofAHF,as wellassomequeryandmodificationoperations.SinceAHFisarray-based,theseal- gorithmscanbeimplementedinanyprogramminglanguages,includingMATLAB, C/C++,FORTRAN,etc.WewillalsodescribeourimplementationinMATLAB. 4.1 ConstructionofAHF Inthehalf-facetdatastructure,therearetwocomponents:sibhfs(siblinghalf-facets ) and v2hf (vertexto half-facet).The formeris centralto AHF, as nearly all adja- cencyqueriesrequireit.Thesesiblinghalf-facetsshouldmaptoeachotherandform acycle.Thelatterarray,v2hf,isoptionalformanyoperations,itcanbecreatedonly whenneeded. Ingeneral,weconstructtheAHFintwosteps,whichconstructthesetwomap- pings,respectively.Inamixed-dimensionalmesh,theAHFforthesubmeshofeach each is constructedindependentlyof each other.In the following,we describethe twostepsinamannerindependentlyofthedimensionofthemesh. IdentificationofSiblingHalf-Facets During the first step, we determine the sibling half-facets and construct a cyclic mapping between them. The key components of this step are two intermediate mappings: v2hfs: amappingfromeachvertextoitsincidenthalf-facetsinwhichthevertex haslargestID; v2adj: a mapping from each vertex to its adjacent vertices in each of the above incidenthalf-facets. Algorithm1 outlinesthe procedurefor the first stage, which is applicableto half- facetsinarbitrarydimensions,anditisparticularlyefficientin1to3dimensions. 454 V.Dyedovetal. Algorithm1.Determinationofsiblinghalf-facets. Input: elems:elementconnectivity Output: sibhfs:cyclicmappingsofsiblinghalf-facets 1: foreachelementseinelemsdo 2: foreachfacetf inedo 3: v←vertexwithlargestIDwithinf; 4: us←setofadjacentverticesofvinf; 5: Appendf intov2hfs(v),andappendusintov2adj(v,f); 6: endfor 7: endfor 8: foreachelementseinelemsdo 9: foreachfacetf inedo 10: ifsibhfs(f)isnotsetthen 11: v←vertexwithlargestIDwithinf,andus=v2adj(v,f); 12: Findhalf-facetsinv2hfs(v)s.t.v2adj(v,·)=us; 13: Formacyclicmappingforthesehalf-facetsinsibhfs; 14: endif 15: endfor 16: endfor The computational cost of Algorithm 1 is linear, assuming that the number of facets incident on a vertex is bounded by a small constant, say c. To analyze the storagerequirement,let|H|denotethenumberofhalf-facetsinthemesh.Theout- put requires approximately|H| integers. The algorithm requires two intermediate mapsv2hfandv2adj,which requirec|H| integerstotal. Thisintermediatestorage requirementcanbefurtherreducedbyequallydistributingtheverticesintobbuck- etsandprocesseachbucketinaseparatepass,whichthenwouldrequireonly|H|/b integers. ConstructionofIncidentHalf-FacetofVertex During the second step, we construct a mapping from each vertex to an incident half-facet. This is done by utilizing the sibling half-facets obtained from the first step,asoutlinedinAlgorithm2. When determining the incident half-facets, we give higher-priorities to border half-facets,so thatfromits outputv2hf,we candeterminewhethera vertexv is a bordervertexbysimplycheckingwhetherv2hf(v)isaborderhalf-facet.Inaddition, a minor variant of Algorithm 2 can be used to construct a bitmap of vertices to determinewhetheralltheverticesareborderverticeswithoutformingv2hf.These functions can be useful, for example when extracting the boundary of a mesh or whenimposingboundaryconditionsinnumericalcomputations.Thecomputational costofAlgorithm2isalsolinearinthenumberofverticesplusthenumberofhalf- facets. It does not require any intermediate storage. In addition, the AHF can be usedtoextracttheinternalboundariesbetweendifferentmaterialsinamesh.

Description:
We present an Array-based Half-Facet mesh data structure, or AHF, pact array-based half-edge and half-face data structures (T.J. Alumbaugh and X
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.