OGS
ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim > Struct Template Reference

Detailed Description

template<int DisplacementDim>
struct ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >

Definition at line 32 of file LocalAssemblerInterface.h.

#include <LocalAssemblerInterface.h>

Inheritance diagram for ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >:
[legend]
Collaboration diagram for ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >:
[legend]

Public Member Functions

 LargeDeformationLocalAssemblerInterface (MeshLib::Element const &e, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, LargeDeformationProcessData< DisplacementDim > &process_data)
 
std::size_t setIPDataInitialConditions (std::string_view name, double const *values, int const integration_order)
 Returns number of read integration points.
 
unsigned getNumberOfIntegrationPoints () const
 
int getMaterialID () const
 
std::vector< double > getMaterialStateVariableInternalState (std::function< std::span< double >(typename MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables &)> const &get_values_span, int const &n_components) const
 
MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables const & getMaterialStateVariablesAt (unsigned integration_point) const
 
- Public Member Functions inherited from ProcessLib::LocalAssemblerInterface
virtual ~LocalAssemblerInterface ()=default
 
virtual void setInitialConditions (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t, int const process_id)
 
virtual void initialize (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
 
virtual void preAssemble (double const, double const, std::vector< double > const &)
 
virtual void assemble (double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data)
 
virtual void assembleForStaggeredScheme (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, int const process_id, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data)
 
virtual void assembleWithJacobian (double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
 
virtual void assembleWithJacobianForStaggeredScheme (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, int const process_id, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
 
virtual void computeSecondaryVariable (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_prev, int const process_id)
 
virtual void preTimestep (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table, GlobalVector const &x, double const t, double const delta_t)
 
virtual void postTimestep (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id)
 
void postNonLinearSolver (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id)
 
virtual Eigen::Vector3d getFlux (MathLib::Point3d const &, double const, std::vector< double > const &) const
 
virtual Eigen::Vector3d getFlux (MathLib::Point3d const &, double const, std::vector< std::vector< double > > const &) const
 Fits to staggered scheme.
 
- Public Member Functions inherited from NumLib::ExtrapolatableElement
virtual Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix (const unsigned integration_point) const =0
 Provides the shape matrix at the given integration point.
 
virtual ~ExtrapolatableElement ()=default
 

Static Public Member Functions

static auto getReflectionDataForOutput ()
 

Protected Attributes

LargeDeformationProcessData< DisplacementDim > & process_data_
 
std::vector< MaterialStateData< DisplacementDim > > material_states_
 
std::vector< typename ConstitutiveRelations::StatefulData< DisplacementDim > > current_states_
 
std::vector< typename ConstitutiveRelations::StatefulDataPrev< DisplacementDim > > prev_states_
 
std::vector< typename ConstitutiveRelations::OutputData< DisplacementDim > > output_data_
 
NumLib::GenericIntegrationMethod const & integration_method_
 
MeshLib::Element const & element_
 
bool const is_axially_symmetric_
 
ConstitutiveRelations::SolidConstitutiveRelation< DisplacementDim > const & solid_material_
 

Constructor & Destructor Documentation

◆ LargeDeformationLocalAssemblerInterface()

template<int DisplacementDim>
ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::LargeDeformationLocalAssemblerInterface ( MeshLib::Element const & e,
NumLib::GenericIntegrationMethod const & integration_method,
bool const is_axially_symmetric,
LargeDeformationProcessData< DisplacementDim > & process_data )
inline

Definition at line 36 of file LocalAssemblerInterface.h.

41 : process_data_(process_data),
42 integration_method_(integration_method),
43 element_(e),
44 is_axially_symmetric_(is_axially_symmetric),
46 process_data_.solid_materials, process_data_.material_ids,
47 element_.getID()))
48 {
49 unsigned const n_integration_points =
51
52 material_states_.reserve(n_integration_points);
53 for (unsigned ip = 0; ip < n_integration_points; ++ip)
54 {
55 material_states_.emplace_back(
56 solid_material_.createMaterialStateVariables());
57 }
58
59 current_states_.resize(n_integration_points);
60 prev_states_.resize(n_integration_points);
61 output_data_.resize(n_integration_points);
62 }
std::size_t getID() const
Returns the ID of the element.
Definition Element.h:89
auto & selectSolidConstitutiveRelation(SolidMaterialsMap const &constitutive_relations, MeshLib::PropertyVector< int > const *const material_ids, std::size_t const element_id)
std::vector< MaterialStateData< DisplacementDim > > material_states_
std::vector< typename ConstitutiveRelations::StatefulDataPrev< DisplacementDim > > prev_states_
std::vector< typename ConstitutiveRelations::StatefulData< DisplacementDim > > current_states_
std::vector< typename ConstitutiveRelations::OutputData< DisplacementDim > > output_data_
ConstitutiveRelations::SolidConstitutiveRelation< DisplacementDim > const & solid_material_

References ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::current_states_, NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::integration_method_, ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::material_states_, ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::output_data_, ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::prev_states_, and ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::solid_material_.

Member Function Documentation

◆ getMaterialID()

◆ getMaterialStateVariableInternalState()

template<int DisplacementDim>
std::vector< double > ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::getMaterialStateVariableInternalState ( std::function< std::span< double >(typename MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables &)> const & get_values_span,
int const & n_components ) const
inline

Definition at line 125 of file LocalAssemblerInterface.h.

130 {
134 get_values_span, n_components);
135 }
std::vector< double > getIntegrationPointDataMaterialStateVariables(IntegrationPointDataVector const &ip_data_vector, MemberType member, std::function< std::span< double >(MaterialStateVariables &)> get_values_span, int const n_components)

References ProcessLib::getIntegrationPointDataMaterialStateVariables(), and ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::material_states_.

◆ getMaterialStateVariablesAt()

template<int DisplacementDim>
MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables const & ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::getMaterialStateVariablesAt ( unsigned integration_point) const
inline

Definition at line 139 of file LocalAssemblerInterface.h.

140 {
141 return *material_states_[integration_point].material_state_variables;
142 }

References ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::material_states_.

◆ getNumberOfIntegrationPoints()

◆ getReflectionDataForOutput()

template<int DisplacementDim>
static auto ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::getReflectionDataForOutput ( )
inlinestatic

Definition at line 144 of file LocalAssemblerInterface.h.

145 {
147
149 &Self::current_states_, &Self::output_data_);
150 }
auto reflectWithoutName(Accessors &&... accessors)
LargeDeformationLocalAssemblerInterface(MeshLib::Element const &e, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, LargeDeformationProcessData< DisplacementDim > &process_data)

References ProcessLib::Reflection::reflectWithoutName().

◆ setIPDataInitialConditions()

template<int DisplacementDim>
std::size_t ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::setIPDataInitialConditions ( std::string_view name,
double const * values,
int const integration_order )
inline

Returns number of read integration points.

Definition at line 64 of file LocalAssemblerInterface.h.

67 {
68 if (integration_order !=
69 static_cast<int>(integration_method_.getIntegrationOrder()))
70 {
72 "Setting integration point initial conditions; The integration "
73 "order of the local assembler for element {:d} is different "
74 "from the integration order in the initial condition.",
75 element_.getID());
76 }
77
78 if (name.starts_with("material_state_variable_"))
79 {
80 name.remove_prefix(24);
81
82 auto const& internal_variables =
83 solid_material_.getInternalVariables();
84 if (auto const iv = std::find_if(
85 begin(internal_variables), end(internal_variables),
86 [&name](auto const& iv) { return iv.name == name; });
87 iv != end(internal_variables))
88 {
89 DBUG("Setting material state variable '{:s}'", name);
90 return ProcessLib::
92 values, material_states_,
93 &MaterialStateData<
94 DisplacementDim>::material_state_variables,
95 iv->reference);
96 }
97
98 WARN(
99 "Could not find variable {:s} in solid material model's "
100 "internal variables.",
101 name);
102 return 0;
103 }
104
105 // TODO this logic could be pulled out of the local assembler into the
106 // process. That might lead to a slightly better performance due to less
107 // string comparisons.
109 name, values, current_states_);
110 }
#define OGS_FATAL(...)
Definition Error.h:26
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:40
std::size_t reflectSetIPData(std::string_view const name, double const *values, std::vector< IPData > &ip_data_vector)
std::size_t setIntegrationPointDataMaterialStateVariables(double const *values, IntegrationPointDataVector &ip_data_vector, MemberType member, std::function< std::span< double >(MaterialStateVariables &)> get_values_span)

References ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::current_states_, DBUG(), ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::element_, MeshLib::Element::getID(), NumLib::GenericIntegrationMethod::getIntegrationOrder(), ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::integration_method_, ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::material_states_, OGS_FATAL, ProcessLib::Reflection::reflectSetIPData(), ProcessLib::setIntegrationPointDataMaterialStateVariables(), ProcessLib::LargeDeformation::LargeDeformationLocalAssemblerInterface< DisplacementDim >::solid_material_, and WARN().

Member Data Documentation

◆ current_states_

◆ element_

◆ integration_method_

◆ is_axially_symmetric_

◆ material_states_

◆ output_data_

◆ prev_states_

◆ process_data_

◆ solid_material_


The documentation for this struct was generated from the following file: