OGS
ProcessLib::SmallDeformation Namespace Reference

Namespaces

namespace  ConstitutiveRelations
 
namespace  detail
 

Classes

struct  FreeEnergyDensityData
 
struct  GravityModel
 
struct  IntegrationPointData
 
struct  MaterialForcesInterface
 
class  MaterialStateData
 
struct  MediaData
 
struct  SecondaryData
 
class  SmallDeformationLocalAssembler
 
struct  SmallDeformationLocalAssemblerInterface
 
class  SmallDeformationProcess
 
struct  SmallDeformationProcessData
 
struct  SolidDensityModel
 

Typedefs

template<int DisplacementDim>
using KelvinVector = KV::KelvinVectorType<DisplacementDim>
 
template<int DisplacementDim>
using KelvinMatrix = KV::KelvinMatrixType<DisplacementDim>
 
template<int DisplacementDim>
using GlobalDimVector = Eigen::Vector<double, DisplacementDim>
 
using Temperature = BaseLib::StrongType<double, struct TemperatureTag>
 
template<int DisplacementDim>
using VolumetricBodyForce
 
using SolidDensity = BaseLib::StrongType<double, struct SolidDensityTag>
 

Functions

template<typename T >
constexpr bool areEvalArgumentTypesUnique ()
 
template<typename Model >
constexpr void assertEvalArgsUnique (Model const &)
 
template<int GlobalDim, template< typename, int > class LocalAssemblerImplementation, typename LocalAssemblerInterface , IntegrationMethodProviderOrIntegrationOrder ProviderOrOrder, typename... ExtraCtorArgs>
void createLocalAssemblers (std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, ProviderOrOrder const &provider_or_order, ExtraCtorArgs &&... extra_ctor_args)
 
void checkMPLProperties (std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
 
template<int DisplacementDim>
std::unique_ptr< ProcesscreateSmallDeformationProcess (std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
 
template std::unique_ptr< ProcesscreateSmallDeformationProcess< 2 > (std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
 
template std::unique_ptr< ProcesscreateSmallDeformationProcess< 3 > (std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
 
template<int DisplacementDim, typename ShapeFunction , typename ShapeMatricesType , typename NodalForceVectorType , typename NodalDisplacementVectorType , typename GradientVectorType , typename GradientMatrixType , typename IPData , typename StressData , typename OutputData , typename IntegrationMethod >
std::vector< double > const & getMaterialForces (std::vector< double > const &local_x, std::vector< double > &nodal_values, IntegrationMethod const &_integration_method, IPData const &_ip_data, StressData const &stress_data, OutputData const &output_data, MeshLib::Element const &element, bool const is_axially_symmetric)
 
template<typename LocalAssemblerInterface >
void writeMaterialForces (std::unique_ptr< GlobalVector > &material_forces, std::vector< std::unique_ptr< LocalAssemblerInterface > > const &local_assemblers, NumLib::LocalToGlobalIndexMap const &local_to_global_index_map, GlobalVector const &x)
 

Typedef Documentation

◆ GlobalDimVector

template<int DisplacementDim>
using ProcessLib::SmallDeformation::GlobalDimVector = Eigen::Vector<double, DisplacementDim>

Definition at line 32 of file Base.h.

◆ KelvinMatrix

template<int DisplacementDim>
using ProcessLib::SmallDeformation::KelvinMatrix = KV::KelvinMatrixType<DisplacementDim>

Definition at line 29 of file Base.h.

◆ KelvinVector

template<int DisplacementDim>
using ProcessLib::SmallDeformation::KelvinVector = KV::KelvinVectorType<DisplacementDim>

Definition at line 26 of file Base.h.

◆ SolidDensity

using ProcessLib::SmallDeformation::SolidDensity = BaseLib::StrongType<double, struct SolidDensityTag>

Definition at line 17 of file SolidDensity.h.

◆ Temperature

using ProcessLib::SmallDeformation::Temperature = BaseLib::StrongType<double, struct TemperatureTag>

Definition at line 45 of file Base.h.

◆ VolumetricBodyForce

template<int DisplacementDim>
using ProcessLib::SmallDeformation::VolumetricBodyForce
Initial value:

Definition at line 18 of file Gravity.h.

Function Documentation

◆ areEvalArgumentTypesUnique()

template<typename T >
bool ProcessLib::SmallDeformation::areEvalArgumentTypesUnique ( )
constexpr

Checks whether the argument types of the eval() method of the given type T are unique.

Argument types differing only in constness, reference or volatility are considered equal.

Definition at line 41 of file Invoke.h.

42{
43 return detail::areEvalArgumentTypesUnique(&T::eval);
44}

References ProcessLib::SmallDeformation::detail::areEvalArgumentTypesUnique().

Referenced by assertEvalArgsUnique().

◆ assertEvalArgsUnique()

template<typename Model >
void ProcessLib::SmallDeformation::assertEvalArgsUnique ( Model const & )
constexpr

Statically asserts that the argument types of the passed Model's eval() method are unique.

Definition at line 49 of file Invoke.h.

50{
51 static_assert(areEvalArgumentTypesUnique<std::remove_cvref_t<Model>>());
52}

References areEvalArgumentTypesUnique().

Referenced by ProcessLib::SmallDeformation::ConstitutiveRelations::ConstitutiveSetting< DisplacementDim >::eval().

◆ checkMPLProperties()

void ProcessLib::SmallDeformation::checkMPLProperties ( std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media)

Definition at line 27 of file CreateSmallDeformationProcess.cpp.

29{
30 for (auto const& m : media)
31 {
32 checkRequiredProperties(m.second->phase("Solid"),
33 {{MaterialPropertyLib::density}});
34 }
35}

◆ createLocalAssemblers()

template<int GlobalDim, template< typename, int > class LocalAssemblerImplementation, typename LocalAssemblerInterface , IntegrationMethodProviderOrIntegrationOrder ProviderOrOrder, typename... ExtraCtorArgs>
void ProcessLib::SmallDeformation::createLocalAssemblers ( std::vector< MeshLib::Element * > const & mesh_elements,
NumLib::LocalToGlobalIndexMap const & dof_table,
std::vector< std::unique_ptr< LocalAssemblerInterface > > & local_assemblers,
ProviderOrOrder const & provider_or_order,
ExtraCtorArgs &&... extra_ctor_args )

Creates local assemblers for each element of the given mesh.

Template Parameters
LocalAssemblerImplementationthe individual local assembler type
LocalAssemblerInterfacethe general local assembler interface
ExtraCtorArgstypes of additional constructor arguments. Those arguments will be passed to the constructor of LocalAssemblerImplementation.

The first two template parameters cannot be deduced from the arguments. Therefore they always have to be provided manually.

Definition at line 76 of file CreateLocalAssemblers.h.

82{
83 DBUG("Create local assemblers.");
84
85 detail::createLocalAssemblers<GlobalDim, LocalAssemblerImplementation>(
86 dof_table, mesh_elements, local_assemblers, provider_or_order,
87 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
88}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30

References DBUG().

Referenced by ProcessLib::PhaseField::PhaseFieldProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::SmallDeformation::SmallDeformationProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalProcess< DisplacementDim >::initializeConcreteProcess(), ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldProcess< DisplacementDim >::initializeConcreteProcess(), and ProcessLib::ThermoMechanics::ThermoMechanicsProcess< DisplacementDim >::initializeConcreteProcess().

◆ createSmallDeformationProcess()

template<int DisplacementDim>
std::unique_ptr< Process > ProcessLib::SmallDeformation::createSmallDeformationProcess ( std::string const & name,
MeshLib::Mesh & mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > && jacobian_assembler,
std::vector< ProcessVariable > const & variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
unsigned const integration_order,
BaseLib::ConfigTree const & config,
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media )
Input File Parameter
prj__processes__process__type

Process Variables

Input File Parameter
prj__processes__process__SMALL_DEFORMATION__process_variables

Primary process variables as they appear in the global component vector:

Input File Parameter
prj__processes__process__SMALL_DEFORMATION__process_variables__process_variable

Process Parameters

Input File Parameter
prj__processes__process__SMALL_DEFORMATION__solid_density
Input File Parameter
prj__processes__process__SMALL_DEFORMATION__specific_body_force
Input File Parameter
prj__processes__process__SMALL_DEFORMATION__use_b_bar
Input File Parameter
prj__processes__process__SMALL_DEFORMATION__reference_temperature
Input File Parameter
prj__processes__process__SMALL_DEFORMATION__initial_stress

Definition at line 38 of file CreateSmallDeformationProcess.cpp.

49{
51 config.checkConfigParameter("type", "SMALL_DEFORMATION");
52 DBUG("Create SmallDeformationProcess.");
53
55
57 auto const pv_config = config.getConfigSubtree("process_variables");
58
60 auto per_process_variables = findProcessVariables(
61 variables, pv_config,
62 {
63 "process_variable"});
64
65 DBUG("Associate displacement with process variable '{:s}'.",
66 per_process_variables.back().get().getName());
67
68 if (per_process_variables.back().get().getNumberOfGlobalComponents() !=
69 DisplacementDim)
70 {
72 "Number of components of the process variable '{:s}' is different "
73 "from the displacement dimension: got {:d}, expected {:d}",
74 per_process_variables.back().get().getName(),
75 per_process_variables.back().get().getNumberOfGlobalComponents(),
76 DisplacementDim);
77 }
78 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
79 process_variables;
80 process_variables.push_back(std::move(per_process_variables));
81
83 auto solid_constitutive_relations =
85 parameters, local_coordinate_system, materialIDs(mesh), config);
86
88 if (config.getConfigParameterOptional<std::string>("solid_density"))
89 {
91 "The <solid_density> tag has been removed. Use <media> definitions "
92 "to specify solid's density.");
93 }
94
95 // Specific body force
96 Eigen::Matrix<double, DisplacementDim, 1> specific_body_force;
97 {
98 std::vector<double> const b =
100 config.getConfigParameter<std::vector<double>>(
101 "specific_body_force");
102 if (b.size() != DisplacementDim)
103 {
104 OGS_FATAL(
105 "The size of the specific body force vector does not match the "
106 "displacement dimension. Vector size is {:d}, displacement "
107 "dimension is {:d}",
108 b.size(), DisplacementDim);
109 }
110
111 std::copy_n(b.data(), b.size(), specific_body_force.data());
112 }
113
115 auto const use_b_bar = config.getConfigParameter<bool>("use_b_bar", false);
116
117 auto media_map =
119 DBUG(
120 "Check the media properties of SmallDeformation process "
121 "...");
122 checkMPLProperties(media);
123 DBUG("Media properties verified.");
124
125 // Reference temperature
127 double>(
129 config, "reference_temperature", parameters, 1, &mesh);
130 if (reference_temperature)
131 {
132 DBUG("Use '{:s}' as reference temperature parameter.",
133 (*reference_temperature).name);
134 }
135
136 // Initial stress conditions
137 auto const initial_stress = ParameterLib::findOptionalTagParameter<double>(
139 config, "initial_stress", parameters,
140 // Symmetric tensor size, 4 or 6, not a Kelvin vector.
142 &mesh);
143
144 SmallDeformationProcessData<DisplacementDim> process_data{
145 materialIDs(mesh),
146 std::move(media_map),
147 std::move(solid_constitutive_relations),
148 initial_stress,
149 specific_body_force,
151 use_b_bar};
152
153 SecondaryVariableCollection secondary_variables;
154
155 ProcessLib::createSecondaryVariables(config, secondary_variables);
156
157 return std::make_unique<SmallDeformationProcess<DisplacementDim>>(
158 std::move(name), mesh, std::move(jacobian_assembler), parameters,
159 integration_order, std::move(process_variables),
160 std::move(process_data), std::move(secondary_variables));
161}
#define OGS_FATAL(...)
Definition Error.h:26
std::map< int, std::shared_ptr< MaterialLib::Solids::MechanicsBase< DisplacementDim > > > createConstitutiveRelations(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, MeshLib::PropertyVector< int > const *const material_ids, BaseLib::ConfigTree const &config)
MaterialSpatialDistributionMap createMaterialSpatialDistributionMap(std::map< int, std::shared_ptr< Medium > > const &media, MeshLib::Mesh const &mesh)
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
PropertyVector< int > const * materialIDs(Mesh const &mesh)
Definition Mesh.cpp:268
Parameter< ParameterDataType > * findOptionalTagParameter(BaseLib::ConfigTree const &process_config, std::string const &tag, std::vector< std::unique_ptr< ParameterBase > > const &parameters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
Definition Utils.h:166
void checkMPLProperties(MeshLib::Mesh const &mesh, MaterialPropertyLib::MaterialSpatialDistributionMap const &media_map)
std::vector< std::reference_wrapper< ProcessVariable > > findProcessVariables(std::vector< ProcessVariable > const &variables, BaseLib::ConfigTree const &pv_config, std::initializer_list< std::string > tags)
void createSecondaryVariables(BaseLib::ConfigTree const &config, SecondaryVariableCollection &secondary_variables)

References BaseLib::ConfigTree::checkConfigParameter(), MaterialLib::Solids::createConstitutiveRelations(), MaterialPropertyLib::createMaterialSpatialDistributionMap(), ProcessLib::createSecondaryVariables(), DBUG(), ParameterLib::findOptionalTagParameter(), ProcessLib::findProcessVariables(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigParameterOptional(), BaseLib::ConfigTree::getConfigSubtree(), MathLib::KelvinVector::kelvin_vector_dimensions(), and OGS_FATAL.

◆ createSmallDeformationProcess< 2 >()

template std::unique_ptr< Process > ProcessLib::SmallDeformation::createSmallDeformationProcess< 2 > ( std::string const & name,
MeshLib::Mesh & mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > && jacobian_assembler,
std::vector< ProcessVariable > const & variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
unsigned const integration_order,
BaseLib::ConfigTree const & config,
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media )

◆ createSmallDeformationProcess< 3 >()

template std::unique_ptr< Process > ProcessLib::SmallDeformation::createSmallDeformationProcess< 3 > ( std::string const & name,
MeshLib::Mesh & mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > && jacobian_assembler,
std::vector< ProcessVariable > const & variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
unsigned const integration_order,
BaseLib::ConfigTree const & config,
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const & media )

◆ getMaterialForces()

template<int DisplacementDim, typename ShapeFunction , typename ShapeMatricesType , typename NodalForceVectorType , typename NodalDisplacementVectorType , typename GradientVectorType , typename GradientMatrixType , typename IPData , typename StressData , typename OutputData , typename IntegrationMethod >
std::vector< double > const & ProcessLib::SmallDeformation::getMaterialForces ( std::vector< double > const & local_x,
std::vector< double > & nodal_values,
IntegrationMethod const & _integration_method,
IPData const & _ip_data,
StressData const & stress_data,
OutputData const & output_data,
MeshLib::Element const & element,
bool const is_axially_symmetric )

Definition at line 40 of file MaterialForces.h.

45{
46 unsigned const n_integration_points =
47 _integration_method.getNumberOfPoints();
48
49 nodal_values.clear();
51 nodal_values, ShapeFunction::NPOINTS * DisplacementDim);
52
53 for (unsigned ip = 0; ip < n_integration_points; ip++)
54 {
55 auto const& sigma = stress_data[ip].stress_data.sigma;
56 auto const& N = _ip_data[ip].N_u;
57 auto const& dNdx = _ip_data[ip].dNdx_u;
58
59 auto const& psi =
60 output_data[ip].free_energy_density_data.free_energy_density;
61
62 auto const x_coord =
64 element, _ip_data[ip].N_u);
65
66 // For the 2D case the 33-component is needed (and the four entries
67 // of the non-symmetric matrix); In 3d there are nine entries.
68 GradientMatrixType G(
69 DisplacementDim * DisplacementDim + (DisplacementDim == 2 ? 1 : 0),
70 ShapeFunction::NPOINTS * DisplacementDim);
71 Deformation::computeGMatrix<DisplacementDim, ShapeFunction::NPOINTS>(
72 dNdx, G, is_axially_symmetric, N, x_coord);
73
74 GradientVectorType const grad_u =
75 G * Eigen::Map<NodalForceVectorType const>(
76 local_x.data(), ShapeFunction::NPOINTS * DisplacementDim);
77
78 GradientVectorType eshelby_stress;
79 eshelby_stress.setZero(DisplacementDim * DisplacementDim +
80 (DisplacementDim == 2 ? 1 : 0));
81
82 if (DisplacementDim == 3)
83 {
84 eshelby_stress[0] = eshelby_stress[DisplacementDim + 1] =
85 eshelby_stress[8] = psi;
86
87 eshelby_stress[0] -= sigma[0] * grad_u[0] +
88 sigma[3] / std::sqrt(2) * grad_u[3] +
89 sigma[5] / std::sqrt(2) * grad_u[6];
90
91 eshelby_stress[1] -= sigma[3] / std::sqrt(2) * grad_u[0] +
92 sigma[1] * grad_u[3] +
93 sigma[4] / std::sqrt(2) * grad_u[6];
94
95 eshelby_stress[2] -= sigma[5] / std::sqrt(2) * grad_u[0] +
96 sigma[4] / std::sqrt(2) * grad_u[3] +
97 sigma[2] * grad_u[6];
98
99 eshelby_stress[3] -= sigma[0] * grad_u[1] +
100 sigma[3] / std::sqrt(2) * grad_u[4] +
101 sigma[5] / std::sqrt(2) * grad_u[7];
102
103 eshelby_stress[4] -= sigma[3] / std::sqrt(2) * grad_u[1] +
104 sigma[1] * grad_u[4] +
105 sigma[4] / std::sqrt(2) * grad_u[7];
106
107 eshelby_stress[5] -= sigma[5] / std::sqrt(2) * grad_u[1] +
108 sigma[4] / std::sqrt(2) * grad_u[4] +
109 sigma[2] * grad_u[7];
110
111 eshelby_stress[6] -= sigma[0] * grad_u[2] +
112 sigma[3] / std::sqrt(2) * grad_u[5] +
113 sigma[5] / std::sqrt(2) * grad_u[8];
114
115 eshelby_stress[7] -= sigma[3] / std::sqrt(2) * grad_u[2] +
116 sigma[1] * grad_u[5] +
117 sigma[4] / std::sqrt(2) * grad_u[8];
118
119 eshelby_stress[8] -= sigma[5] / std::sqrt(2) * grad_u[2] +
120 sigma[4] / std::sqrt(2) * grad_u[5] +
121 sigma[2] * grad_u[8];
122 }
123 else if (DisplacementDim == 2)
124 {
125 eshelby_stress[0] = eshelby_stress[DisplacementDim + 1] =
126 eshelby_stress[4] = psi;
127
128 eshelby_stress[0] -=
129 sigma[0] * grad_u[0] + sigma[3] / std::sqrt(2) * grad_u[2];
130
131 eshelby_stress[1] -=
132 sigma[3] / std::sqrt(2) * grad_u[0] + sigma[1] * grad_u[2];
133
134 eshelby_stress[2] -=
135 sigma[0] * grad_u[1] + sigma[3] / std::sqrt(2) * grad_u[3];
136
137 eshelby_stress[3] -=
138 sigma[3] / std::sqrt(2) * grad_u[1] + sigma[1] * grad_u[3];
139
140 // for axial-symmetric case the following is not zero in general
141 eshelby_stress[4] -= sigma[2] * grad_u[4];
142 }
143 else
144 {
145 OGS_FATAL(
146 "Material forces not implemented for displacement "
147 "dimension "
148 "other than 2 and 3.");
149 }
150
151 auto const& w = _ip_data[ip].integration_weight;
152 local_b += G.transpose() * eshelby_stress * w;
153 }
154
155 return nodal_values;
156}
Eigen::Map< Vector > createZeroedVector(std::vector< double > &data, Eigen::VectorXd::Index size)
double interpolateXCoordinate(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)

References ProcessLib::Deformation::computeGMatrix(), MathLib::createZeroedVector(), NumLib::interpolateXCoordinate(), OGS_FATAL, and ProcessLib::ConstitutiveRelations::StressData< DisplacementDim >::sigma.

Referenced by ProcessLib::SmallDeformation::SmallDeformationLocalAssembler< ShapeFunction, DisplacementDim >::getMaterialForces().

◆ writeMaterialForces()

template<typename LocalAssemblerInterface >
void ProcessLib::SmallDeformation::writeMaterialForces ( std::unique_ptr< GlobalVector > & material_forces,
std::vector< std::unique_ptr< LocalAssemblerInterface > > const & local_assemblers,
NumLib::LocalToGlobalIndexMap const & local_to_global_index_map,
GlobalVector const & x )

Definition at line 159 of file MaterialForces.h.

165{
166 DBUG("Compute material forces for small deformation process.");
167
168 // Prepare local storage and fetch values.
170
171 if (!material_forces)
172 {
173 material_forces =
175 }
176
177 MathLib::LinAlg::set(*material_forces, 0);
178
180 [](const std::size_t mesh_item_id,
181 LocalAssemblerInterface& local_assembler,
182 const NumLib::LocalToGlobalIndexMap& dof_table,
183 GlobalVector const& x,
184 GlobalVector& node_values)
185 {
186 auto const indices = NumLib::getIndices(mesh_item_id, dof_table);
187 std::vector<double> local_data;
188 auto const local_x = x.get(indices);
189
190 local_assembler.getMaterialForces(local_x, local_data);
191
192 assert(local_data.size() == indices.size());
193 node_values.add(indices, local_data);
194 },
195 local_assemblers, local_to_global_index_map, x, *material_forces);
196 MathLib::LinAlg::finalizeAssembly(*material_forces);
197}
Global vector based on Eigen vector.
Definition EigenVector.h:25
void add(IndexType rowId, double v)
add entry
Definition EigenVector.h:76
double get(IndexType rowId) const
get entry
Definition EigenVector.h:58
void finalizeAssembly(PETScMatrix &A)
Definition LinAlg.cpp:198
void setLocalAccessibleVector(PETScVector const &x)
Definition LinAlg.cpp:27
void set(PETScVector &x, PetscScalar const a)
Definition LinAlg.cpp:32
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
static void executeDereferenced(F const &f, C const &c, Args_ &&... args)

References MathLib::EigenVector::add(), DBUG(), NumLib::SerialExecutor::executeDereferenced(), MathLib::LinAlg::finalizeAssembly(), MathLib::EigenVector::get(), NumLib::getIndices(), MathLib::LinAlg::set(), and MathLib::LinAlg::setLocalAccessibleVector().

Referenced by ProcessLib::SmallDeformation::SmallDeformationProcess< DisplacementDim >::postTimestepConcreteProcess().