Mesh processing class#
-
struct adjacenteletype#
- #include <mesh_utils.h>
-
class Delaunay2VoronoiModule : public OpenFdemAbstract, public ns_mesh::MeshUtils#
- #include <mesh_delaunay2Voronoi.h>
Public Functions
-
void mesh_delaunay2Voronoi(General general, Nodal nodal, Element element, Edge edge, DFN dfn, Group group)#
main function to process delaunay to Voronoi. All the mesh will be voronoied and the mesh not to be voronoied should be imported after the processing. All group infmormation is cleared.
- Parameters:
general –
nodal –
element –
edge –
dfn –
group –
-
void buildBoundaryList(Nodal nodal, Element element)#
initialize the boundary information.
- Parameters:
nodal –
element –
-
void createVoronoifromInnerVertex(Nodal nodal, Element element)#
build the Voronoi element from inner vertex.
- Parameters:
nodal –
element –
-
void createVoronoifromBoundaryVertex(Nodal nodal, Element element)#
build the Voronoi from the boundary vertex.
- Parameters:
nodal –
element –
-
void buildnewNodeList(Nodal nodal, Element element)#
store the new vertexes.
- Parameters:
nodal –
element –
-
void buildnewElementList(Nodal nodal, Element element)#
store the new elements.
- Parameters:
nodal –
element –
Private Members
-
voronoi_type *Voronoi#
-
bool *isBoundary#
-
bool *hasVoronoied#
-
std::vector<element_type> voronoieles#
-
void mesh_delaunay2Voronoi(General general, Nodal nodal, Element element, Edge edge, DFN dfn, Group group)#
-
struct group_cohelement_t#
- #include <openfdem_group.h>
-
struct group_edge_t#
- #include <openfdem_group.h>
Public Members
-
edgegrouptype type = edgegrouptype::SQUAREIN#
-
edgegrouptype type = edgegrouptype::SQUAREIN#
-
struct group_element_t#
- #include <openfdem_group.h>
-
struct group_gbm_t#
- #include <openfdem_group.h>
-
struct group_mpmpoints_t#
- #include <openfdem_group.h>
-
struct group_node_t#
- #include <openfdem_group.h>
-
struct group_particle_t#
- #include <openfdem_group.h>
-
struct Group_structure#
- #include <openfdem_group.h>
Public Members
-
std::vector<group_node_t> node#
-
std::vector<group_element_t> ele#
-
std::vector<group_edge_t> edge#
-
std::vector<group_cohelement_t> cohele#
-
std::vector<group_gbm_t> gbm#
-
std::vector<group_particle_t> particle#
-
std::vector<group_mpmpoints_t> mpmpoint#
-
std::vector<group_node_t> node#
-
class GroupModule : public OpenFdemAbstract, public ns_mesh::GroupUtils#
- #include <group_module.h>
Public Static Functions
-
static void getNodeGoupInCircleRange(Nodal nodal, Group group, char *tag, Real region[])#
build nodal group from the circel region. all nodals located in the region of circle are grouped and the region is recognised as [origon.x origon.y radius]
- Parameters:
nodal –
group –
tag –
region –
-
static void getNodeGoupOutCircleRange(Nodal nodal, Group group, char *tag, Real region[])#
build nodal group from the circel region. all nodals located outside the region of circle are grouped and the region is recognised as [origon.x origon.y radius]
- Parameters:
nodal –
group –
tag –
region –
-
static void getNodeGoupOnCircleRange(Nodal nodal, Group group, char *tag, Real region[])#
build nodal group from the circel region. all nodals located on circle are grouped and the region is recognised as [origon.x origon.y radius]
- Parameters:
nodal –
group –
tag –
region –
-
static void getNodeGoupOnPlaneLeft(Nodal nodal, Group group, char *tag, Real region[])#
build nodal group from the plane region. all nodals located on left of the plane are grouped and the region is recognised as [point1.x point1.y point2.x point2.y]
- Parameters:
nodal –
group –
tag –
region –
-
static void getNodeGoupOnPlaneRight(Nodal nodal, Group group, char *tag, Real region[])#
build nodal group from the plane region. all nodals located on right of the plane are grouped and the region is recognised as [point1.x point1.y point2.x point2.y]
- Parameters:
nodal –
group –
tag –
region –
-
static void getNodeGoupOnPlane(Nodal nodal, Group group, char *tag, Real region[])#
build nodal group from the plane region. all nodals exactly located on the plane are grouped and the region is recognised as [point1.x point1.y point2.x point2.y]
- Parameters:
nodal –
group –
tag –
region –
-
static void getNodeGoupInBoxRange(Nodal nodal, Group group, char *tag, Real region[])#
build nodal group from the suqare region. all nodals located in the square are grouped and the region is recognised as [xmin xmax ymin ymax]
- Parameters:
nodal –
group –
tag –
region –
-
static void getNodeGoupOutBoxRange(Nodal nodal, Group group, char *tag, Real region[])#
build nodal group from the suqare region. all nodals located out the square are grouped and the region is recognised as [xmin xmax ymin ymax]
- Parameters:
nodal –
group –
tag –
region –
-
static void getNodeGoupOnBoxRange(Nodal nodal, Group group, char *tag, Real region[])#
build nodal group from the suqare region. all nodals exactly located on the square are grouped and the region is recognised as [xmin xmax ymin ymax] USE WITH CAUTION, some information may be lost
- Parameters:
nodal –
group –
tag –
region –
-
static void getNodeGoupPolygonRange(Nodal nodal, Group group, char *tag, std::vector<Vector2> &polygon, std::string type)#
build the node group from polygon region.
- Parameters:
nodal –
group –
tag –
polygon –
type –
-
static void getEdgeGroupInBoxRange(Edge edge, Group group, char *tag, Real region[])#
build edge group from the suqare region. all edges located in the square are grouped and the region is recognised as [xmin xmax ymin ymax] USE WITH CAUTION, the edge centre may be out of the region
- Parameters:
edge –
group –
tag –
region –
-
static void getEdgeGoupPolygonRange(Edge edge, Group group, char *tag, std::vector<Vector2> &polygon, std::string type)#
-
static void getEdgeGroupOnPlaneRight(Edge edge, Group group, char *tag, Real region[])#
build edge group from the plane region. all edges located on right of the plane are grouped and the region is recognised as [point1.x point1.y point2.x point2.y]
- Parameters:
edge –
group –
tag –
region –
-
static void getEdgeGroupOnPlaneLeft(Edge edge, Group group, char *tag, Real region[])#
build edge group from the plane region. all edges located on left of the plane are grouped and the region is recognised as [point1.x point1.y point2.x point2.y]
- Parameters:
edge –
group –
tag –
region –
-
static void getEdgeGroupOnPlane(Edge edge, Group group, char *tag, Real region[])#
build edge group from the plane region. all edges located on of the plane are grouped and the region is recognised as [point1.x point1.y point2.x point2.y]
- Parameters:
edge –
group –
tag –
region –
-
static void getEdgeGroupInCircleRange(Edge edge, Group group, char *tag, Real region[])#
build edges group from the circel region. all edges located in circle are grouped and the region is recognised as [origon.x origon.y radius]
- Parameters:
edge –
group –
tag –
region –
-
static void getEdgeGroupOnCircleRange(Edge edge, Group group, char *tag, Real region[])#
build edges group from the circel region. all edges located on circle are grouped and the region is recognised as [origon.x origon.y radius]
- Parameters:
edge –
group –
tag –
region –
-
static void getEdgeGroupOutCircleRange(Edge edge, Group group, char *tag, Real region[])#
build edges group from the circel region. all edges located out circle are grouped and the region is recognised as [origon.x origon.y radius]
- Parameters:
edge –
group –
tag –
region –
-
static void getEdgeGroupfromElement(Edge edge, Group group, Element element, char *tag, char *tag_A)#
build the edge groups from its parent elements.
- Parameters:
edge –
group –
element –
tag –
tag_A –
-
static void getEdgeGroupBoolUnion(Edge edge, Group group, char **grouptags, const int groupcount)#
bool edge group. ret = A + B
- Parameters:
edge –
group –
grouptags –
groupcount –
-
static void getEdgeGroupBoolIntersection(Edge edge, Group group, char **grouptags, const int groupcount)#
bool edge group. ret = A and B
- Parameters:
edge –
group –
grouptags –
groupcount –
-
static void getEdgeGroupBoolSubtraction(Edge edge, Group group, char **grouptags, const int groupcount)#
bool edge group. ret = A - B
- Parameters:
edge –
group –
grouptags –
groupcount –
-
static void getEdgeGroupfromCZM(Edge edge, Group group, Cohelement cohelement, char *tag, char *tag_A)#
get edge groups from it parent cohesive interface.
- Parameters:
edge –
group –
cohelement –
tag –
tag_A –
-
static void getEdgeGroupfromDFNs(Edge edge, Group group, Cohelement cohelement, DFN dfn, char *tag, char *tag_A)#
get edge groups from import DFNs.
- Parameters:
edge –
group –
cohelement –
dfn –
tag –
tag_A –
-
static void getElementGroupPolygonRange(Element element, Group group, char *tag, std::vector<Vector2> &polygon, std::string type)#
-
static void getCZMgroupInBoxRange(Cohelement cohelement, Group group, char *tag, Real region[])#
-
static void getCZMGoupPolygonRange(Cohelement cohelement, Group group, char *tag, std::vector<Vector2> &polygon, std::string type)#
-
static void getCZMgroupInCircleRange(Cohelement cohelement, Group group, char *tag, Real region[])#
-
static void getCZMgroupOutCircleRange(Cohelement cohelement, Group group, char *tag, Real region[])#
-
static void getCZMgroupOnCircle(Cohelement cohelement, Group group, char *tag, Real region[])#
-
static void getCZMgroupOnPlaneLeft(Cohelement cohelement, Group group, char *tag, Real region[])#
-
static void getCZMgroupOnPlaneRight(Cohelement cohelement, Group group, char *tag, Real region[])#
-
static void getCZMgroupOnPlane(Cohelement cohelement, Group group, char *tag, Real region[])#
-
static void getNodeGroupBoolUnion(Nodal nodal, Group group, char **grouptags, const int groupcount)#
-
static void getNodeGroupBoolIntersect(Nodal nodal, Group group, char **grouptags, const int groupcount)#
-
static void getNodeGroupBoolSubtract(Nodal nodal, Group group, char **grouptags, const int groupcount)#
-
static void getElementGroupBoolUnion(Element element, Group group, char **grouptags, const int groupcount)#
-
static void getElementGroupBoolIntersect(Element element, Group group, char **grouptags, const int groupcount)#
-
static void getElementGroupBoolSubtract(Element element, Group group, char **grouptags, const int groupcount)#
-
static void getCZMGroupBoolUnion(Cohelement cohelement, Group group, char **grouptags, const int groupcount)#
-
static void getCZMGroupBoolIntersect(Cohelement cohelement, Group group, char **grouptags, const int groupcount)#
-
static void getCZMGroupBoolSubtract(Cohelement cohelement, Group group, char **grouptags, const int groupcount)#
-
static void get_cohesive_element_group_gbm(Cohelement cohelement, Group group, Element element, char *tag, char *tag_A, char *tag_B)#
-
static void getNodeGroupfromElement(Nodal nodal, Group group, Element element, char *tag, char *tag_A)#
-
static void get_cohesive_element_group_dfn(Cohelement cohelement, Group group, DFN dfn, char *tag, char *tag_A)#
-
static void getParticleGroupPolygonRange(Particle particle, Group group, char *tag, std::vector<Vector2> &polygon, std::string type)#
-
static void get_particle_group_plane_left(Particle particle, Group group, char *tag, Real region[])#
-
static void get_particle_group_plane_right(Particle particle, Group group, char *tag, Real region[])#
-
static void get_particle_group_circle_inner(Particle particle, Group group, char *tag, Real region[])#
-
static void get_particle_group_circle_outer(Particle particle, Group group, char *tag, Real region[])#
-
static void get_particle_group_bool_union(Particle particle, Group group, char **grouptags, const int groupcount)#
-
static void getNodeGoupInCircleRange(Nodal nodal, Group group, char *tag, Real region[])#
-
class GroupUtils : public OpenFdemAbstract#
- #include <groupUtils.h>
Subclassed by ns_mesh::GroupModule
Public Static Functions
-
static void parseRangeKeywords(FILE *file, Real container[], rangeMethod &range)#
common function to parse the keywords of range.
- Parameters:
file –
container –
range –
-
static void parseRangeKeywords(FILE *file, Real container[], rangeMethod &range, std::vector<Vector2> &polygon)#
-
static void parseRangeKeywords(FILE *file, Real container[], rangeMethod &range, std::vector<Vector2> &polygon, Int size[])#
parse range of mpm.
- Parameters:
file –
container –
range –
polygon –
size –
-
static void pushPolygonGeometryKeywords(FILE *file, Keywords &keyword, std::vector<Vector2> &polygon)#
-
static void pushPolygonGeometryKeywords(FILE *file, Keywords &keyword, std::vector<Vector2> &polygon, Int size[])#
-
static void getRangeMethod(Keywords &keyword, rangeMethod &range)#
get the range method.
- Parameters:
grouptags –
groupcount –
range –
-
static void parseRangeKeywords(FILE *file, Real container[], rangeMethod &range)#
-
class InheritBaryNodeModule : public OpenFdemAbstract, public ns_mesh::MeshModule#
- #include <inherit_barynode.h>
-
class InheritCommonElementModule : public OpenFdemAbstract, public ns_mesh::MeshModule#
- #include <inherit_common_element.h>
-
class InheritCommonNodeModule : public OpenFdemAbstract#
- #include <inherit_common_node.h>
Public Functions
-
class InheritEdgeNodeModule : public OpenFdemAbstract, public ns_mesh::MeshModule#
- #include <inherit_edgenode.h>
Public Static Functions
-
static void copyedgenodegroups(Group group, const int nodalnewid, const int map[])#
copy the nodal groups information of the newly inserted middle edge vertex. The new node will be grouped it its two parent nodes are in the group
- Parameters:
group –
nodalnewid –
map –
-
static void copyedgegroups(Group group, const int nodalnewid, const int map[])#
copy the edge groups information of the newly inserted middle edge vertex. The new node will be grouped it its two parent nodes are in the group
- Parameters:
group –
nodalnewid –
map –
-
static void copyedgenodegroups(Group group, const int nodalnewid, const int map[])#
-
struct Mesh_insert_structure#
- #include <openfdem_mesh_insert.h>
Public Members
-
std::vector<mesh_insert_type> mesh#
-
bool saveSol = false#
-
bool mmgChecked = false#
-
bool fresheleGroup = false#
-
metrictypetype metrictype = metrictypetype::PHASEFIELD#
-
strategytype strategy = strategytype::DEFAULT#
-
meshpathtype meshpath = meshpathtype::ELEMENT#
-
bool mmgMesh = false#
-
std::vector<mesh_insert_type> mesh#
-
struct mesh_insert_type#
- #include <openfdem_mesh_insert.h>
-
class MeshInsertCZMModule : public OpenFdemAbstract, public ns_mesh::MeshUtils#
- #include <mesh_insert_cohesive.h>
Public Functions
-
void mesh_insert_cohesive(Nodal nodal, Cohelement cohelement, Solidmat solidmat, Element element, Edge edge, DFN dfn, Mesh mesh)#
-
void meshInsertCZM(Nodal nodal, Cohelement cohelement, Element element, Edge edge, DFN dfn, Mesh mesh)#
-
void updateElementCouples(Cohelement cohelement, Element element)#
-
void updateCZMnodeList(Nodal nodal, Cohelement cohelement, Edge edge)#
-
void mesh_insert_cohesive(Nodal nodal, Cohelement cohelement, Solidmat solidmat, Element element, Edge edge, DFN dfn, Mesh mesh)#
-
class MeshInsertDEMModule : public OpenFdemAbstract, public ns_mesh::MeshUtils#
- #include <mesh_insert_dems.h>
Public Functions
-
class MeshInsertDFNModule : public OpenFdemAbstract, public ns_mesh::MeshUtils#
- #include <mesh_insert_cohesive_dfn.h>
Public Functions
-
void mesh_insert_cohesive_dfn(Nodal nodal, Cohelement cohelement, Element element, Edge edge, DFN dfn, const char *DFN_tag)#
-
void updateElementCouples(Cohelement cohelement, Element element)#
-
void updateCZMnodeList(Nodal nodal, Cohelement cohelement, Edge edge)#
-
void mesh_insert_cohesive_dfn(Nodal nodal, Cohelement cohelement, Element element, Edge edge, DFN dfn, const char *DFN_tag)#
-
class MeshModule : public OpenFdemAbstract, public ns_mesh::MeshUtils, public ns_mesh::RemeshUtils#
- #include <openfdem_mesh_module.h>
Subclassed by ns_mesh::InheritBaryNodeModule, ns_mesh::InheritCommonElementModule, ns_mesh::InheritEdgeNodeModule, ns_mesh::RemeshBaryGBModule, ns_mesh::RemeshBaryModule, ns_mesh::RemeshNVBModule, ns_mesh::RemeshRGBModule, ns_mesh::RemeshRGModule
-
class MeshUtils : public OpenFdemAbstract#
- #include <mesh_utils.h>
Subclassed by ns_mesh::Delaunay2VoronoiModule, ns_mesh::MeshInsertCZMModule, ns_mesh::MeshInsertDEMModule, ns_mesh::MeshInsertDFNModule, ns_mesh::MeshModule, ns_mesh::RemeshUtils
Public Static Functions
-
static Int getEdgeNumberfromElement(Element element)#
get the total edge count of the import mesh. For quadratic element, we only consider the vertexs, for 1D element, edge count will be 1 (for contact detection)
- Parameters:
element –
- Returns:
-
static inline Int getQuadraticnodeCount(const Int masterid, Element element)#
return the count of vertex of the element. The quadratic nodal will be ignored.
- Parameters:
masterid –
element –
- Returns:
-
static inline void computeElementCoord(Nodal nodal, Element element, const Int indices)#
get the barcentric point of a closed polyhedron.
- Parameters:
nodal –
element –
indices –
-
static inline bool isinBox(Eigen::Vector2d Point, Real region[])#
Returns true if the point p lies inside the rentangle[] with n vertices
- Parameters:
Point –
region –
- Returns:
-
static inline bool isinBox(Vector2 Point, Real region[])#
Returns true if the point p lies inside the rentangle[] with n vertices
- Parameters:
Point –
region –
- Returns:
-
static inline bool isonBox(const Vector2 Point, const Real region[])#
return true if the point is located on the box, which is defined by region.
- Parameters:
Point –
region –
- Returns:
-
static inline bool isoutBox(const Vector2 Point, const Real region[])#
return true if the point is located outside the box, which is defined by region.
- Parameters:
Point –
region –
- Returns:
-
static inline Vector2 rotateSegment(const Vector2 &startPoint, const Vector2 &endPoint, Real rotationAngle)#
-
static inline bool isinCircle(const Eigen::Vector2d Point, const Real region[])#
Returns true if the point p lies inside the circle with n vertices
- Parameters:
Point –
region –
- Returns:
-
static inline bool isinCircle(const Vector2 Point, const Real region[])#
Returns true if the point p lies inside the circle with n vertices
- Parameters:
Point –
region –
- Returns:
-
static inline bool isonCircle(const Vector2 Point, const Real region[])#
Returns true if the point p lies inside the circle with n vertices
- Parameters:
Point –
region –
- Returns:
-
static inline bool isoutCircle(const Vector2 Point, const Real region[])#
Returns true if the point p lies inside the circle with n vertices
- Parameters:
Point –
region –
- Returns:
-
static inline bool isonleftofPlane(const Vector2 Point, const Real region[])#
to check whether the point is on the left of the plane. The plane information is stored in array
- Parameters:
Point –
region –
- Returns:
-
static inline bool isonleftofPlane(const Vector2 Point, const Vector2 p1, const Vector2 p2)#
Returns true if the point p lies inside the circle with n vertices
- Parameters:
Point –
p1 –
p2 –
- Returns:
-
static inline bool isonrightofPlane(const Vector2 Point, const Real region[])#
to check whether the point is on the right of the plane. The plane information is stored in array
- Parameters:
Point –
region –
- Returns:
-
static inline bool isonrightofPlane(const Vector2 Point, const Vector2 p1, const Vector2 p2)#
to check whether the point is on ringt of the plane.
- Parameters:
Point –
p1 –
p2 –
- Returns:
-
static inline bool isonPlane(const Vector2 Point, const Real region[])#
to check whether the point is on the plane. The plane information is stored in array
- Parameters:
Point –
region –
- Returns:
-
static inline bool isonPlane(const Vector2 Point, const Vector2 p1, const Vector2 p2)#
to check whether the point is on the plane.
- Parameters:
Point –
p1 –
p2 –
- Returns:
-
static inline bool isinTriangle(Nodal nodal, UInt i[3], Real coord[2])#
to check whether a point is in the triangle.
- Parameters:
nodal –
i –
coord –
- Returns:
-
static inline bool isinTriangle(Nodal nodal, std::vector<UInt> i, Vector2 coord)#
to check whether a point is in the triangle.
- Parameters:
nodal –
i –
coord –
- Returns:
-
static inline Real PointDistancetoSegment(Vector2 p, Vector2 s1, Vector2 s2)#
- Parameters:
p –
s1 –
s2 –
- Returns:
-
static inline Real LineSlope(Vector2 p1, Vector2 p2)#
get the slope of a line by two points.
- Parameters:
p1 –
p2 –
- Returns:
-
static inline Real intersectedAngle(Real slope1, Real slope2)#
return the intersected angle between two lines,, in radians.
- Parameters:
slope1 –
slope2 –
- Returns:
-
static inline bool doIntersect(Vector2 p1, Vector2 q1, Vector2 p2, Vector2 q2)#
The function that returns true if line segment ‘p1q1’ and ‘p2q2’ intersect.
- Parameters:
p1 –
q1 –
p2 –
q2 –
- Returns:
-
static inline bool isInPolygon(Vector2 polygon[], int n, Vector2 p)#
Returns true if the point p lies inside the polygon[] with n vertices
- Parameters:
polygon –
n –
p –
- Returns:
-
static void updateEdgesCoord(Edge edge, General general, Nodal nodal)#
update the edge coord, length and normal direction after iteration.
- Parameters:
edge –
general –
nodal –
-
static void findEdgeCouplesfromOctree(Edge edge)#
build the element couples and element couples from edge information, the initial boundary will be identified as -1.
- Parameters:
edge –
-
static void updateEdgeDFNs(Edge edge, DFN dfn)#
update the edge DFN information from imported DFN structures.
- Parameters:
edge –
dfn –
-
static void createElementCouplesfromEdge(Nodal nodal, Element element, Edge edge, General general)#
fill the couple and ecouple information from edges.
- Parameters:
element –
edge –
general –
-
static void getEdgesfromElement(Edge edge, Element element, Nodal nodal)#
create edge structures from element information.
- Parameters:
edge –
element –
nodal –
-
static inline Vector2 getEdgeDirection(const Vector2 n1, const Vector2 n2)#
get the direction of the line by two nodes.
- Parameters:
n1 –
n2 –
- Returns:
-
static inline Vector2 getEdgeNormal(const Vector2 n1, const Vector2 n2)#
return the normal vector of a line of n1-n2. The normal direction is towarding to outside
- Parameters:
n1 –
n2 –
- Returns:
-
static inline Real getTriArea(const Vector2 n1, const Vector2 n2, const Vector2 n3)#
get the triangle area from three points which are in anticlockwise.
- Parameters:
n1 –
n2 –
n3 –
- Returns:
-
static inline Real getQuadArea(const Vector2 n1, const Vector2 n2, const Vector2 n3, const Vector2 n4)#
get the quad area by subdividing the plane to several triangles. The input four nodes should be in anticlockwise.
- Parameters:
n1 –
n2 –
n3 –
n4 –
- Returns:
Area of the quad
-
static inline int getCellIndices(Real a, Real b)#
get the interger of the cell id, round value . for example 1.2 => 1 -0.2 => 0
- Parameters:
a –
b –
- Returns:
-
static inline Real getElementArea(Element element, Nodal nodal, const Int indices)#
compute the area of the plane in 3D. the plabe can be triangle or quad
- Parameters:
element –
nodal –
indices –
- Returns:
-
static inline Vector2 getCentricNode(Nodal nodal, const Int list[], const Int n)#
get the barcentric point of an arbitary polyhedrons from node list.
- Parameters:
nodal –
list –
n –
- Returns:
-
static inline bool areEqualEdges(Int arr1[], Int arr2[], const Int N, const Int M)#
to check two arrays are equale.
- Parameters:
arr1 –
arr2 –
N –
M –
- Returns:
-
static inline bool areEqualEdges(Int arr1[], Int arr2[])#
to check the two edges are equal.
- Parameters:
arr1 –
arr2 –
- Returns:
-
static void findAdjacentElements(Nodal nodal, Element element, Mesh mesh, adjacenteletype *elelists)#
find the neighbouring element.
- Parameters:
nodal –
element –
mesh –
elelists –
-
static void freeAdjacentElements(Nodal nodal, adjacenteletype *elelists)#
- Parameters:
nodal –
elelists –
-
static Int findTargetEdgefromMaxMinNodes(Int **array, const UInt size, const UInt idmax, const UInt idmin)#
find the target edge by sorting the maxmuum and minmuum node indices on the edge.
- Parameters:
array –
size –
idmax –
idmin –
- Returns:
-
static void getLumpedMass(Nodal nodal, Element element, Solidmat solidmat, General general)#
get the lumped mass for computing timestep.
- Parameters:
nodal –
element –
solidmat –
general –
-
static void check_rigidWall(Element element, General general, Nodal nodal)#
check the flag of having rigid wall (1D element).
- Parameters:
element –
general –
nodal –
-
static void updateElementsRadius(Element element, Nodal nodal)#
compute the element radius.
- Parameters:
element –
nodal –
-
static void checkNodeOrder(std::vector<Vector2> &nodecoord, Element element, General general)#
check the order of nodes on the element, warning will be given if it is not anticlockwise.
- Parameters:
nodecoord –
element –
general –
-
static void checkQuadraticFlag(Element element, General general)#
check the flag of having quadratic element.
- Parameters:
element –
general –
-
static void meshUpdate(Nodal nodal, Element element, Edge edge, DFN dfn, General general)#
update mesh after the mesh inport or mesh processing.
- Parameters:
nodal –
element –
edge –
dfn –
general –
-
static void updateElementsCoord(Nodal nodal, Element element, General general)#
update element coord.
- Parameters:
nodal –
element –
general –
-
static void updateCZMsCoord(Vector2 *nodecoord, Cohelement cohelement, General general)#
calculate the CZM coord.
- Parameters:
nodecoord –
cohelement –
general –
-
static void updateElementInsertSatate(Element element)#
to check whether the element is inserted.
- Parameters:
element –
-
static void updateElementCharacteristicLength(std::vector<Vector2> &nodecoord, Element element, General general, Openfdem openfdem)#
update the characteristic length of the element, which is used to determine the timestep, remesh metric values.
- Parameters:
nodecoord –
element –
general –
openfdem –
-
static void updateElementsize(std::vector<Vector2> &nodecoord, Element element)#
update the element characteristic size.
- Parameters:
nodecoord –
element –
-
static void findEdgeCouplesbyCells(Element element, Nodal nodal, General general)#
get the edge couples from cell method.
- Parameters:
element –
nodal –
general –
-
static void computeElementQualityValue(Nodal nodal, Element element)#
compute the mesh quality of the element, current is onlt for triangle.
- Parameters:
nodal –
element –
-
static void findQuadraticEdgeCouplesbyCells(Element element, Nodal nodal, General general)#
get the edge couples for quadratic elements.
- Parameters:
element –
nodal –
general –
-
static void getElementsArea(std::vector<Vector2> &nodecoord, Element element)#
calculate the area of arbitary shaped element.
- Parameters:
nodecoord –
element –
-
static void getQuadraticElementArea(std::vector<Vector2> &nodecoord, Element element)#
calculate the area of quadratic element.
- Parameters:
nodecoord –
element –
-
static void getMeshEntities(General general, Nodal nodal, Element element, Edge edge, Entity entity, Solidmat solidmat, Boudary boudary)#
conpute the enetity structure.
- Parameters:
nodal –
element –
entity –
solidmat –
boudary –
-
static void setEntityRigidity(General general, Entity entity, Element element, Solidmat solidmat)#
set the rigidity of the entities.
- Parameters:
general –
entity –
element –
solidmat –
-
static void getEntityElementContainer(General general, Entity entity, Element element)#
get the element on the enetity.
- Parameters:
general –
entity –
element –
-
static void getEntityNodalContainer(General general, Entity entity, Element element, Nodal nodal)#
get the nodal on the entity.
- Parameters:
general –
entity –
element –
nodal –
-
static void getEntityNodalBoundary(General general, Entity entity, Boudary boudary, Nodal nodal)#
get the entity boundary for rigid bodies, each entity can only has one type nodal boundary.
- Parameters:
general –
entity –
boudary –
nodal –
-
static void setEntityDimension(General general, Entity entity, Element element)#
set the dimesnion of the entity.
- Parameters:
general –
entity –
element –
-
static void setNodalRigidity(General general, Nodal nodal, Element element, Solidmat solidmat)#
set the rigidity of nodals.
- Parameters:
general –
nodal –
element –
solidmat –
-
static void computeEntityRigidMass(General general, Entity entity, Nodal nodal, Element element, Solidmat solidmat)#
comput the mass of the rigid entity and assign the mass to nodals.
- Parameters:
general –
entity –
nodal –
element –
solidmat –
-
static void computeEntityRigidInteria(General general, Entity entity, Nodal nodal, Element element, Solidmat solidmat)#
compute the interial of the rigig entity.
- Parameters:
general –
entity –
nodal –
element –
solidmat –
-
static int calTriangleIsoNode(Nodal nodal, Element element, UInt elen, UInt *elelist, UInt inode)#
comput the triangle node.
- Parameters:
nodal –
element –
elen –
elelist –
inode –
- Returns:
-
static void parse_mesh_set(Mesh mesh, Element element, Group group, const char *keyword, const UInt type)#
fill the mesh structure by parsing.
- Parameters:
mesh –
element –
group –
keyword –
type –
-
static void mesh_free(Mesh mesh, const char *keyword)#
free the mesh data after mesh processing.
- Parameters:
mesh –
keyword –
-
static inline Real calTriangleIsoQuality(Nodal nodal, UInt ptr[3])#
compute the mesh quality. Shewchuk J. What is a good linear finite element? interpolation, conditioning, anisotropy, and quality measures (preprint)[J]. University of California at Berkeley, 2002, 2002. quality = 4* sqrt(3)* A/ (sum(l^2)) quality > 0.5, good quality > 0.7, very good
- Parameters:
nodal – pointer toward the nodal structure.
ptr[4] – toward the node id array {i,j,k} for triangles i.
-
static Int getEdgeNumberfromElement(Element element)#
-
class MMGModule : public OpenFdemAbstract, public ns_mmg::mmgUtils#
- #include <mmgProcessmodule.h>
Public Static Functions
-
class mmgUtils : public OpenFdemAbstract, public ns_mesh::RemeshUtils#
- #include <mmg_utilities.h>
Subclassed by ns_mmg::MMGModule
Public Static Functions
-
static inline void mmgFreeIntergration(Intergration intergration)#
-
static inline void mmgFreeIntergration(Intergration intergration)#
-
class RemeshBaryGBModule : public OpenFdemAbstract, public ns_mesh::MeshModule#
- #include <remesh_baryGB.h>
Subdivide the triangle into six sub triangles by inserting the centric point and middle edge point. It will influence the neighbouring elements
-
class RemeshBaryModule : public OpenFdemAbstract, public ns_mesh::MeshModule#
- #include <remesh_barycentric.h>
triangle subdivision by the barycentric point, also termed as triangle red refinement is appliable for arbitary element shapes increases the node count, element count, change the mesh connectivity will not influence the neighbouring elements
- Param general:
pointer toward the general structure.
- Param nodal:
pointer toward the nodal structure.
- Param element:
pointer toward the element structure.
- Param mesh:
pointer toward the mesh structure.
- Param group:
pointer toward the group structure.
- Param meshgroup:
tag of the group need to be splitted.
- Return:
void.
-
class RemeshLocalAMRdynamicModule : public OpenFdemAbstract, public ns_mesh::RemeshUtils#
- #include <localAMR_dynamicRemesh_module.h>
-
class RemeshLocalAMRModule : public OpenFdemAbstract, public ns_mesh::RemeshUtils#
- #include <localAMR_remesh_module.h>
-
class RemeshNVBModule : public OpenFdemAbstract, public ns_mesh::MeshModule#
- #include <remesh_TrefineNVB.h>
triangle subdivision by the edge centric point, also termed as triangle red refinement is appliable for arbitary element shapes increases the node count, element count, change the mesh connectivity
- Param general:
pointer toward the general structure.
- Param nodal:
pointer toward the nodal structure.
- Param element:
pointer toward the element structure.
- Param mesh:
pointer toward the mesh structure.
- Param group:
pointer toward the group structure.
- Param meshgroup:
tag of the group need to be splitted.
- Return:
void.
Public Functions
-
inline RemeshNVBModule()#
-
inline ~RemeshNVBModule()#
-
void remeshNVB(General general, Nodal nodal, Element element, Edge edge, Group group, bool *isMesh)#
-
void remeshNeighbouring(General general, Nodal nodal, Element element, Edge edge, Group group, bool *isMesh)#
Private Members
-
bool *isMeshnode = nullptr#
-
class RemeshRGBModule : public OpenFdemAbstract, public ns_mesh::MeshModule#
- #include <remesh_TrefineRGB.h>
triangle subdivision by the edge centric point, also termed as triangle red refinement is appliable for arbitary element shapes increases the node count, element count, change the mesh connectivity
- Param general:
pointer toward the general structure.
- Param nodal:
pointer toward the nodal structure.
- Param element:
pointer toward the element structure.
- Param mesh:
pointer toward the mesh structure.
- Param group:
pointer toward the group structure.
- Param meshgroup:
tag of the group need to be splitted.
- Return:
void.
Public Functions
-
inline RemeshRGBModule()#
-
inline ~RemeshRGBModule()#
-
void remeshtoRGB(General general, Nodal nodal, Element element, Edge edge, Group group, bool *isMesh)#
-
void remeshNeighbouring(General general, Nodal nodal, Element element, Edge edge, Group group, bool *isMesh)#
-
class RemeshRGModule : public OpenFdemAbstract, public ns_mesh::MeshModule#
- #include <remesh_TrefineRG.h>
triangle subdivision by the edge centric point, also termed as triangle red refinement is appliable for arbitary element shapes increases the node count, element count, change the mesh connectivity
- Param general:
pointer toward the general structure.
- Param nodal:
pointer toward the nodal structure.
- Param element:
pointer toward the element structure.
- Param mesh:
pointer toward the mesh structure.
- Param group:
pointer toward the group structure.
- Param meshgroup:
tag of the group need to be splitted.
- Return:
void.
-
class RemeshUtils : public OpenFdemAbstract, public ns_mesh::MeshUtils#
- #include <remesh_utilities.h>
Subclassed by ns_mesh::MeshModule, ns_mesh::RemeshLocalAMRModule, ns_mesh::RemeshLocalAMRdynamicModule, ns_mmg::mmgUtils
Public Static Functions
-
static void reinitialize_element(Element element, Intergration intergration, Solidmat solidmat, General general)#
reinitialize the element structure, all info will reset.
- Parameters:
element –
intergration –
solidmat –
general –
-
static void reinitialize_general(General general)#
reinitialize the general structure.
- Parameters:
general –
-
static void reinitialize_node(General general, Nodal nodal)#
reinitialize the nodal structure, all info will reset..
- Parameters:
general –
nodal –
-
static void reinitialize_contact(Element element, Contact contact)#
reinitialize the contact structure, all info will reset..
- Parameters:
element –
contact –
-
static void reinitialize_cohesive(Nodal nodal, Cohelement cohelement, Solidmat solidmat, General general, Seismic sesmic)#
reinitialize the cohesive structure, all info will reset..
- Parameters:
nodal –
cohelement –
solidmat –
general –
sesmic –
-
static void InterplorateIsMeshforRemesh(Nodal nodal, Mesh mesh)#
get the ismesh flag of nodes from stored path the path will be refreshed after each time.
- Parameters:
nodal –
mesh –
-
static bool remesh_update_fromNode(General general, Nodal nodal, Mesh mesh)#
to check whether the remesh is required based on node. new node having ismesh will enforce the AMR processing.
- Parameters:
general –
nodal –
mesh –
- Returns:
-
static bool remesh_update_fromElement(General general, Nodal nodal, Element element, Mesh mesh)#
to check whether the remesh is required based on element.
- Parameters:
general –
nodal –
element –
mesh –
- Returns:
-
static bool checkRemeshElement(General general, Nodal nodal, Element element, Mesh mesh, bool *isMesh)#
get the element array need to be remeshed based on mesh flag.
- Parameters:
general –
nodal –
element –
mesh –
isMesh –
- Returns:
-
static bool checkRemeshElementfromPath(General general, Nodal nodal, Element element, Mesh mesh, bool *isMesh)#
get the element array need to be remeshed based on path.
- Parameters:
general –
nodal –
element –
mesh –
isMesh –
- Returns:
-
static void remesh_clearCZMs(Cohelement cohelement)#
clear CZM info.
- Parameters:
cohelement –
-
static void remesh_clearContacts(Contact contact, Element element)#
clear contacts.
- Parameters:
contact –
element –
-
static void remeshUpdatePath(General general, Nodal nodal, Mesh mesh)#
update path.
- Parameters:
general –
nodal –
mesh –
-
static bool remeshUpdateRange(General general, Nodal nodal, Mesh mesh)#
update range.
- Parameters:
general –
nodal –
mesh –
- Returns:
-
static void feedBackNodeGroup(Nodal nodal, Element element, Group group)#
pull back node group.
- Parameters:
nodal –
element –
group –
-
static void feedBackEdgeGroup(Nodal nodal, Edge edge, Group group)#
pull back edge group.
- Parameters:
nodal –
edge –
group –
-
static void InterplorateCZMs(General general, Nodal nodal, Cohelement cohelement, Mesh mesh)#
-
static inline bool checkMeshSwap(Nodal nodal, UInt ptr[4])#
check the element couples to be swaped.
- Parameters:
nodal – pointer toward the nodal structure.
ptr[4] – toward the node id array {i,j,k,m} for triangles i,j, Triangle i is {i,j,k} and Tirangle j is {m,k,j}.
-
static void reinitialize_element(Element element, Intergration intergration, Solidmat solidmat, General general)#
-
class ResplitModule : public OpenFdemAbstract#
- #include <splitCZMsmodule.h>
-
struct voronoi_type#
- #include <mesh_delaunay2Voronoi.h>
-
namespace ns_common
-
namespace ns_mesh
-
namespace ns_mmg#
-
namespace ns_resplitCZMs#
- file mmg_utilities.h
- #include <mesh/localAMR/remesh_utilities.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “external/mmg/libmmg2d.h”#include “mesh/mesh_utils.h”#include “solver/openfdem.h”
- file mmgProcessmodule.h
- #include <mesh/globalAMR/mmg_utilities.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “external/mmg/libmmg2d.h”#include “mesh/mesh_utils.h”#include “solver/openfdem.h”
- file group_module.h
- #include <mesh/group/groupUtils.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “mesh/mesh_utils.h”#include “solver/openfdem.h”
- file groupUtils.h
- #include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “mesh/mesh_utils.h”#include “solver/openfdem.h”
- file openfdem_group.h
- #include “common/openfdem_common.h”
Typedefs
-
typedef struct Group_structure *Group#
-
typedef struct Group_structure *Group#
- file inherit_barynode.h
- #include <openfdem_mesh_module.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file inherit_common_element.h
- #include <openfdem_mesh_module.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file inherit_common_node.h
- #include <openfdem_mesh_module.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file inherit_edgenode.h
- #include <openfdem_mesh_module.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file localAMR_dynamicRemesh_module.h
- #include <algorithm>#include <mesh/localAMR/remesh_utilities.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file localAMR_remesh_module.h
- #include <algorithm>#include <mesh/localAMR/remesh_utilities.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file remesh_barycentric.h
- #include <openfdem_mesh_module.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file remesh_baryGB.h
- #include <openfdem_mesh_module.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file remesh_TrefineNVB.h
- #include <openfdem_mesh_module.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file remesh_TrefineRG.h
- #include <openfdem_mesh_module.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file remesh_TrefineRGB.h
- #include <openfdem_mesh_module.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file remesh_utilities.h
- #include <algorithm>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “mesh/mesh_utils.h”#include “solver/openfdem.h”
- file mesh_delaunay2Voronoi.h
- #include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “mesh/mesh_utils.h”#include “openfdem_mesh_module.h”#include “solver/openfdem.h”
- file mesh_insert_cohesive.h
- #include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “mesh/mesh_utils.h”#include “solver/openfdem.h”
- file mesh_insert_cohesive_dfn.h
- #include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “mesh/mesh_utils.h”#include “solver/openfdem.h”
- file mesh_insert_dems.h
- #include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “mesh/mesh_utils.h”#include “solver/openfdem.h”
- file mesh_utils.h
- #include <algorithm>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “solver/openfdem.h”
- file octree.h
Defines
-
Back_Bottom_Left#
-
Back_Bottom_Right#
-
Front_Bottom_Left#
-
Front_Bottom_Right#
-
Back_Top_Left#
-
Back_Top_Right#
-
Front_Top_Left#
-
Front_Top_Right#
-
EPSILON#
-
MAXENTITIES#
Functions
-
void OctDestroyOctree()#
-
Back_Bottom_Left#
- file openfdem_mesh_insert.h
- #include “common/openfdem_common.h”#include “common/openfdem_enum.h”
Typedefs
-
typedef struct Mesh_insert_structure *Mesh#
-
typedef struct Mesh_insert_structure *Mesh#
- file openfdem_mesh_module.h
- #include <Eigen/Dense>#include <algorithm>#include <inherit_common_node.h>#include <localAMR/remesh_utilities.h>#include <localAMR/localAMR_remesh_module.h>#include <localAMR/localAMR_dynamicRemesh_module.h>#include <mesh_insert_cohesive.h>#include <mesh_insert_cohesive_dfn.h>#include <mesh_insert_dems.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “mesh/mesh_utils.h”#include “solver/openfdem.h”
- file splitCZMsmodule.h
- #include “common/openfdem_abstract.h”#include “external/mmg/libmmg2d.h”#include “solver/openfdem.h”
- dir globalAMR
- dir group
- dir localAMR
- dir mesh
- dir resplitCZMs
- dir src