chrono::fea::ChMeshFileLoader Class Reference

Description

Collection of mesh file loader utilities.

#include <ChMeshFileLoader.h>

Static Public Member Functions

static void FromTetGenFile (std::shared_ptr< ChMesh > mesh, const char *filename_node, const char *filename_ele, std::shared_ptr< ChContinuumMaterial > my_material, ChVector<> pos_transform=VNULL, ChMatrix33<> rot_transform=ChMatrix33<>(1))
 Load tetrahedrons from .node and .ele files as saved by TetGen. More...
 
static void FromAbaqusFile (std::shared_ptr< ChMesh > mesh, const char *filename, std::shared_ptr< ChContinuumMaterial > my_material, std::vector< std::vector< std::shared_ptr< ChNodeFEAbase > > > &node_sets, ChVector<> pos_transform=VNULL, ChMatrix33<> rot_transform=ChMatrix33<>(1), bool discard_unused_nodes=true)
 Load tetrahedrons, if any, saved in a .inp file for Abaqus. More...
 
static void ANCFShellFromGMFFile (std::shared_ptr< ChMesh > mesh, const char *filename, std::shared_ptr< ChMaterialShellANCF > my_material, std::vector< double > &node_ave_area, std::vector< int > &BC_nodes, ChVector<> pos_transform=VNULL, ChMatrix33<> rot_transform=ChMatrix33<>(1), double scaleFactor=1, bool printNodes=false, bool printElements=false)
 

Member Function Documentation

void chrono::fea::ChMeshFileLoader::ANCFShellFromGMFFile ( std::shared_ptr< ChMesh mesh,
const char *  filename,
std::shared_ptr< ChMaterialShellANCF my_material,
std::vector< double > &  node_ave_area,
std::vector< int > &  BC_nodes,
ChVector<>  pos_transform = VNULL,
ChMatrix33<>  rot_transform = ChMatrix33<>(1),
double  scaleFactor = 1,
bool  printNodes = false,
bool  printElements = false 
)
static
Parameters
meshdestination mesh
filenamecomplete filename
my_materialmaterial to be given to the shell
node_ave_areaoutput the average area of the nodes
BC_nodesmaterial to be given to the shell
pos_transformoptional displacement of imported mesh
rot_transformoptional rotation/scaling of imported mesh
scaleFactorimport scale factor
printNodesdisplay the imported nodes
printElementsdisplay the imported elements
void chrono::fea::ChMeshFileLoader::FromAbaqusFile ( std::shared_ptr< ChMesh mesh,
const char *  filename,
std::shared_ptr< ChContinuumMaterial my_material,
std::vector< std::vector< std::shared_ptr< ChNodeFEAbase > > > &  node_sets,
ChVector<>  pos_transform = VNULL,
ChMatrix33<>  rot_transform = ChMatrix33<>(1),
bool  discard_unused_nodes = true 
)
static

Load tetrahedrons, if any, saved in a .inp file for Abaqus.

Parameters
meshdestination mesh
filenameinput file name
my_materialmaterial for the created tetahedrons
node_setsvect of vectors of 'marked'nodes
pos_transformoptional displacement of imported mesh
rot_transformoptional rotation/scaling of imported mesh
discard_unused_nodesif true, Abaqus nodes that are not used in elements or sets are not imported in C::E
void chrono::fea::ChMeshFileLoader::FromTetGenFile ( std::shared_ptr< ChMesh mesh,
const char *  filename_node,
const char *  filename_ele,
std::shared_ptr< ChContinuumMaterial my_material,
ChVector<>  pos_transform = VNULL,
ChMatrix33<>  rot_transform = ChMatrix33<>(1) 
)
static

Load tetrahedrons from .node and .ele files as saved by TetGen.

The file format for .node (with point# starting from 1) is: [# of points] [dimension (only 3)] [# of attributes (only 0)] [markers (only 0)] [node #] [x] [y] [z] [node #] [x] [y] [z] etc. The file format for .ele (with tet# starting from 1) is: [# of tetrahedrons] [dimension (only 4 supported)] [# of attributes (only 0)] [tet #] [node #] [node #] [node #] [node #] [tet #] [node #] [node #] [node #] [node #] etc. If you pass a material inherited by ChContinuumElastic, nodes with 3D motion are used, and corotational elements. If you pass a material inherited by ChContinuumPoisson3D, nodes with scalar field are used (ex. thermal, electrostatics, etc)

Parameters
meshdestination mesh
filename_nodename of the .node file
filename_elename of the .ele file
my_materialmaterial for the created tetahedrons
pos_transformoptional displacement of imported mesh
rot_transformoptional rotation/scaling of imported mesh