6#include <dune/localfefunctions/manifolds/realTuple.hh>
25 template <
typename FERequirementType,
typename LocalView,
typename ScalarType>
27 const std::optional<
const Eigen::VectorX<ScalarType>>& dx = std::nullopt) {
29 constexpr int worldDim = Traits::worlddim;
30 const auto& fe = localView.tree().child(0).finiteElement();
31 Dune::BlockVector<Dune::RealTuple<ScalarType, worldDim>> localX(fe.size());
33 for (
auto i = 0U; i < localX.size(); ++i)
34 for (
auto j = 0U; j < worldDim; ++j)
35 localX[i][j] = dx.value()[i * worldDim + j] + x[localView.index(localView.tree().child(j).localIndex(i))[0]];
37 for (
auto i = 0U; i < localX.size(); ++i)
38 for (
auto j = 0U; j < worldDim; ++j)
39 localX[i][j] = x[localView.index(localView.tree().child(j).localIndex(i))[0]];
Material property functions and conversion utilities.
Definition of the LinearElastic class for finite element mechanics computations.
Definition: fehelper.hh:11
auto localSolutionBlockVector(const typename FERequirementType::SolutionVectorTypeRaw &x, const LocalView &localView, const std::optional< const Eigen::VectorX< ScalarType > > &dx=std::nullopt)
Gets the local solution Dune block vector.
Definition: fehelper.hh:26
Traits for handling local views.see https://en.wikipedia.org/wiki/Lam%C3%A9_parameters.
Definition: physicshelper.hh:65