36namespace SmallDeformation
40template <
typename BMatricesType,
typename ShapeMatricesType,
45 typename ShapeMatricesType::NodalRowVectorType
N_u;
46 typename ShapeMatricesType::GlobalDimNodalMatrixType
dNdx_u;
53template <
typename ShapeMatrixType>
56 std::vector<ShapeMatrixType, Eigen::aligned_allocator<ShapeMatrixType>>
N;
59template <
typename ShapeFunction,
int DisplacementDim>
95 bool const is_axially_symmetric,
98 e, integration_method, is_axially_symmetric, process_data)
100 unsigned const n_integration_points =
103 _ip_data.resize(n_integration_points);
106 auto const shape_matrices =
111 for (
unsigned ip = 0; ip < n_integration_points; ip++)
114 auto const& sm = shape_matrices[ip];
117 sm.integralMeasure * sm.detJ;
120 ip_data.dNdx_u = sm.dNdx;
128 unsigned const n_integration_points =
130 for (
unsigned ip = 0; ip < n_integration_points; ip++)
148 double>::quiet_NaN() ,
155 t, x_position, *material_state.material_state_variables);
157 material_state.pushBackState();
160 for (
unsigned ip = 0; ip < n_integration_points; ip++)
168 BMatrixType const& B, Eigen::Ref<Eigen::VectorXd const>
const& u,
169 Eigen::Ref<Eigen::VectorXd const>
const& u_prev,
185 ? (*this->
process_data_.reference_temperature)(t, x_position)[0]
186 : std::numeric_limits<double>::quiet_NaN();
194 CS.
eval(models, t, dt, x_position,
196 T_ref, B * u, B * u_prev,
197 current_state, prev_state, material_state, tmp, output_data,
204 std::vector<double>
const& ,
205 std::vector<double>
const& ,
206 std::vector<double>& ,
207 std::vector<double>& ,
208 std::vector<double>& )
override
211 "SmallDeformationLocalAssembler: assembly without jacobian is not "
223 DisplacementDim, ShapeFunction::NPOINTS, ShapeFunction,
230 std::vector<double>
const& local_x,
231 std::vector<double>
const& local_x_prev,
232 std::vector<double>& local_b_data,
233 std::vector<double>& local_Jac_data)
override
235 auto const local_matrix_size = local_x.size();
238 local_Jac_data, local_matrix_size, local_matrix_size);
241 local_b_data, local_matrix_size);
244 auto [u_prev] =
localDOF(local_x_prev);
246 unsigned const n_integration_points =
259 for (
unsigned ip = 0; ip < n_integration_points; ip++)
262 auto const& w =
_ip_data[ip].integration_weight;
264 auto const& dNdx =
_ip_data[ip].dNdx_u;
281 auto const& b = *CD.volumetric_body_force;
282 auto const& C = CD.s_mech_data.stiffness_tensor;
285 (B.transpose() * sigma -
N_u_op(N).transpose() * b) * w;
286 local_Jac.noalias() += B.transpose() * C * B * w;
291 Eigen::VectorXd
const& local_x_prev,
292 double const t,
double const dt,
295 unsigned const n_integration_points =
309 for (
unsigned ip = 0; ip < n_integration_points; ip++)
313 auto const& dNdx =
_ip_data[ip].dNdx_u;
325 B, local_x, local_x_prev, x_position, t, dt,
333 for (
unsigned ip = 0; ip < n_integration_points; ip++)
340 std::vector<double>
const& local_x,
341 std::vector<double>& nodal_values)
override
354 const unsigned integration_point)
const override
359 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
363 static constexpr auto localDOF(std::vector<double>
const& x)
370 std::vector<IpData, Eigen::aligned_allocator<IpData>>
_ip_data;
std::size_t getID() const
Returns the ID of the element.
MathLib::WeightedPoint const & getWeightedPoint(unsigned const igp) const
unsigned getNumberOfPoints() const
void setElementID(std::size_t element_id)
void setIntegrationPoint(unsigned integration_point)
MatrixType< _kelvin_vector_size, _number_of_dof > BMatrixType
MatrixType< 3, ShapeFunction::NPOINTS > BBarMatrixType
MatrixType< _number_of_dof, _number_of_dof > StiffnessMatrixType
VectorType< _number_of_dof > NodalForceVectorType
Rhs residual.
VectorTypeFixedSize< MathLib::VectorizedTensor::size(DisplacementDim)> GradientVectorType
MatrixType< MathLib::VectorizedTensor::size(DisplacementDim), _number_of_dof > GradientMatrixType
Eigen::Matrix< double, Eigen::MatrixBase< Derived >::RowsAtCompileTime, 1 > symmetricTensorToKelvinVector(Eigen::MatrixBase< Derived > const &v)
constexpr Eigen::CwiseNullaryOp< EigenBlockMatrixViewFunctor< D, M >, typename EigenBlockMatrixViewFunctor< D, M >::Matrix > eigenBlockMatrixView(const Eigen::MatrixBase< M > &matrix)
Eigen::Map< Vector > createZeroedVector(std::vector< double > &data, Eigen::VectorXd::Index size)
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
double interpolateXCoordinate(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
std::vector< typename ShapeMatricesType::ShapeMatrices, Eigen::aligned_allocator< typename ShapeMatricesType::ShapeMatrices > > initShapeMatrices(MeshLib::Element const &e, bool const is_axially_symmetric, IntegrationMethod const &integration_method)
auto localDOF(ElementDOFVector const &x)
std::array< double, 3 > interpolateCoordinates(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
BBarMatrixType computeDilatationalBbar(std::vector< IpData, Eigen::aligned_allocator< IpData > > const &ip_data, MeshLib::Element const &element, NumLib::GenericIntegrationMethod const &integration_method, const bool is_axially_symmetric)
BMatrixType computeBMatrixPossiblyWithBbar(DNDX_Type const &dNdx, N_Type const &N, std::optional< BBarMatrixType > const &B_dil_bar, const double radius, const bool is_axially_symmetric)
Fills a B matrix, or a B bar matrix if required.
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
VectorType< ShapeFunction::NPOINTS > NodalVectorType
RowVectorType< ShapeFunction::NPOINTS > NodalRowVectorType