33namespace SteadyStateDiffusion
44 std::vector<GlobalVector*>
const& x,
45 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
46 std::vector<double>& cache)
const = 0;
49template <
typename ShapeFunction,
int GlobalDim>
69 bool const is_axially_symmetric,
82 std::vector<double>
const& local_x,
83 std::vector<double>
const& ,
84 std::vector<double>& ,
85 std::vector<double>& local_K_data,
86 std::vector<double>& )
override
88 auto const local_matrix_size = local_x.size();
91 assert(local_matrix_size == ShapeFunction::NPOINTS *
NUM_NODAL_DOF);
94 local_K_data, local_matrix_size, local_matrix_size);
96 unsigned const n_integration_points =
109 .template value<double>(vars, pos, t, dt);
111 for (
unsigned ip = 0; ip < n_integration_points; ip++)
117 double p_int_pt = 0.0;
122 .value(vars, pos, t, dt));
124 local_K.noalias() += sm.dNdx.transpose() * k * sm.dNdx * sm.detJ *
125 sm.integralMeasure * wp.getWeight();
133 std::vector<double>
const& local_x)
const override
137 double const dt = std::numeric_limits<double>::quiet_NaN();
142 auto const shape_matrices =
146 std::array{p_local_coords})[0];
159 .template value<double>(vars, pos, t, dt);
160 double pressure = 0.0;
166 .value(vars, pos, t, dt));
168 Eigen::Vector3d flux(0.0, 0.0, 0.0);
169 flux.head<GlobalDim>() =
170 -k * shape_matrices.dNdx *
171 Eigen::Map<const NodalVectorType>(local_x.data(), local_x.size());
177 const unsigned integration_point)
const override
182 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
187 std::vector<GlobalVector*>
const& x,
188 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& dof_table,
189 std::vector<double>& cache)
const override
193 double const dt = std::numeric_limits<double>::quiet_NaN();
195 auto const n_integration_points =
198 int const process_id = 0;
201 assert(!indices.empty());
202 auto const local_x = x[process_id]->get(indices);
203 auto const local_x_vec =
205 local_x, ShapeFunction::NPOINTS);
209 Eigen::Matrix<double, GlobalDim, Eigen::Dynamic, Eigen::RowMajor>>(
210 cache, GlobalDim, n_integration_points);
223 .template value<double>(vars, pos, t, dt);
224 double pressure = 0.0;
225 for (
unsigned i = 0; i < n_integration_points; ++i)
227 pos.setIntegrationPoint(i);
234 .value(vars, pos, t, dt));
236 cache_mat.col(i).noalias() =
248 std::vector<ShapeMatrices, Eigen::aligned_allocator<ShapeMatrices>>
Medium * getMedium(std::size_t element_id)
double liquid_phase_pressure
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)
SteadyStateDiffusionData const & _process_data
void assemble(double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &, std::vector< double > &, std::vector< double > &local_K_data, std::vector< double > &) override
LocalAssemblerData(MeshLib::Element const &element, std::size_t const, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, SteadyStateDiffusionData const &process_data)
typename LocalAssemblerTraits::LocalMatrix NodalMatrixType
ShapeMatrixPolicyType< ShapeFunction, GlobalDim > ShapeMatricesType
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix(const unsigned integration_point) const override
Provides the shape matrix at the given integration point.
std::vector< ShapeMatrices, Eigen::aligned_allocator< ShapeMatrices > > _shape_matrices
typename ShapeMatricesType::ShapeMatrices ShapeMatrices
MeshLib::Element const & _element
Eigen::Vector3d getFlux(MathLib::Point3d const &p_local_coords, double const t, std::vector< double > const &local_x) const override
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
std::vector< double > const & getIntPtDarcyVelocity(const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const override
typename LocalAssemblerTraits::LocalVector NodalVectorType
NumLib::GenericIntegrationMethod const & _integration_method
virtual std::vector< double > const & getIntPtDarcyVelocity(const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const =0
Eigen::Matrix< double, GlobalDim, GlobalDim > formEigenTensor(MaterialPropertyLib::PropertyDataType const &values)
Eigen::Map< const Vector > toVector(std::vector< double > const &data, Eigen::VectorXd::Index size)
Creates an Eigen mapped vector from the given data vector.
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
void shapeFunctionInterpolate(const NodalValues &, const ShapeMatrix &)
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
std::vector< typename ShapeMatricesType::ShapeMatrices, Eigen::aligned_allocator< typename ShapeMatricesType::ShapeMatrices > > computeShapeMatrices(MeshLib::Element const &e, bool const is_axially_symmetric, PointContainer const &points)
const unsigned NUM_NODAL_DOF
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
VectorType< GlobalDim > GlobalDimVectorType
MaterialPropertyLib::MaterialSpatialDistributionMap media_map
Vector< NNodes *NodalDOF > LocalVector
Matrix< NNodes *NodalDOF, NNodes *NodalDOF > LocalMatrix