OGS
SmallDeformationLocalAssemblerMatrix.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <vector>
14
22#include "SecondaryData.h"
24
25namespace ProcessLib
26{
27namespace LIE
28{
29namespace SmallDeformation
30{
31namespace MPL = MaterialPropertyLib;
32
33template <typename ShapeFunction, int DisplacementDim>
36{
37public:
44
49
54
56 MeshLib::Element const& e,
57 std::size_t const local_matrix_size,
58 NumLib::GenericIntegrationMethod const& integration_method,
59 bool const is_axially_symmetric,
61
62 void assemble(double const /*t*/, double const /*dt*/,
63 std::vector<double> const& /*local_x*/,
64 std::vector<double> const& /*local_x_prev*/,
65 std::vector<double>& /*local_M_data*/,
66 std::vector<double>& /*local_K_data*/,
67 std::vector<double>& /*local_b_data*/) override
68 {
70 "SmallDeformationLocalAssembler: assembly without jacobian is not "
71 "implemented.");
72 }
73
74 void assembleWithJacobian(double const t, double const dt,
75 std::vector<double> const& local_x,
76 std::vector<double> const& /*local_x_prev*/,
77 std::vector<double>& /*local_M_data*/,
78 std::vector<double>& /*local_K_data*/,
79 std::vector<double>& local_b_data,
80 std::vector<double>& local_Jac_data) override;
81
82 void preTimestepConcrete(std::vector<double> const& /*local_x*/,
83 double const /*t*/,
84 double const /*delta_t*/) override
85 {
86 unsigned const n_integration_points =
88
89 for (unsigned ip = 0; ip < n_integration_points; ip++)
90 {
91 _ip_data[ip].pushBackState();
92 }
93 }
94
96 double const t, Eigen::VectorXd const& local_x) override;
97
98 Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix(
99 const unsigned integration_point) const override
100 {
101 auto const& N = _secondary_data.N[integration_point];
102
103 // assumes N is stored contiguously in memory
104 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
105 }
106
107 std::vector<double> const& getIntPtSigma(
108 const double t,
109 std::vector<GlobalVector*> const& x,
110 std::vector<NumLib::LocalToGlobalIndexMap const*> const& dof_table,
111 std::vector<double>& cache) const override;
112
113 std::vector<double> const& getIntPtEpsilon(
114 const double t,
115 std::vector<GlobalVector*> const& x,
116 std::vector<NumLib::LocalToGlobalIndexMap const*> const& dof_table,
117 std::vector<double>& cache) const override;
118
119 std::vector<double> const& getIntPtFractureStress(
120 const double /*t*/,
121 std::vector<GlobalVector*> const& /*x*/,
122 std::vector<NumLib::LocalToGlobalIndexMap const*> const& /*dof_table*/,
123 std::vector<double>& cache) const override
124 {
125 cache.resize(0);
126 return cache;
127 }
128
129 std::vector<double> const& getIntPtFractureAperture(
130 const double /*t*/,
131 std::vector<GlobalVector*> const& /*x*/,
132 std::vector<NumLib::LocalToGlobalIndexMap const*> const& /*dof_table*/,
133 std::vector<double>& cache) const override
134 {
135 cache.resize(0);
136 return cache;
137 }
138
139private:
141
144 DisplacementDim>;
145 std::vector<IntegrationPointDataType,
146 Eigen::aligned_allocator<IntegrationPointDataType>>
148
153};
154
155} // namespace SmallDeformation
156} // namespace LIE
157} // namespace ProcessLib
158
#define OGS_FATAL(...)
Definition Error.h:26
MatrixType< _number_of_dof, _number_of_dof > StiffnessMatrixType
VectorType< _number_of_dof > NodalForceVectorType
Rhs residual.
void computeSecondaryVariableConcreteWithVector(double const t, Eigen::VectorXd const &local_x) override
std::vector< double > const & getIntPtFractureStress(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
std::vector< double > const & getIntPtFractureAperture(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
std::vector< IntegrationPointDataType, Eigen::aligned_allocator< IntegrationPointDataType > > _ip_data
void assemble(double const, double const, std::vector< double > const &, std::vector< double > const &, std::vector< double > &, std::vector< double > &, std::vector< double > &) override
void assembleWithJacobian(double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &, std::vector< double > &, std::vector< double > &, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data) override
SmallDeformationLocalAssemblerMatrix(SmallDeformationLocalAssemblerMatrix &&)=delete
IntegrationPointDataMatrix< ShapeMatricesType, BMatricesType, DisplacementDim > IntegrationPointDataType
std::vector< double > const & getIntPtSigma(const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const override
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix(const unsigned integration_point) const override
Provides the shape matrix at the given integration point.
void preTimestepConcrete(std::vector< double > const &, double const, double const) override
std::vector< double > const & getIntPtEpsilon(const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const override
SmallDeformationLocalAssemblerMatrix(SmallDeformationLocalAssemblerMatrix const &)=delete
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
VectorType< ShapeFunction::NPOINTS > NodalVectorType
std::vector< ShapeMatrixType, Eigen::aligned_allocator< ShapeMatrixType > > N