Class xlifepp::MeshDomain#

class MeshDomain : public xlifepp::GeomDomain#

Inheritence diagram for xlifepp::MeshDomain:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="xlifepp::GeomDomain" tooltip="xlifepp::GeomDomain"] "1" [label="xlifepp::MeshDomain" tooltip="xlifepp::MeshDomain" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::MeshDomain:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "24" [label="xlifepp::Collection< string_t >" tooltip="xlifepp::Collection< string_t >"] "49" [label="xlifepp::KdNode< xlifepp::Point >" tooltip="xlifepp::KdNode< xlifepp::Point >"] "48" [label="xlifepp::KdTree< xlifepp::Point >" tooltip="xlifepp::KdTree< xlifepp::Point >"] "17" [label="xlifepp::Matrix< real_t >" tooltip="xlifepp::Matrix< real_t >"] "21" [label="xlifepp::Vector< real_t >" tooltip="xlifepp::Vector< real_t >"] "32" [label="xlifepp::Vector< xlifepp::Vector< real_t > >" tooltip="xlifepp::Vector< xlifepp::Vector< real_t > >"] "57" [label="std::list< number_t >" tooltip="std::list< number_t >"] "37" [label="std::list< std::pair< number_t, real_t > >" tooltip="std::list< std::pair< number_t, real_t > >"] "44" [label="std::list< xlifepp::MeshDomain * >" tooltip="std::list< xlifepp::MeshDomain * >"] "56" [label="std::map< number_t, int_t >" tooltip="std::map< number_t, int_t >"] "13" [label="std::map< number_t, std::vector< number_t > >" tooltip="std::map< number_t, std::vector< number_t > >"] "54" [label="std::map< number_t, xlifepp::GeomElement * >" tooltip="std::map< number_t, xlifepp::GeomElement * >"] "11" [label="std::map< number_t, xlifepp::Geometry * >" tooltip="std::map< number_t, xlifepp::Geometry * >"] "36" [label="std::map< string_t, number_t >" tooltip="std::map< string_t, number_t >"] "52" [label="std::map< xlifepp::GeomElement *, std::list< GeoNumPair > >" tooltip="std::map< xlifepp::GeomElement *, std::list< GeoNumPair > >"] "47" [label="std::map< xlifepp::Point, std::list< xlifepp::GeomElement * > >" tooltip="std::map< xlifepp::Point, std::list< xlifepp::GeomElement * > >"] "45" [label="std::set< ShapeType >" tooltip="std::set< ShapeType >"] "38" [label="std::list< T >" tooltip="std::list< T >"] "12" [label="std::map< K, T >" tooltip="std::map< K, T >"] "46" [label="std::set< K >" tooltip="std::set< K >"] "8" [label="std::vector< T >" tooltip="std::vector< T >"] "27" [label="std::vector< T >" tooltip="std::vector< T >"] "20" [label="std::vector< K >" tooltip="std::vector< K >"] "7" [label="std::vector< RealPair >" tooltip="std::vector< RealPair >"] "43" [label="std::vector< const xlifepp::GeomDomain * >" tooltip="std::vector< const xlifepp::GeomDomain * >"] "23" [label="std::vector< const xlifepp::Transformation * >" tooltip="std::vector< const xlifepp::Transformation * >"] "28" [label="std::vector< number_t >" tooltip="std::vector< number_t >"] "18" [label="std::vector< real_t >" tooltip="std::vector< real_t >"] "42" [label="std::vector< std::vector< GeoNumPair > >" tooltip="std::vector< std::vector< GeoNumPair > >"] "14" [label="std::vector< std::vector< int_t > >" tooltip="std::vector< std::vector< int_t > >"] "25" [label="std::vector< string_t >" tooltip="std::vector< string_t >"] "41" [label="std::vector< xlifepp::GeomDomain * >" tooltip="std::vector< xlifepp::GeomDomain * >"] "40" [label="std::vector< xlifepp::GeomElement * >" tooltip="std::vector< xlifepp::GeomElement * >"] "55" [label="std::vector< xlifepp::MeshDomain * >" tooltip="std::vector< xlifepp::MeshDomain * >"] "35" [label="std::vector< xlifepp::Parameter * >" tooltip="std::vector< xlifepp::Parameter * >"] "10" [label="std::vector< xlifepp::Point >" tooltip="std::vector< xlifepp::Point >"] "29" [label="std::vector< xlifepp::Transformation * >" tooltip="std::vector< xlifepp::Transformation * >"] "33" [label="std::vector< xlifepp::Vector< real_t > >" tooltip="std::vector< xlifepp::Vector< real_t > >"] "6" [label="xlifepp::BoundingBox" tooltip="xlifepp::BoundingBox"] "26" [label="xlifepp::Collection< T >" tooltip="xlifepp::Collection< T >"] "3" [label="xlifepp::DomainInfo" tooltip="xlifepp::DomainInfo"] "15" [label="xlifepp::ExtrusionData" tooltip="xlifepp::ExtrusionData"] "39" [label="xlifepp::GeoNode" tooltip="xlifepp::GeoNode"] "2" [label="xlifepp::GeomDomain" tooltip="xlifepp::GeomDomain"] "5" [label="xlifepp::Geometry" tooltip="xlifepp::Geometry"] "50" [label="xlifepp::KdNode< T >" tooltip="xlifepp::KdNode< T >"] "51" [label="xlifepp::KdTree< T >" tooltip="xlifepp::KdTree< T >"] "19" [label="xlifepp::Matrix< K >" tooltip="xlifepp::Matrix< K >"] "4" [label="xlifepp::Mesh" tooltip="xlifepp::Mesh"] "1" [label="xlifepp::MeshDomain" tooltip="xlifepp::MeshDomain" fillcolor="#BFBFBF"] "9" [label="xlifepp::MinimalBox" tooltip="xlifepp::MinimalBox"] "34" [label="xlifepp::Parameters" tooltip="xlifepp::Parameters"] "31" [label="xlifepp::Parametrization" tooltip="xlifepp::Parametrization"] "53" [label="xlifepp::PartitionData" tooltip="xlifepp::PartitionData"] "30" [label="xlifepp::Point" tooltip="xlifepp::Point"] "16" [label="xlifepp::Transformation" tooltip="xlifepp::Transformation"] "22" [label="xlifepp::Vector< K >" tooltip="xlifepp::Vector< K >"] "24" -> "25" [dir=forward tooltip="public-inheritance"] "24" -> "26" [dir=forward tooltip="template-instance"] "49" -> "50" [dir=forward tooltip="usage"] "49" -> "30" [dir=forward tooltip="usage"] "49" -> "50" [dir=forward tooltip="template-instance"] "48" -> "49" [dir=forward tooltip="usage"] "48" -> "51" [dir=forward tooltip="template-instance"] "17" -> "18" [dir=forward tooltip="public-inheritance"] "17" -> "19" [dir=forward tooltip="template-instance"] "21" -> "18" [dir=forward tooltip="public-inheritance"] "21" -> "22" [dir=forward tooltip="template-instance"] "32" -> "33" [dir=forward tooltip="public-inheritance"] "32" -> "22" [dir=forward tooltip="template-instance"] "57" -> "38" [dir=forward tooltip="template-instance"] "37" -> "38" [dir=forward tooltip="template-instance"] "44" -> "38" [dir=forward tooltip="template-instance"] "56" -> "12" [dir=forward tooltip="template-instance"] "13" -> "12" [dir=forward tooltip="template-instance"] "54" -> "12" [dir=forward tooltip="template-instance"] "11" -> "12" [dir=forward tooltip="template-instance"] "36" -> "12" [dir=forward tooltip="template-instance"] "52" -> "12" [dir=forward tooltip="template-instance"] "47" -> "12" [dir=forward tooltip="template-instance"] "45" -> "46" [dir=forward tooltip="template-instance"] "20" -> "8" [dir=forward tooltip="template-instance"] "7" -> "8" [dir=forward tooltip="template-instance"] "43" -> "8" [dir=forward tooltip="template-instance"] "23" -> "8" [dir=forward tooltip="template-instance"] "28" -> "8" [dir=forward tooltip="template-instance"] "18" -> "8" [dir=forward tooltip="template-instance"] "42" -> "8" [dir=forward tooltip="template-instance"] "14" -> "8" [dir=forward tooltip="template-instance"] "25" -> "8" [dir=forward tooltip="template-instance"] "41" -> "8" [dir=forward tooltip="template-instance"] "40" -> "8" [dir=forward tooltip="template-instance"] "55" -> "8" [dir=forward tooltip="template-instance"] "35" -> "8" [dir=forward tooltip="template-instance"] "10" -> "8" [dir=forward tooltip="template-instance"] "29" -> "8" [dir=forward tooltip="template-instance"] "33" -> "8" [dir=forward tooltip="template-instance"] "6" -> "7" [dir=forward tooltip="usage"] "26" -> "27" [dir=forward tooltip="public-inheritance"] "3" -> "4" [dir=forward tooltip="usage"] "15" -> "16" [dir=forward tooltip="usage"] "15" -> "24" [dir=forward tooltip="usage"] "15" -> "28" [dir=forward tooltip="usage"] "15" -> "18" [dir=forward tooltip="usage"] "15" -> "21" [dir=forward tooltip="usage"] "15" -> "29" [dir=forward tooltip="usage"] "15" -> "30" [dir=forward tooltip="usage"] "39" -> "39" [dir=forward tooltip="usage"] "39" -> "5" [dir=forward tooltip="usage"] "2" -> "3" [dir=forward tooltip="usage"] "2" -> "2" [dir=forward tooltip="usage"] "2" -> "5" [dir=forward tooltip="usage"] "2" -> "43" [dir=forward tooltip="usage"] "5" -> "6" [dir=forward tooltip="usage"] "5" -> "9" [dir=forward tooltip="usage"] "5" -> "11" [dir=forward tooltip="usage"] "5" -> "13" [dir=forward tooltip="usage"] "5" -> "14" [dir=forward tooltip="usage"] "5" -> "15" [dir=forward tooltip="usage"] "5" -> "31" [dir=forward tooltip="usage"] "5" -> "5" [dir=forward tooltip="usage"] "5" -> "39" [dir=forward tooltip="usage"] "50" -> "50" [dir=forward tooltip="usage"] "19" -> "20" [dir=forward tooltip="public-inheritance"] "4" -> "5" [dir=forward tooltip="usage"] "4" -> "10" [dir=forward tooltip="usage"] "4" -> "40" [dir=forward tooltip="usage"] "4" -> "41" [dir=forward tooltip="usage"] "4" -> "28" [dir=forward tooltip="usage"] "4" -> "42" [dir=forward tooltip="usage"] "4" -> "4" [dir=forward tooltip="usage"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "44" [dir=forward tooltip="usage"] "1" -> "40" [dir=forward tooltip="usage"] "1" -> "45" [dir=forward tooltip="usage"] "1" -> "1" [dir=forward tooltip="usage"] "1" -> "47" [dir=forward tooltip="usage"] "1" -> "48" [dir=forward tooltip="usage"] "1" -> "52" [dir=forward tooltip="usage"] "1" -> "53" [dir=forward tooltip="usage"] "9" -> "10" [dir=forward tooltip="usage"] "34" -> "35" [dir=forward tooltip="usage"] "34" -> "36" [dir=forward tooltip="usage"] "31" -> "5" [dir=forward tooltip="usage"] "31" -> "21" [dir=forward tooltip="usage"] "31" -> "32" [dir=forward tooltip="usage"] "31" -> "4" [dir=forward tooltip="usage"] "31" -> "34" [dir=forward tooltip="usage"] "31" -> "37" [dir=forward tooltip="usage"] "53" -> "54" [dir=forward tooltip="usage"] "53" -> "55" [dir=forward tooltip="usage"] "53" -> "56" [dir=forward tooltip="usage"] "53" -> "57" [dir=forward tooltip="usage"] "53" -> "40" [dir=forward tooltip="usage"] "30" -> "18" [dir=forward tooltip="public-inheritance"] "16" -> "17" [dir=forward tooltip="usage"] "16" -> "21" [dir=forward tooltip="usage"] "16" -> "23" [dir=forward tooltip="usage"] "22" -> "20" [dir=forward tooltip="public-inheritance"] }

class to handle domain with mesh description

Public Functions

MeshDomain(const Mesh&, const string_t&, dimen_t, const string_t&)#

constructor

void buildGeomData() const#

build measure and orientation of domain elements

void buildIsoNodes() const#

build isoGeometric nodes in parameters domain

export iso edges in a raw format, if isoNodes have been already built

void buildKdTree() const#

build KdTree

build KdTree structure: “ordered vertices”

void buildPartitionData(const std::vector<Parameter> &ps)#

create the domain made of dom1 elements that are not in dom2

void buildSides(std::vector<GeomElement*> &sidelts) const#

build vector of side elements of current domain

create side elements (ALL SIDES) of the current domain and store them in geomElements vector algorithm similar to Mesh::buildSides internal tool, called by sidesDomain() but may be used out of this context

const std::map<GeomElement*, std::list<GeoNumPair>> &buildSideToExt(const GeomDomain& = GeomDomain()) const#

build sideToExt map

void buildVertexElements() const#

build VertexElementsMap from geomElements

build VertexElements map from geomElements for each vertex v the list of elements having v as vertex

virtual void clearGeomMapData()#

clear temporary GeomData structures of MeshElement’s

inline virtual bool colorFlag() const#

return useColorFlag status

virtual void computeStatistics(bool computeSideInfo = false)#

update geometric domain info (measure, characteristic sizes, …)

inline virtual GeomElement *element(number_t k)#

access to k-th element (k>=1), 0 if not available

inline virtual const GeomElement *element(number_t k) const#

access to k-th element (k>=1), 0 if not available

std::list<GeomElement*> elementsCloseTo(Point &pt) const#

locate elements close to a given point

virtual GeomDomain &extendDomain(bool useVertex = false, const GeomDomain &omega = GeomDomain()) const#

find or create extension of a side domain

find or create the extension of a side domain two cases are considered: extension from side elements: gives the list of all geometric elements having a side on the side domain, extended name: ‘side domain name’_sextension extension from side vertices: gives the list of all geometric elements having a vertex on the side domain, extended name: ‘side domain name’_vextension the former extension is used when computing integral over side domain involving non tangential operator while the second one is used when extending a function from side to inside domain

useVertex: if true do extension from side vertices else do extension from side elements omega: optional inside domain, restrict extension to elements of omega, when omega is void (or not a MeshDomain) take all parent elements

virtual GeomDomain &ficticiousDomain(const GeomDomain &omega) const#

find or create a ficticious domain of a side domain

create a ficticious domain of current domain (say gamma) related to a given domain (say omega) the ficticious domain is the set of elements intersecting any element of Gamma the name of ficticious domain is: gamma.name_F_omega.name

  • the sideToExt map of ficticious domain gives the list of elements of omega intersecting an element of gamma that is useful to compute FEM integral involving unknown on gamma and unknown on omega

  • generally gamma is a domain of dimension n-1 as domain omega is of dimension n, but the algorithm used is general and is able to deal with any kind of domains whereas the function intersect(GeomElement, GeomElement) can deal with any kind of elements remove elements (set) from current domain, creating new domain if different from current

virtual Vector<real_t> getNormal(const Point&, OrientationType = _undefOrientationType, const GeomDomain& = GeomDomain()) const#

return normal to the current domain at a given point

return normal to a domain gamma at a given point x, normal orientation may be imposed (_towardsInfinite, _outwardsInfinite, _towardsDomain, _outwardsDomain)

virtual bool include(const GeomDomain&) const#

true if the current domain includes a given domain (const)

return true if the current domain includes a given domain inclusion has to be understood in a geometric meaning, not in algebraic meaning as side is included in its parent element, a boundary domain may be included in a volumic domain

bool include(const MeshDomain &d) const#

true if the current domain includes a given mesh domain (const)

GeomDomain &internalSidesDomain(const string_t &na = "") const#

find or create internal sides domain related to current one

if not exists, builds the domains made of INTERNAL sides of all elements of the current domain if current domain dimension = mesh dimension, the GeomElement* stored in Mesh::Sides are used else new GeomElement are created using MeshDomain::buildSides na : name of the sidesDomain if empty, name will be “sides of “+this->name() when sidesDomain already exists, na has no effect Note : do not confuse internal sides domain built here and sides domain built in sidesDomain and stored in the pointer sidesDomain_p of parent domain

bool isCrack() const#

true if MeshDomain is a side of a crack

true if MeshDomain is a side of a given mesh domain

virtual bool isInterface() const#

true if MeshDomain is an interface between domains (first element has more than one parent)

true if MeshDomain is a side of a crack

inline virtual bool isIntersection() const#

MeshDomain is not an intersection of domains.

virtual bool isSideDomain() const#

true if MeshDomain is a side of meshdomain (first element has one parent)

return true if MeshDomain is a side of meshdomain (first elment has a parent)

true if MeshDomain is a set of element sides (isSidesOf_p!=nullptr)

bool isSideOf(const MeshDomain &d) const#

true if MeshDomain is a side of a given mesh domain

virtual bool isSidesDomain() const#

true if MeshDomain is a set of element sides (isSidesOf_p!=nullptr)

inline virtual bool isUnion() const#

MeshDomain is not an union of domains.

bool isUnionOf(const std::vector<const GeomDomain*>&) const#

check if an union of subdomains is equal to the current mesh domain

check if an union of mesh subdomains is equal to the current mesh domain assuming that the current mesh domain includes all domains perform only analysis on the number of elements (not robust)

virtual const GeomDomain *largestDomain(std::vector<const GeomDomain*>) const#

return the largest domain including list of subdomains

return the largest domain including a list of subdomains (doms), in a geometric meaning, it may be

  • the current domain if the union is the current domain

  • one of the domain, if one contains all of the others and is different from current one

  • the union of subdomains (created if does not exist) else

GeomElement *locate(const Point&, bool silent = false) const#

locate element containing a given point

virtual real_t measure() const#

measure (length, surface or volume) of MeshDomain

return the measure (length, surface or volume) of MeshDomain

inline virtual MeshDomain *meshDomain()#

access to meshDomain pointer

inline virtual const MeshDomain *meshDomain() const#

access to meshDomain pointer (const)

GeomElement *nearest(Point &pt, real_t&) const#

locate nearest element of a given point

build isoGeometric nodes in parameters domain

std::set<number_t> nodeNumbers() const#

return the set of all node numbers of meshdomain, ascending order

std::vector<Point> nodes() const#

return the set of all nodes of meshdomain, numbers ascending order

inline virtual std::pair<OrientationType, const GeomDomain*> normalOrientation() const#

return current orientation of normal vectors

inline virtual number_t numberOfElements() const#

number of geometric elements of meshdomain

virtual number_t order() const#

order of geometric elements of domain

virtual void print(std::ostream&) const#

print MeshDomain informations

template<typename Iterator>
std::vector<std::pair<Point, GeomElement*>> projections(Iterator itp, number_t np) const#

export to file the edges related to isoNodes (if defined) in a raw format

build the projection of a list of points (given by an iterator) onto the current domain return a vector<std::pair<Point,GeomElement*> > containing for each point the projection P and the GeomElement E containing P input: itp: iterator on the first point (*itp should be a Point&) np : number of points to deal with

build projections of points onto current domain

loop on points(Vi) di=+inf loop on element of current side domain (Ek) compute Pik the projection of Vi on Ek and dik=|Pik-Vi| if(dik<di) Pi=Pik, di=dik

void rebuild(const ComparisonFunction<>&, bool restrictedToDomain = false)#

rebuild by collecting elements when color satisfies a criterium given by ComparisonFunction

rebuild current domain by collecting elements satisfying a criterium given by a a ComparisonFunction dom = {elt such that cf(elt.color)=true} update all related data

Note

this function rebuilds domain only from mesh elements, if required do not forget to create new elements before

void rebuild(const std::map<string_t, std::vector<GeoNumPair>>&, std::map<string_t, GeomElement*>&, const std::map<GeomDomain*, std::set<GeomElement*>*>&)#

rebuild a side domain from plain domain elements

rebuild current side domain by collecting side elements being a side of elements of doms sideIndex: vector of sides described as a pair (parent elt pointer, side number) and indexed by a string sideEltIndex: vector of side element indexed by a string parelts: set of parent elements for each involved domains built either boundary (one domain) or interface (two domains)

virtual GeomDomain &removeElts(const GeomDomain &dom, const string_t &namedom = "") const#

remove dom GeomElements from current domain, creating new GeoDomain if different from current

virtual GeomDomain &removeElts(const std::set<GeomElement*> &elts, const string_t &namedom = "") const#

remove set of GeomElements from current domain, creating new domain if different from current

remove elements of dom from current domain, creating new domain if different from current

void removeExt()#

remove extension of current domain

void reverseOrientations() const#

reverse all the element orientations

void setColor(const std::vector<real_t>&, const std::map<number_t, number_t>&, ColoringRule = defaultColoringRule) const#

set color of geom elements of domain according to vertex values and a coloring rule

set color of geom elements of domain according to vertex values and a coloring rule val: real vector of values on domain vertices vIndex: map mesh vertex number -> domain vertex number cr: a ColoringRule, i.e; a function of the form: real_t cr(const Geomelement& gelt, const std::vector<real_t>& v)

void setColor(const std::vector<Vector<real_t>> &val, const std::map<number_t, number_t> &vIndex, VectorColoringRule = defaultVectorColoringRule) const#

set color of geom elements of domain according to vertex vertex values and a vector coloring rule val: vector of real vectors on domain vertices vIndex: map mesh vertex number -> domain vertex number vcr: a VectorColoringRule, i.e; a function of the form: real_t cr(const Geomelement& gelt, const std::vector<Vector<real_t> >& v)

inline virtual void setColorFlag(bool f) const#

set useColorFlag status

virtual void setDomainId(number_t)#

set the DomainId of all elements of domain

virtual void setMaterialId(number_t)#

set material id (>0) for all geom elements of domain

virtual void setNormalOrientation(OrientationType, const GeomDomain&) const#

set normal orientation of a SpaceDim-1 meshdomain related to a GeomDomain

set orientation of meshElements of a manifold/boundary say a mesh domain of dimension SpaceDim-1

  • update the member data normalDefinition

  • compute or update the orientation of geometric elements of the current meshdomain

if the domain is not a domain of dimension SpaceDim-1, nothing is done if ort = _towardsInfinite (resp._outwardsInfinite), geom is not used if ort = _towardsDomain (resp._outwardsDomain), geom has to be a parent domain of boundary domain if orientations have never been computed, compute them using setOrientationForManifold or setOrientationForBoundary if orientations are currently computed, detect if the orientations have to be reversed

for instance , consider the following domains

 |------------------------------|
 |                              |---->  Gamma.setNormalOrientation(_towardsInfinite)
 |         |------------|       |     = Gamma.setNormalOrientation(_outwardsDomain,Omega2)
 |         |            |       |
 | Omega2  |   Omega1   |       |
 |         |            |------------>  Sigma.setNormalOrientation(_towardsInfinite)
 |         |------------|       |     = Sigma.setNormalOrientation(_outwardsDomain,Omega1)
 |              Sigma           |     = Sigma.setNormalOrientation(_towardsDomain, Omega2)
 |------------------------------|
                Gamma
Default rule (ort =_undefOrientationType) : boundary -> _outwardsDomain (well adapted to FE-IR) manifold -> _towardsInfinite (well adapted to BEM)

WARNING: - For a non closed manifold/boundary, setNormalOrientation(_towardsInfinite/outwardsInfinite) constructs consistent normal orientations but not predictable, use additional “interior” point

  • In case of an interface, _outwardsDomain with no domain specified may give inconsistent normal orientations

virtual void setNormalOrientation(OrientationType, const Point&) const#

set normal orientation of a SpaceDim-1 meshdomain related to a Point

virtual void setNormalOrientation(OrientationType = _undefOrientationType, const GeomDomain *gp = nullptr, const Point *p = nullptr) const#

set normal orientation of a SpaceDim-1 meshdomain

void setOrientationForBoundary(OrientationType ort = _outwardsDomain, const GeomDomain* = nullptr) const#

set normal orientation of a boundary

set orientation of meshElements of a boundary of a domain, i.e a sign to apply to normal computed from the jacobian according to an orientation rule

  • ort: one of direction _towardsInfinite, _outwardsInfinite,_towardsDomain, _outwardsDomain

  • geom: pointer to (parent) domain concerned by orientation if geom = 0 , compute in/outward normal from first element parent

void setOrientationForManifold(OrientationType = _towardsInfinite, const Point *P = nullptr) const#

set normal orientation of a manifold

set orientation of meshElements of a manifold say a mesh domain of dimension SpaceDim-1 orientation (-1 or 1) is chosen such as the orientation * normal vector is an outward normal, say going to infinite if ort = _outwardsInfinite, the orientations are reversed P is an additional point used to specify where is the “interior” of an open manifold

                              |
                              |
                       P      |-----> towardsInfinite related to P
                              |
                              |
                              |
This process does not suppose that the manifold is a boundary of domain
  • first step: compute one normal by element (given by cross product of two first columns of jacobian)

  • second step: find a path in element list such as two consecutive elements share a side may be more than one path (case of non connected components)

  • pick one normal (by connected component) and decide the outward orientation by analysis the intersection of a half line and all other elements

  • travel this path and choose same orientation for all element using a continuity method based on geometric computation

For a non closed manifold, this process constructs consistent normal orientations but not predictable. Use additional point P

NOTE: to be changed in future by numbering analysis

void setShapeTypes()#

set the element shape types in mesh domain

virtual GeomDomain &sidesDomain(const string_t &na = "") const#

find or create sides domain related to current one

if not exists, builds the domains made of ALL sides of all elements of the current domain else returns sidesDomain_p if current domain dimension = mesh dimension, the GeomElement stored in Mesh::Sides are used else new GeomElement are created using MeshDomain::buildSides na: name of the sidesDomain if empty, name will be “sides of “+this->name() when sidesDomain already exists, na has no effect

void updateDomainParents(bool keep = false)#

update parents if keep=false or parents is empty

update domain parents (not the grandparents) loop on domains of mesh with dimension + 1 check if it is a parent checking ONLY the first element

void updateSides(std::map<string_t, std::vector<GeoNumPair>>&)#

update parent sides of elements of a side domain

update parent sides if a side domain the parent element of a side element may be incomplete, depending on the mesher used this function looks for all parent elements of a side elements and updates the parentSides_ vector of each geometric element works only for side domain sideIndex: sides of mesh indexed by the list of ordered vertex numbers -> list of (parent element, side number) may be constructed here

std::set<number_t> vertexNumbers() const#

return the set of all vertex numbers of meshdomain, ascending order

std::vector<Point> vertices() const#

return the set of all vertices of meshdomain, numbers ascending order

return the set of all nodes of meshdomain, numbers ascending order (see nodeNumbers)

Public Members

mutable bool diffEltComputed = false#

true: differential elements are computed

const MeshDomain *dualCrackDomain_p = nullptr#

other side, if domain is a side of crack else 0

const MeshDomain *extensionin_p = nullptr#

extension domain pointer, if domain is an extension of a domain, else 0

const MeshDomain *extensionof_p = nullptr#

side domain pointer, if domain is an extension of a side domain, else 0

DomainExtensionType extensionType = _noExtension#

extension type

std::vector<GeomElement*> geomElements#

list of geometric elements

mutable bool inverseJacobianComputed = false#

true: inverse of jacobians are computed

mutable const MeshDomain *isSidesOf_p = nullptr#

parent domain when a sides domain

mutable bool jacobianComputed = false#

true: jacobians are computed

mutable KdTree<Point> kdtree#

kdtree structure using to fast locate element containing a given point

mutable bool normalComputed = false#

true: normals are computed

mutable std::pair<OrientationType, const GeomDomain*> normalOrientationRule#

the normal orientation rule

mutable bool orientationComputed = false#

true: orientations are computed

std::list<MeshDomain*> parents#

mesh domain parents if side domain (see updateParents)

mutable bool parentSidesUptodate = false#

true: parents of side elements are up to date

mutable PartitionData *partitionData_p = nullptr#

partition data related to mesh domain

std::set<ShapeType> shapeTypes#

list of element shape types in mesh domain (counted once)

mutable MeshDomain *sidesDomain_p = nullptr#

domain of all sides of current domain (see sidesDomain)

mutable std::map<GeomElement*, std::list<GeoNumPair>> sideToExt#

map side element -> list of extended elements (for a side domain!)

mutable bool useColor = false#

true: restrict integral to GeomElement with 0 color (only intg rep), default=false

mutable std::map<Point, std::list<GeomElement*>> vertexElements#

list of elements by vertex