Description

Class for a FEA mesh visualization.

It converts tetrahedrons, etc. into a colored triangle mesh asset of class ChTriangleMeshShape that is contained in its sublevel, so that it can be rendered or postprocessed.

#include <ChVisualizationFEAmesh.h>

Inheritance diagram for chrono::fea::ChVisualizationFEAmesh:
Collaboration diagram for chrono::fea::ChVisualizationFEAmesh:

Public Types

enum  eChFemDataType {
  E_PLOT_NONE, E_PLOT_SURFACE, E_PLOT_CONTACTSURFACES, E_PLOT_LOADSURFACES,
  E_PLOT_NODE_DISP_NORM, E_PLOT_NODE_DISP_X, E_PLOT_NODE_DISP_Y, E_PLOT_NODE_DISP_Z,
  E_PLOT_NODE_SPEED_NORM, E_PLOT_NODE_SPEED_X, E_PLOT_NODE_SPEED_Y, E_PLOT_NODE_SPEED_Z,
  E_PLOT_NODE_ACCEL_NORM, E_PLOT_NODE_ACCEL_X, E_PLOT_NODE_ACCEL_Y, E_PLOT_NODE_ACCEL_Z,
  E_PLOT_ELEM_STRAIN_VONMISES, E_PLOT_ELEM_STRESS_VONMISES, E_PLOT_ELEM_STRAIN_HYDROSTATIC, E_PLOT_ELEM_STRESS_HYDROSTATIC,
  E_PLOT_ELEM_BEAM_MX, E_PLOT_ELEM_BEAM_MY, E_PLOT_ELEM_BEAM_MZ, E_PLOT_ELEM_BEAM_TX,
  E_PLOT_ELEM_BEAM_TY, E_PLOT_ELEM_BEAM_TZ, E_PLOT_NODE_P, E_PLOT_ANCF_BEAM_AX,
  E_PLOT_ANCF_BEAM_BD
}
 
enum  eChFemGlyphs {
  E_GLYPH_NONE, E_GLYPH_NODE_DOT_POS, E_GLYPH_NODE_CSYS, E_GLYPH_NODE_VECT_SPEED,
  E_GLYPH_NODE_VECT_ACCEL, E_GLYPH_ELEM_TENS_STRAIN, E_GLYPH_ELEM_TENS_STRESS, E_GLYPH_ELEM_VECT_DP
}
 

Public Member Functions

 ChVisualizationFEAmesh (ChMesh &mymesh)
 
virtual ChMeshGetMesh ()
 
eChFemDataType GetFEMdataType ()
 
void SetFEMdataType (eChFemDataType mdata)
 
eChFemGlyphs GetFEMglyphType ()
 
void SetFEMglyphType (eChFemGlyphs mdata)
 
void SetColorscaleMinMax (double mmin, double mmax)
 
void SetSymbolsScale (double mscale)
 
double GetSymbolsScale ()
 
void SetSymbolsThickness (double mthick)
 
double GetSymbolsThickness ()
 
void SetBeamResolution (int mres)
 Set the resolution of beam triangulated drawing, along direction of beam.
 
int GetBeamResolution ()
 
void SetBeamResolutionSection (int mres)
 Set the resolution of beam triangulated drawing, along the section (i.e. More...
 
int GetBeamResolutionSection ()
 
void SetShellResolution (int mres)
 Set the resolution of shell triangulated drawing.
 
int GetShellResolution ()
 
void SetShrinkElements (bool mshrink, double mfact)
 
void SetWireframe (bool mwireframe)
 
void SetBackfaceCull (bool mbc)
 
void SetZbufferHide (bool mhide)
 
void SetDefaultMeshColor (ChColor mcolor)
 
void SetDefaultSymbolsColor (ChColor mcolor)
 
void SetSmoothFaces (bool msmooth)
 
void SetDrawInUndeformedReference (bool mdu)
 
virtual void Update (ChPhysicsItem *updater, const ChCoordsys<> &coords)
 Updates all children assets, if any. More...
 
- Public Member Functions inherited from chrono::ChAssetLevel
ChFrameGetFrame ()
 Access the coordinate system information of the level, for setting/getting its position and rotation respect to its parent.
 
std::vector< std::shared_ptr< ChAsset > > & GetAssets ()
 Access to the list of children assets.
 
std::shared_ptr< ChAssetGetAssetN (unsigned int num)
 Get the Nth asset in list.
 
void AddAsset (std::shared_ptr< ChAsset > masset)
 Add an asset to this level.
 
virtual void ArchiveOUT (ChArchiveOut &marchive) override
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIN (ChArchiveIn &marchive) override
 Method to allow de-serialization of transient data from archives.
 

Protected Attributes

ChMeshFEMmesh
 
eChFemDataType fem_data_type
 
eChFemGlyphs fem_glyph
 
double colorscale_min
 
double colorscale_max
 
double symbols_scale
 
double symbols_thickness
 
bool shrink_elements
 
double shrink_factor
 
bool wireframe
 
bool backface_cull
 
bool zbuffer_hide
 
bool smooth_faces
 
bool undeformed_reference
 
int beam_resolution
 
int beam_resolution_section
 
int shell_resolution
 
ChColor meshcolor
 
ChColor symbolscolor
 
std::vector< int > normal_accumulators
 
- Protected Attributes inherited from chrono::ChAssetLevel
ChFrame levelframe
 
std::vector< std::shared_ptr< ChAsset > > assets
 

Member Function Documentation

◆ SetBeamResolutionSection()

void chrono::fea::ChVisualizationFEAmesh::SetBeamResolutionSection ( int  mres)
inline

Set the resolution of beam triangulated drawing, along the section (i.e.

for circular section= number of points along the circle)

◆ Update()

void chrono::fea::ChVisualizationFEAmesh::Update ( ChPhysicsItem updater,
const ChCoordsys<> &  coords 
)
virtual

Updates all children assets, if any.

Note that when calling Update() on children assets, their 'coords' will be the result of concatenating this frame csys and 'coords'.

Reimplemented from chrono::ChAssetLevel.


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