Mesh processing class#

struct _oct_node#
#include <octree.h>

Public Members

double xmin#
double xmax#
double ymin#
double ymax#
double zmin#
double zmax#
double xmid#
double ymid#
double zmid#
int *entities#
int nbentities#
int cnodes[8]#
struct _oct_node *nodes[8]#
struct adjacenteletype#
#include <mesh_utils.h>

Public Members

UInt elen#
UInt *ele#
bool onedge#
class Delaunay2VoronoiModule : public OpenFdemAbstract, public ns_mesh::MeshUtils#

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

void freeupVoronoi(Nodal nodal, Element element, Edge edge, Group group)#

free up the Voronoi information.

Parameters:
  • nodal

  • element

  • edge

  • group

void resetVoronoi(Nodal nodal, Element element)#

reset the Voronoi information.

Parameters:
  • nodal

  • element

Private Members

Int cornercount#
Int nodecount#
Int elementcount#
voronoi_type *Voronoi#
bool *isBoundary#
bool *hasVoronoied#
std::vector<node_type> voronoinode#
std::vector<element_type> voronoieles#
std::vector<Real> mass#
std::vector<Vector2> coord#
std::vector<Vector2> coord0#
std::vector<Vector2> ecoord#
std::vector<Real> area#
std::vector<Real> energy#
struct group_cohelement_t#
#include <openfdem_group.h>

Public Functions

group_cohelement_t() = default#
void clear()#

Public Members

std::string tag#
UInt size = 0#
std::vector<UInt> cohele#
struct group_edge_t#
#include <openfdem_group.h>

Public Functions

group_edge_t() = default#
void clear()#

Public Members

std::string tag#
edgegrouptype type = edgegrouptype::SQUAREIN#
Real range[RANGE_SIZE] = {0., 0., 0., 0.}#
Int idrange[ID_RANGE_SIZE] = {0, 0}#
UInt size = 0#
UInt AMRsize = 0#
UInt AMRinitialsize = 0#
std::vector<UInt> AMRnode0#
std::vector<UInt> AMRnode1#
std::vector<UInt> AMRinitialnode0#
std::vector<UInt> AMRinitialnode1#
std::vector<UInt> edge#
struct group_element_t#
#include <openfdem_group.h>

Public Functions

group_element_t() = default#
void clear()#

Public Members

std::string tag#
elementgrouptype type = elementgrouptype::FROMMESH#
Real range[RANGE_SIZE] = {0., 0., 0., 0.}#
UInt size = 0#
UInt AMRsize = 0#
std::vector<UInt> ele#
struct group_gbm_t#
#include <openfdem_group.h>

Public Functions

group_gbm_t() = default#
void clear()#

Public Members

std::string tag#
Real ratio = 0.0#
UInt size = 0#
std::vector<UInt> ele#
struct group_mpmpoints_t#
#include <openfdem_group.h>

Public Functions

group_mpmpoints_t() = default#
void clear()#

Public Members

std::string tag#
UInt size = 0#
std::vector<UInt> points#
struct group_node_t#
#include <openfdem_group.h>

Public Functions

group_node_t() = default#
void clear()#

Public Members

std::string tag#
nodalgrouptype type = nodalgrouptype::DEFAULT#
Real range[RANGE_SIZE] = {0., 0., 0., 0.}#
Int idrange[ID_RANGE_SIZE] = {0, 0}#
UInt size = 0#
UInt AMRsize = 0#
std::vector<UInt> AMRnode#
std::vector<UInt> node#
struct group_particle_t#
#include <openfdem_group.h>

Public Functions

group_particle_t() = default#
void clear()#

Public Members

std::string tag#
Real range[RANGE_SIZE] = {0., 0., 0., 0.}#
UInt size = 0#
std::vector<UInt> particle#
struct Group_structure#
#include <openfdem_group.h>

Public Functions

void resize(std::string type, Int size, Int initialsize = 0)#
void clear()#

Public Members

UInt ng_node = 0#
UInt ng_ele = 0#
UInt ng_edge = 0#
UInt ng_cohele = 0#
UInt ng_gbm = 0#
UInt ng_particle = 0#
UInt ng_mpmpoint = 0#
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#
UInt rgbm_size_x = 0#
UInt rgbm_size_y = 0#
std::vector<Int> rgbm_grey_level#
Real rgbm_pixel_size = 0.0#
Real rgbm_x0 = 0.0#
Real rgbm_y0 = 0.0#
class GroupModule : public OpenFdemAbstract, public ns_mesh::GroupUtils#
#include <group_module.h>

Public Functions

inline GroupModule()#
inline ~GroupModule()#

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 getEdgeGroupOnBox(Edge edge, Group group, char *tag, Real region[])#
static void getEdgeGroupOutBoxRange(Edge edge, Group group, char *tag, Real 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 getElementGroupInBoxRange(Element element, Group group, char *tag, Real region[])#
static void getElementGroupPolygonRange(Element element, Group group, char *tag, std::vector<Vector2> &polygon, std::string type)#
static void getElementGroupOnPlaneLeft(Element element, Group group, char *tag, Real region[])#
static void getElementGroupOnPlaneRight(Element element, Group group, char *tag, Real region[])#
static void getElementGroupOnPlane(Element element, Group group, char *tag, Real region[])#
static void getElementGroupInCircleRange(Element element, Group group, char *tag, Real region[])#
static void getElementGroupOutCircleRange(Element element, Group group, char *tag, Real region[])#
static void getElementGroupOnCircle(Element element, Group group, char *tag, Real region[])#
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 push_gbm(FILE *file, Element element, Nodal nodal, Group group, Int grain_n)#
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 Parser_rgbm(General general, Group group, char *keyword)#
static void push_rgbm(FILE *file, Element element, Nodal nodal, Group group, Int grain_n)#
static void get_cohesive_element_group_dfn(Cohelement cohelement, Group group, DFN dfn, char *tag, char *tag_A)#
static void get_particle_group_square(Particle particle, Group group, char *tag, Real region[])#
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_plane(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_circle(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 get_particle_group_bool_intersect(Particle particle, Group group, char **grouptags, const int groupcount)#
static void get_particle_group_bool_subtract(Particle particle, Group group, char **grouptags, const int groupcount)#
class GroupUtils : public OpenFdemAbstract#
#include <groupUtils.h>

Subclassed by ns_mesh::GroupModule

Public Functions

inline GroupUtils()#
inline ~GroupUtils()#

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 pushSquareKeywords(Keywords &keyword, Real container[], Int size[] = {})#
static void pushCircleKeywords(Keywords &keyword, Real container[], Int size[] = {})#
static void pushPlaneKeywords(Keywords &keyword, Real container[])#
static void pushCircleGeometryKeywords(FILE *file, Real container[])#
static void pushEllipseGeometryKeywords(FILE *file, Real container[])#
static void pushArcGeometryKeywords(FILE *file, Real container[])#
static void pushPlaneKeywords(FILE *file, Real container[])#
static void pushSquareKeywords(FILE *file, Real container[])#
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 chechMeshGroups(Group group, char *tag, std::string MeshType)#
class InheritBaryNodeModule : public OpenFdemAbstract, public ns_mesh::MeshModule#
#include <inherit_barynode.h>

Public Static Functions

static void copybarynodegroups(Group group, const int nodalnewid, const int map[])#
static void copybarynodaldata(General general, Nodal nodal, Group group, const int nodalnewid, const int map[])#
static void inherit_bary_node(General general, Nodal nodal, Group group, const int nodalnewid, const int map[])#
class InheritCommonElementModule : public OpenFdemAbstract, public ns_mesh::MeshModule#

Public Static Functions

static void copyelementgroups(Group group, const UInt neweleid, const UInt oldeleid)#
static void copyelementdata(General general, Element element, Group group, UInt neweleid, UInt oldeleid)#
static void inherit_common_element(General general, Element element, Group group, UInt neweleid, UInt oldeleid)#
class InheritCommonNodeModule : public OpenFdemAbstract#

Public Functions

void copyNodalgroups(General general, Nodal nodal, Group group)#
void copyNodaldata(General general, Nodal nodal)#
void copyNodalboundary(General general, Nodal nodal, Boudary boudary)#
void copyNodalHydroboundary(General general, Nodal nodal, Boudary boudary)#
void copyNodalThermalboundary(General general, Nodal nodal, Boudary boudary)#
void copyNodalBlastboundary(General general, Nodal nodal, Boudary boudary)#
void inherit_common_node(General general, Nodal nodal, Element element, Boudary boudary, Group group)#
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 copyedgenodaldata(General general, Nodal nodal, Group group, const int nodalnewid, const int map[])#

initialize and inherit the node data for the newly midlle edge node.

Parameters:
  • general

  • nodal

  • group

  • nodalnewid

  • map

static void inherit_edgenode(General general, Nodal nodal, Element element, Group group, const int nodalnewid, const int map[])#

main function to excute the edge node inheritance.

Parameters:
  • general

  • nodal

  • element

  • group

  • nodalnewid

  • map

struct Mesh_insert_structure#

Public Functions

void resize(Int size, Int initialsize = 0)#
void clear()#

Public Members

UInt n_mesh = 0#
std::vector<mesh_insert_type> mesh#
Real tol_size = 0.3e-3#
bool saveSol = false#
bool mmgChecked = false#
bool fresheleGroup = false#
Real hMax = 4e-3#
Real hMin = 5e-5#
Real minthreshold = 0.8#
Real maxthreshold = 1.0#
metrictypetype metrictype = metrictypetype::PHASEFIELD#
strategytype strategy = strategytype::DEFAULT#
meshpathtype meshpath = meshpathtype::ELEMENT#
bool mmgMesh = false#
std::vector<Real> metric#
std::vector<Real> calmetric#
Real buffer = 4.0#
Real range[RANGE_SIZE] = {0.0, 0.0, 0.0, 0.0}#
UInt nvertex = 0#
std::vector<int> vertex#
UInt nedge = 0#
std::vector<Int> edges#
UInt npath = 0#
std::vector<Vector2> path#
struct mesh_insert_type#

Public Functions

mesh_insert_type() = default#
void clear()#

Public Members

std::string tag#
mesh_enum type = mesh_enum::INSERT#
UInt size = 0#
std::vector<UInt> ele#
class MeshInsertCZMModule : public OpenFdemAbstract, public ns_mesh::MeshUtils#

Public Functions

void mesh_insert_cohesive(Nodal nodal, Cohelement cohelement, Solidmat solidmat, Element element, Edge edge, DFN dfn, Mesh mesh)#
void markNeighbouringElements(Element element, Edge edge, 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)#

Public Members

UInt nodalnewid#
UInt cohesive_num#
UInt meshgroup#
bool *is_face_inserted#
bool *is_node_occupied#
class MeshInsertDEMModule : public OpenFdemAbstract, public ns_mesh::MeshUtils#
#include <mesh_insert_dems.h>

Public Functions

void mesh_insert_dems(Nodal nodal, Element element, Edge edge, Mesh mesh)#
void markNeighbouringElements(Element element, Edge edge, Mesh mesh)#
void meshInsertDEMs(Nodal nodal, Element element, Edge edge, Mesh mesh)#

Public Members

UInt nodalnewid#
UInt meshgroup#
bool *is_node_occupied#
class MeshInsertDFNModule : public OpenFdemAbstract, public ns_mesh::MeshUtils#

Public Functions

void mesh_insert_cohesive_dfn(Nodal nodal, Cohelement cohelement, Element element, Edge edge, DFN dfn, const char *DFN_tag)#
void markDFNnodes(DFN dfn, Nodal nodal, Edge edge, const char *DFN_tag)#
void meshInsertCZM(Nodal nodal, Cohelement cohelement, Element element, Edge edge, DFN dfn)#
void updateElementCouples(Cohelement cohelement, Element element)#
void updateCZMnodeList(Nodal nodal, Cohelement cohelement, Edge edge)#

Public Members

UInt nodalnewid#
UInt cohesive_num#
UInt meshgroup#
Int *nodecontainer[2]#
bool *isplaneleft = nullptr#
bool *isinsertededge = nullptr#
Vector2 p1#
Vector2 p2#
class MeshModule : public OpenFdemAbstract, public ns_mesh::MeshUtils, public ns_mesh::RemeshUtils#

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 isinStrictBox(Vector2 Point, Real region[])#
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 isInPolygon(std::vector<Vector2> &polygon, Vector2 &point)#
static inline bool isOnPolygon(std::vector<Vector2> &polygon, Vector2 &point)#
static inline bool isOutPolygon(std::vector<Vector2> &polygon, Vector2 &point)#
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 bool onSegment(Vector2 p, Vector2 q, Vector2 r)#
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 int orientation(Vector2 p, Vector2 q, Vector2 r)#
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(Real x1, Real y1, Real x2, Real y2, Real x3, Real y3)#
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 inline int getCellid(Real a, Real b)#

get the intergar cell id.

Parameters:
  • a

  • b

Returns:

class MMGModule : public OpenFdemAbstract, public ns_mmg::mmgUtils#
#include <mmgProcessmodule.h>

Public Functions

inline MMGModule()#
inline ~MMGModule()#

Public Static Functions

static void Openfdem_mmg(Openfdem openfdem)#
static void processNodalgroup(Nodal nodal, Group group, Mesh mesh, Element element)#
static void processEdgegroup(Group group, Mesh mesh, Edge edge, Element element)#
static void processElementgroup(Group group, Element element, Mesh mesh)#
static void flushMaterials(Element element, Solidmat solidmat, Group group)#
static void set_mmg_parameters(General general, Mesh mesh, UInt keywordcount, char **keywords)#
class mmgUtils : public OpenFdemAbstract, public ns_mesh::RemeshUtils#
#include <mmg_utilities.h>

Subclassed by ns_mmg::MMGModule

Public Functions

inline mmgUtils()#
inline ~mmgUtils()#

Public Static Functions

static void check_compatibility(General general, Mesh mesh)#
static void mark_remesh(Mesh mesh, bool *isMesh)#
static void mmgFreeNodals(Nodal nodal)#
static inline void mmgFreeIntergration(Intergration intergration)#
static void mmgFreeElements(Element element)#
static void mmgFreeContacts(Contact contact, Element element)#
static void mmgFreeEdges(Edge edge)#
static void initializeSavefiles(General general, char *fileout, char *solout)#
static void processNodaltoMMG(Nodal nodal, Element element, MMG5_pMesh mmgMesh)#
static void processElementtoMMG(Element element, MMG5_pMesh mmgMesh)#
static void processEdgestoMMG(Mesh mesh, MMG5_pMesh mmgMesh)#
static void processNodaltoOpenFDEM(Nodal nodal, MMG5_pMesh mmgMesh, Mesh mesh)#
static void processElementtoOpenFDEM(Element element, MMG5_pMesh mmgMesh)#
static void processEdgestoOpenFDEM(Mesh mesh, MMG5_pMesh mmgMesh)#
static void processSolstoOpenFDEM(Mesh mesh, MMG5_pMesh mmgMesh, MMG5_pSol sol)#
static void computeMMGMetric(Nodal nodal, Element element, Intergration intergration, Mesh mesh)#
static void computeMMGMetricforCZMs(Nodal nodal, Element element, Mesh mesh)#
static void judgeMMGcriterion(Mesh mesh, Nodal nodal)#
static void pullEdges(Mesh mesh, Element element, Nodal nodal, DFN dfn)#
static void InterplorateIsMesh(Nodal nodal, Element element, Mesh mesh)#
struct oct_data#
#include <octree.h>

Public Members

double x#
double y#
double z#
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

Public Functions

inline RemeshBaryGBModule()#
inline ~RemeshBaryGBModule()#
void remeshtobaryGB(General general, Nodal nodal, Element element, Edge edge, Group group, bool *isMesh)#
void remeshNeighbouring(General general, Nodal nodal, Element element, Group group, bool *isMesh)#
void remesh_baryGB(General general, Nodal nodal, Element element, Edge edge, Group group, Boudary boudary, bool *isMesh)#

Private Members

UInt node2element[18] = {3, 0, 6, 0, 4, 6, 4, 1, 6, 1, 5, 6, 5, 2, 6, 2, 3, 6}#
Int **midPointonEdge = nullptr#
Int _MAX_EDGE#
Int edgecount = 0#
UInt i1new[7]#
UInt elementnewid#
UInt nodalnewid#
class RemeshBaryModule : public OpenFdemAbstract, public ns_mesh::MeshModule#

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.

Public Functions

inline RemeshBaryModule()#
inline ~RemeshBaryModule()#
void remesh_barycentric(General general, Nodal nodal, Element element, Group group, bool *isMesh)#

Private Members

UInt node2element[9] = {0, 1, 3, 1, 2, 3, 2, 0, 3}#
class RemeshLocalAMRdynamicModule : public OpenFdemAbstract, public ns_mesh::RemeshUtils#

Public Static Functions

static void Openfdem_dynamicAMR(Openfdem openfdem)#

local AMR, will not clear the current mesh, not suggest. use with caution.

Parameters:

openfdem

class RemeshLocalAMRModule : public OpenFdemAbstract, public ns_mesh::RemeshUtils#

Public Static Functions

static void Openfdem_AMR(Openfdem openfdem)#

local AMR scheme, will clear the cuurrent mesh. Suggested method.

Parameters:

openfdem

class RemeshNVBModule : public OpenFdemAbstract, public ns_mesh::MeshModule#

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)#
void remeshRGB(General general, Nodal nodal, Element element, Edge edge, Group group, bool *isMesh)#
void remesh_TrefineNVB(General general, Nodal nodal, Element element, Edge edge, Group group, bool *isMesh)#

Private Members

Int nodelist_a[12] = {3, 0, 2, 0, 4, 1, 0, 1, 5, 5, 2, 0}#
Int nodelist_b[12] = {3, 0, 1, 0, 4, 1, 1, 5, 2, 2, 3, 1}#
Int nodelist_c[12] = {3, 0, 2, 0, 4, 2, 1, 5, 2, 4, 1, 2}#
Int **midPointonEdge = nullptr#
Int _MAX_EDGE#
Int edgecount = 0#
bool *isMeshnode = nullptr#
UInt i1new[6]#
UInt elementnewid#
UInt nodalnewid#
class RemeshRGBModule : public OpenFdemAbstract, public ns_mesh::MeshModule#

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)#
void remeshRGB(General general, Nodal nodal, Element element, Edge edge, Group group, bool *isMesh)#
void remesh_TrefineRGB(General general, Nodal nodal, Element element, Edge edge, Group group, bool *isMesh)#

Private Members

UInt node2element[9] = {3, 0, 2, 4, 1, 0, 5, 2, 1}#
Int **midPointonEdge = nullptr#
Int _MAX_EDGE#
Int edgecount = 0#
bool *isMeshnode = nullptr#
UInt i1new[6]#
UInt elementnewid#
UInt nodalnewid#
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.

Public Functions

inline RemeshRGModule()#
inline ~RemeshRGModule()#
void remeshtoGB(General general, Nodal nodal, Element element, Edge edge, Group group, bool *isMesh)#
void remeshNeighbouring(General general, Nodal nodal, Element element, Group group, bool *isMesh)#
void remesh_TrefineRG(General general, Nodal nodal, Element element, Edge edge, Group group, bool *isMesh)#

Private Members

Int node2element[9] = {3, 0, 2, 4, 1, 0, 5, 2, 1}#
Int **midPointonEdge = nullptr#
Int _MAX_EDGE#
Int edgecount = 0#
Int i1new[6]#
Int elementnewid#
Int nodalnewid#
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_clearElement(Element element)#

clear element info.

Parameters:

element

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 remesh_corsenElement(Element element)#

set back to initial mesh.

Parameters:

element

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 flushBoundary(Nodal nodal, Element element, Group group, Boudary boudary)#
static void mark_remesh(Mesh mesh, bool *isMesh)#
static void InterploratePhasefield(Nodal nodal, Element element, Mesh mesh)#
static void InterplorateCZMs(General general, Nodal nodal, Cohelement cohelement, Mesh mesh)#
static void InterplorateIsMesh(Nodal nodal, Element element, Mesh mesh)#
static void AMR_prepare(Element element, Group group, Nodal nodal)#
static void moveNode(General general, Nodal nodal, Element element, Mesh mesh)#
static void AMR_initialize(Nodal nodal, Element element, Edge edge, Group group)#
static void remesh_check(Nodal nodal, Mesh mesh, Element element, Intergration intergration)#
static void swapMesh(General general, Nodal nodal, Element element)#
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 inline Int findCoupleEdge(Element element, UInt ielem, UInt jelem)#

get the edge id which is contacted with element ielem.

Parameters:
  • element – pointer toward the element structure.

  • ielem – and jelem are contact element couples.

static inline void set_amr_parameters(General general, Mesh mesh, UInt keywordcount, char **keywords)#
class ResplitModule : public OpenFdemAbstract#
#include <splitCZMsmodule.h>

Public Functions

inline ResplitModule()#
inline ~ResplitModule()#

Public Static Functions

static void check_compatibility(General general, Mesh mesh)#
static void mark_remesh(Mesh mesh, bool *isMesh)#
static void mmgFreeNodals(Nodal nodal)#
static void mmgFreeElements(Element element)#
static void mmgFreeContacts(Contact contact, Element element)#
static void initializeSavefiles(General general, char *fileout, char *solout)#
static void processNodaltoMMG(Nodal nodal, MMG5_pMesh mmgMesh)#
static void processElementtoMMG(Element element, MMG5_pMesh mmgMesh)#
static void processEdgestoMMG(Mesh mesh, MMG5_pMesh mmgMesh)#
static void processNodaltoOpenFDEM(Nodal nodal, MMG5_pMesh mmgMesh)#
static void processElementtoOpenFDEM(Element element, MMG5_pMesh mmgMesh)#
static void processEdgestoOpenFDEM(Mesh mesh, MMG5_pMesh mmgMesh)#
static void processSolstoOpenFDEM(Mesh mesh, MMG5_pMesh mmgMesh, MMG5_pSol sol)#
static void Openfdem_resplitCZMs(Openfdem openfdem)#
static void reinitialize_element(Element element, Intergration intergration, Solidmat solidmat, General general)#
static void reinitialize_general(General general)#
static void reinitialize_node(General general, Nodal nodal)#
static void reinitialize_contact(Element element, Contact contact)#
static void processNodalgroup(Nodal nodal, Group group, Mesh mesh, Element element)#
static void processElementgroup(Group group, Element element, Mesh mesh)#
static void flushBoundary(Nodal nodal, Element element, Group group, Boudary boudary)#
static void flushMaterials(Element element, Solidmat solidmat, Group group)#
static void computeMMGMetric(Nodal nodal, Element element, Intergration intergration, Mesh mesh)#
static void judgeMMGcriterion(Mesh mesh, Nodal nodal)#
static void set_mmg_parameters(General general, Mesh mesh, UInt keywordcount, char **keywords)#
struct voronoi_type#

Public Members

Int n_e#
Int *ele#
bool isOnBoundary#
bool isCorner#
Int clue[2]#
Int connect#
Int edge#
namespace ns_common
namespace ns_mesh
namespace ns_mmg#
namespace ns_resplitCZMs#
file 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 mmgProcessmodule.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 “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#
file inherit_barynode.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 “common/memory_manager.h”
#include “common/openfdem_abstract.h”
#include “common/openfdem_message.h”
#include “solver/openfdem.h”
file inherit_common_node.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 “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 “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 “common/memory_manager.h”
#include “common/openfdem_abstract.h”
#include “common/openfdem_message.h”
#include “solver/openfdem.h”
file remesh_barycentric.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 “common/memory_manager.h”
#include “common/openfdem_abstract.h”
#include “common/openfdem_message.h”
#include “solver/openfdem.h”
file remesh_TrefineNVB.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 “common/memory_manager.h”
#include “common/openfdem_abstract.h”
#include “common/openfdem_message.h”
#include “solver/openfdem.h”
file remesh_TrefineRGB.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#

Typedefs

typedef struct _oct_node oct_node#

Functions

void OctCreateOctree(double min[3], double max[3], oct_data *Tab, int nbentities)#
void OctDestroyOctree()#

Variables

oct_node *root#
oct_node *leafs#
int nbpointers#
int **ipointer#
oct_node **opointer#
int nbleafs#
file openfdem_mesh_insert.h
#include “common/openfdem_common.h”
#include “common/openfdem_enum.h”

Typedefs

typedef struct Mesh_insert_structure *Mesh#
file openfdem_mesh_module.h
#include <Eigen/Dense>
#include <algorithm>
#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