Description

Collection of mesh file writer utilities.

#include <ChMeshExporter.h>

Static Public Member Functions

static void writeMesh (std::shared_ptr< ChMesh > my_mesh, std::string SaveAs)
 This function is used to write the connectivity and information of a ChMesh Currently it only supports ChElementCableANCF, ChElementShellANCF, ChElementBrick This connectivity is usually constant throughout the simulation. More...
 
static void writeFrame (std::shared_ptr< ChMesh > my_mesh, char SaveAsBuffer[256], std::string MeshFileBuffer)
 The task of this function is to write the information of a ChMesh into a file with vtk format. More...
 

Member Function Documentation

◆ writeFrame()

void chrono::fea::ChMeshExporter::writeFrame ( std::shared_ptr< ChMesh my_mesh,
char  SaveAsBuffer[256],
std::string  MeshFileBuffer 
)
static

The task of this function is to write the information of a ChMesh into a file with vtk format.

The vtk files may be opened with external visualization software such as Paraview, Visit, etc. This function requires the mesh connectivity file, which may be written by ChMeshExporter::writeMesh function Note that this function writes the current state of the mesh when is called. It writes some nodal informations (see the implementation) and elemental informations at the "element center". The elemental information may be converted to nodal information later on in the post-processing stage with a visualization software like Paraview.

Parameters
my_meshdestination mesh
SaveAsBuffername of the vtk file to export data to
MeshFileBuffername of the mesh file written by ChMeshExporter::writeMesh

◆ writeMesh()

void chrono::fea::ChMeshExporter::writeMesh ( std::shared_ptr< ChMesh my_mesh,
std::string  SaveAs 
)
static

This function is used to write the connectivity and information of a ChMesh Currently it only supports ChElementCableANCF, ChElementShellANCF, ChElementBrick This connectivity is usually constant throughout the simulation.

Hence, it may be called once at the beginning of the simulation (or as many times as it is needed), and should be used in the later stage when the nodal/elemental informations are updated.

Parameters
my_meshdestination mesh
SaveAsname of the mesh file

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/fea/ChMeshExporter.h
  • /builds/uwsbel/chrono/src/chrono/fea/ChMeshExporter.cpp