chrono::fea::ChVisualizationFEAmesh Class Reference

Description

Class for a FEA mesh visualization.

It converts tetahedrons, etc. into a coloured 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 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 sytem information of the level, for setting/getting its position and rotation respect to its parent. More...
 
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.
 
virtual void ArchiveOUT (ChArchiveOut &marchive)
 
virtual void ArchiveIN (ChArchiveIn &marchive)
 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 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

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

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

for circular section= number of points along the circle)

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

Updates all children assets, if any.

Overrides default behaviour that does nothing. Note that when calls Update() on children assets, their 'coords' will be the result of concatenating this frame csys and 'coords'.

Reimplemented from chrono::ChAssetLevel.