21 #include "libmesh/libmesh.h"    22 #include "libmesh/elem.h"    23 #include "libmesh/dof_map.h"    45           "[1D],[structural],[base]")
    48     coords << -1.0, 1.0, 0.0,
    52     SECTION(
"Element returns proper number of strain components")
    58     SECTION(
"Incompatible modes flag returns false for basic element")
    63     SECTION(
"Isotropic flag returns true for basic element")
    69     SECTION(
"Check setting/getting element local solution")
    71         const libMesh::DofMap& dof_map = test_elem.
assembly.
system().get_dof_map();
    72         std::vector<libMesh::dof_id_type> dof_indices;
    74         uint n_dofs = uint(dof_indices.size());
    76         RealVectorX elem_solution = 5.3*RealVectorX::Ones(n_dofs);
    89         REQUIRE_THAT( test, Catch::Approx<double>(truth) );
    92     SECTION(
"Check setting/getting element local sensitivity solution")
    94         const libMesh::DofMap& dof_map = test_elem.
assembly.
system().get_dof_map();
    95         std::vector<libMesh::dof_id_type> dof_indices;
    97         uint n_dofs = uint(dof_indices.size());
    99         RealVectorX elem_solution = 5.3*RealVectorX::Ones(n_dofs);
   106     SECTION(
"Element shape can be transformed")
 
const MAST::NonlinearSystem & system() const
 
libMesh::LibMeshInit * p_global_init
 
virtual unsigned int n_direct_strain_components()
row dimension of the direct strain matrix, also used for the bending operator row dimension ...
 
MAST::NonlinearImplicitAssembly assembly
 
libMesh::Elem * reference_elem
Pointer to the actual libMesh element object. 
 
MAST::StructuralElement1D * elem
 
virtual bool if_isotropic() const =0
return true if the property is isotropic 
 
void transform_element(libMesh::MeshBase &mesh, const RealMatrixX X0, Real shift_x, Real shift_y, Real shift_z, Real scale_x, Real scale_y, Real rotation_x, Real rotation_y, Real rotation_z, Real shear_x=0, Real shear_y=0)
Transform an element by applying any combination of: shifts, scales, rotations, and shears...
 
TEST_CASE("structural_element_1d_base_tests", "[1D],[structural],[base]")
 
std::vector< double > eigen_matrix_to_std_vector(RealMatrixX M)
Converts an Eigen Matrix object to a std::vector. 
 
virtual bool if_incompatible_modes() const
 
const MAST::ElementPropertyCardBase & elem_property()
returns a constant reference to the finite element object 
 
Matrix< Real, Dynamic, Dynamic > RealMatrixX
 
virtual void set_solution(const RealVectorX &vec, bool if_sens=false)
stores vec as solution for element level calculations, or its sensitivity if if_sens is true...
 
Matrix< Real, Dynamic, 1 > RealVectorX
 
const RealVectorX & local_solution(bool if_sens=false) const
 
virtual unsigned int n_von_karman_strain_components()
row dimension of the von Karman strain matrix 
 
libMesh::ReplicatedMesh mesh
The actual libMesh mesh object.