Geometry class#
-
struct geo_curve_type#
- #include <openfdem_geometry.h>
structure to define 1D closed geometry curve, a assembley of 2D lines.
Note
The order of the line should be anticlockwise, otherwise will generate inverse mesh
-
struct geo_EmbededlineGroups_type#
- #include <openfdem_geometry.h>
structure to define the 1D lines. It contains the information of physcial group, embed type and node list.
-
struct geo_group_type#
- #include <openfdem_geometry.h>
structure of geometry groups.
Public Functions
-
geo_group_type() = default#
-
geo_group_type() = default#
-
struct geo_line_type#
- #include <openfdem_geometry.h>
structure to define the 1D lines. It contains the information of physcial group, embed type and node list.
Public Members
-
char tag[MAXARGC] = "\0"#
-
bool iselement = true#
-
bool tobeReserved = false#
-
bool isembeded = false#
-
int DimTags_n = 0#
-
int *DimTags = nullptr#
-
int layers = 0#
-
int DimTags1_n = 0#
-
int *DimTags1 = nullptr#
-
int DimTags2_n = 0#
-
int *DimTags2 = nullptr#
-
int node_1 = -1#
-
int node_2 = -1#
-
int physicalID = -1#
-
char tag[MAXARGC] = "\0"#
-
struct geo_node_type#
- #include <openfdem_geometry.h>
Public Functions
-
geo_node_type() = default#
-
geo_node_type() = default#
-
struct geo_particles_t#
- #include <openfdem_geometry.h>
structure to create particles in gmsh.
-
struct geo_surface_type#
- #include <openfdem_geometry.h>
structures to define 2D surfaces, all surfaces should be defined by closed curves.
-
struct Geometry_structure#
- #include <openfdem_geometry.h>
Main structure to control the geometry in gmsh.
Public Members
-
int node_num = 0#
-
int line_num = 0#
-
int curve_num = 0#
-
int surface_num = 0#
-
int group_num = 0#
-
int linegroups_num = 0#
-
int order = 1#
-
int recombined = 0#
-
double mesh_size = 0.0#
-
double min_size = 0.0#
-
geo_node_type *node = nullptr#
-
geo_line_type *line = nullptr#
-
geo_curve_type *curve = nullptr#
-
geo_surface_type *surface = nullptr#
-
geo_group_type *group = nullptr#
-
geo_EmbededlineGroups_type *linegroups = nullptr#
-
geo_particles_t particles#
-
int wall_num = 0#
-
char **wallTags#
-
int LineElement_n = 0#
-
char **LineElememtTags#
-
char **LineFlipTags#
-
int node_num = 0#
-
class GeometryModule : public OpenFdemAbstract, public ns_geometry::GeometryUtils#
- #include <openfdem_geometry_module.h>
Public Static Functions
-
static void push_geometry_square(General general, Geometry geometry, OperationType embed_flag)#
-
static void push_geometry_polygon(General general, Geometry geometry, OperationType embed_flag)#
-
static void push_geometry_table(General general, Geometry geometry, OperationType embed_flag)#
-
static void push_geometry_circle(General general, Geometry geometry, OperationType embed_flag)#
-
static void push_geometry_ellipse(General general, Geometry geometry, OperationType embed_flag)#
-
static void pushGeometryLineGroups(General general, Geometry geometry, const Int groupcount, char **grouptags)#
-
static void getGeoNodeGroupInBoxRange(Geometry geometry, char *tag, double x_lef, double x_rig, double y_bot, double y_top)#
-
static void getGeoNodeGroupOnBoxRange(Geometry geometry, char *tag, double x_lef, double x_rig, double y_bot, double y_top)#
-
static void getGeoNodeGroupOutBoxRange(Geometry geometry, char *tag, double x_lef, double x_rig, double y_bot, double y_top)#
-
static void getGeoNodeGroupOnPlaneLeft(Geometry geometry, char *tag, double x1, double y1, double x2, double y2)#
-
static void getGeoNodeGroupOnPlaneRight(Geometry geometry, char *tag, double x1, double y1, double x2, double y2)#
-
static void getGeoNodeGroupOnPlane(Geometry geometry, char *tag, double x1, double y1, double x2, double y2)#
-
static void getGeoNodeGroupInCircleRange(Geometry geometry, char *tag, double x0, double y0, double radius)#
-
static void getGeoNodeGroupOutCircleRange(Geometry geometry, char *tag, double x0, double y0, double radius)#
-
static void getGeoNodeGroupOnCircle(Geometry geometry, char *tag, double x0, double y0, double radius)#
-
static void gmsh_api(Openfdem openfdem, Geometry geometry, char **argv, char *keyword, int write_flag)#
gmsh interface to call api and do mesh.
- Parameters:
openfdem –
geometry –
argv –
keyword –
write_flag –
-
static void geometry_free(Geometry geometry)#
free up all variables in geometry.
- Parameters:
geometry –
-
static void createRealisticDFNs(General general, Geometry geometry)#
create realistic DFNs from image.
- Parameters:
general –
geometry –
-
static void pushRandomParticles(General general, Geometry geometry, UInt nParameters, char **parameters)#
push the particles from geometry to particle
- Parameters:
general –
geometry –
nParameters –
parameters –
-
static inline void newParticle(Geometry geometry, Real &Newx, Real &Newy, Real &Newr, gsl_rng *r)#
create a new particle.
- Parameters:
geometry –
Newx –
Newy –
Newr –
r –
-
static bool isOverlap(Geometry geometry, Real Newx, Real Newy, Real Newr)#
to check the particle is overlapped.
- Parameters:
geometry –
Newx –
Newy –
Newr –
- Returns:
-
static void randomParticles(Geometry geometry)#
create random particles for particulate DEM.
- Parameters:
general –
geometry –
nParameters –
parameters –
-
static void importParticles(General general, Geometry geometry, char *keyword)#
import particles from pfc.
- Parameters:
general –
geometry –
keyword –
-
static void addGeometryDFNTags(General general, Geometry geometry, const Int groupcount, char **grouptags)#
add the list of element sets to determine the 2d elements are shells, walls, and not DFNs. DFNs are also 2D elements, and are imported by default. for .inp mesh only
- Attention
This function should be called before the mesh is imported.
- Parameters:
general –
geometry –
groupcount –
grouptags –
-
static void addGeometryFlipTags(General general, Geometry geometry, const Int groupcount, char **grouptags)#
to flip the direction of 2D wall. The wall direction to act with entities or particles should be determined manually. The default is postive to counter clockwise of the plane, the node list will be reversed when this function is called.
\attenion This function should be called before the mesh info is imported.
- Parameters:
general –
geometry –
groupcount –
grouptags –
-
static void push_geometry_square(General general, Geometry geometry, OperationType embed_flag)#
-
class GeometryUtils : public OpenFdemAbstract, public MeshUtils#
- #include <geometry_utils.h>
Subclassed by ns_geometry::GeometryModule
Public Static Functions
-
static bool isLinesWellIntersection(Geometry geometry, Real container[], bool isforJsets)#
do dfn quality check for jset, joint, DFN and rDFN tools.
- Parameters:
geometry –
container –
- Returns:
-
static void parseDFNs(General general, Real dip[], Real length[], Int &count, Int &method, Real &p21, Real &p10, random_method &dip_method, random_method &length_method)#
-
static bool isLinesWellIntersection(Geometry geometry, Real container[], bool isforJsets)#
-
struct Jset_data#
- #include <geometry_utils.h>
Public Functions
-
inline Jset_data()#
Public Members
-
random_method dip_method = random_method::RANDOM_NULL#
-
random_method space_method = random_method::RANDOM_NULL#
-
random_method trace_method = random_method::RANDOM_NULL#
-
random_method gap_method = random_method::RANDOM_NULL#
-
bool isNonpersistent = false#
-
bool useUserdefinedStartPoint = false#
-
inline Jset_data()#
-
namespace ns_common
-
namespace ns_geometry#
-
namespace ns_mesh#
- file geometry_utils.h
- #include <algorithm>#include <external/gsl/gsl_randist.h>#include <external/gsl/gsl_rng.h>#include <mesh/mesh_utils.h>#include “common/openfdem_abstract.h”#include “solver/openfdem.h”
- file openfdem_geometry.h
- #include “common/openfdem_common.h”
Typedefs
-
typedef struct Geometry_structure *Geometry#
Enums
-
enum class GroupType#
Values:
-
enumerator NOT#
-
enumerator CIRCLEON#
-
enumerator CIRCLEIN#
-
enumerator CIRCLEOUT#
-
enumerator PLANEON#
-
enumerator PLANELEFT#
-
enumerator PLANERIGHT#
-
enumerator RETANGULARON#
-
enumerator RETANGULARIN#
-
enumerator RETANGULAROUT#
-
enumerator FROMLINETAGS#
-
enumerator FROMSURFACETAGS#
-
enumerator NOT#
-
typedef struct Geometry_structure *Geometry#
- file openfdem_geometry_module.h
- #include <common/openfdem_macros.h>#include <geometry_utils.h>#include “common/memory_manager.h”#include “common/openfdem_abstract.h”#include “common/openfdem_message.h”#include “external/gsl/gsl_randist.h”#include “external/gsl/gsl_rng.h”#include “mesh/mesh_utils.h”#include “solver/openfdem.h”
- dir geometry
- dir src