OpenBeam
C++ library for static analysis of mechanical structures
|
#include <CElement.h>
Public Types | |
using | Ptr = std::shared_ptr< CElement > |
using | ConstPtr = std::shared_ptr< const CElement > |
Public Member Functions | |
unsigned char | getNumberEdges () const |
virtual std::string | asString () const |
virtual void | getLocalStiffnessMatrices (std::vector< TStiffnessSubmatrix > &outSubMats) const =0 |
virtual void | getLocalDoFs (std::vector< used_DoFs_t > &dofs) const =0 |
void | getGlobalDoFs (std::vector< used_DoFs_t > &dofs) const |
virtual void | getGlobalStiffnessMatrices (std::vector< TStiffnessSubmatrix > &outSubMats) const |
void | setGlobalOrientation (const TRotation3D &new_orientation) |
const TRotation3D & | getGlobalOrientation () const |
virtual void | updateOrientationFromNodePositions () |
void | setDesignRotationAroundLinearAxis (num_t ang) |
void | setParent (CFiniteElementProblem *parent) |
virtual void | loadParamsFromSet (const mrpt::containers::yaml &p, const EvaluationContext &ctx)=0 |
void | loadParamsFromSet (const mrpt::containers::yaml &p) |
CFiniteElementProblem * | getParent () const |
virtual void | drawSVG (void *_cairo_context, const DrawStructureOptions &options, const RenderInitData &ri, const DrawElementExtraParams &draw_el_params, const MeshOutputInfo *meshing_info) const =0 |
virtual mrpt::opengl::CSetOfObjects::Ptr | getVisualization (const DrawStructureOptions &options, const DrawElementExtraParams &draw_el_params, const MeshOutputInfo *meshing_info) const =0 |
virtual void | do_mesh (const size_t my_idx, CStructureProblem &out_fem, MeshOutputInfo &out_info, const MeshParams ¶ms)=0 |
Static Public Member Functions | |
static Ptr | createElementByName (const std::string &sName) |
Public Attributes | |
std::vector< size_t > | conected_nodes_ids |
Protected Member Functions | |
CElement (unsigned char nEdges) | |
CElement (unsigned char nEdges, const size_t from_node_id, const size_t to_node_id) | |
Protected Attributes | |
const unsigned char | m_nEdges |
CFiniteElementProblem * | m_parent |
num_t | m_design_rotation_around_linear_axis |
For linear elements, the rotation around +X(local) | |
TRotation3D | m_global_orientation |
Orientation of the element wrt global coords. | |
Virtual base for any finite element.
|
protected |
Special case that initializes the first two conected_nodes_ids
|
static |
Class factory from element name, or nullptr for an unknown element: Element names:
|
pure virtual |
Mesh this element into a set of (possibly) smaller ones
Implemented in openbeam::CElementTorsionSpring, openbeam::CElementSpringXY, openbeam::CElementSpringDXDYRZ, openbeam::CElementSpring, and openbeam::CBaseElementBeam.
|
pure virtual |
Draws the element to a SVG Cairo context (a pointer to a Cairo::RefPtr<Cairo::Context> casted to void*), according to the passed options
Implemented in openbeam::CElementTorsionSpring, openbeam::CElementSpringXY, openbeam::CElementSpringDXDYRZ, openbeam::CElementSpring, and openbeam::CBaseElementBeam.
void openbeam::CElement::getGlobalDoFs | ( | std::vector< used_DoFs_t > & | dofs | ) | const |
Return the local DoFs transformed with the current element pose in m_global_orientation
|
virtual |
This method first calls getLocalStiffnessMatrices then rotates each matrix according to the current element orientation Can be redefined in derived classes for efficiency
|
pure virtual |
Must return which DoFs are used in the returned Stiffness matrices
Implemented in openbeam::CElementTorsionSpring, openbeam::CElementSpringXY, openbeam::CElementSpringDXDYRZ, openbeam::CElementSpring, openbeam::CElementBeam_2D_RR, openbeam::CElementBeam_2D_RD, openbeam::CElementBeam_2D_RA, openbeam::CElementBeam_2D_AR, and openbeam::CElementBeam_2D_AA.
|
pure virtual |
Return the stiffness submatrices (for element local coordinates) between each pair of edges in this element, for the current element state. From all (in,out) edge pairs, only return those with in<=out (the other half is the corresponding transpose).
Implemented in openbeam::CElementTorsionSpring, openbeam::CElementSpringXY, openbeam::CElementSpringDXDYRZ, openbeam::CElementSpring, openbeam::CElementBeam_2D_RR, openbeam::CElementBeam_2D_RD, openbeam::CElementBeam_2D_RA, openbeam::CElementBeam_2D_AR, and openbeam::CElementBeam_2D_AA.
|
inline |
Must return the number of "ports" or "edges" of this element. This is the same than the length of conected_nodes_ids and the vectors returned by getLocalStiffnessMatrices
|
inline |
Get the parent FEM problem object
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
pure virtual |
Parse a set of parameters by (casi insensitive) name and set the element values from them. Each element must document the supported parameters and their meaning.
Implemented in openbeam::CElementTorsionSpring, openbeam::CElementSpringXY, openbeam::CElementSpringDXDYRZ, openbeam::CElementSpring, and openbeam::CBaseElementBeam.
|
inline |
For linear elements from i->j, there's a rotation which is undefined if they're fixed between any two points. This parameter model that rotation. It's used during updateOrientationFromNodePositions
|
virtual |
Updates m_global_orientation from the global poses of conected_nodes_ids and the value m_design_rotation_around_linear_axis
std::vector<size_t> openbeam::CElement::conected_nodes_ids |
The list of connected nodes at each "port" or "face" It's set to the correct size at constructions automatically.