48 "Trying to access a MeshElementParameter but the element id is "
52 std::vector<T> cache(num_comp);
53 for (
int c = 0; c < num_comp; ++c)
70 Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> result(
76 auto const& values = this->
operator()(t, x_position);
77 auto const row_values =
78 Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, 1>
const>(
79 values.data(), values.size());
80 for (
unsigned i = 0; i < n_nodes; ++i)
82 result.row(i) = row_values;
virtual unsigned getNumberOfNodes() const =0
std::size_t getID() const
Returns the ID of the element.
int getNumberOfGlobalComponents() const
PROP_VAL_TYPE & getComponent(std::size_t tuple_index, int component)
Returns the value for the given component stored in the given tuple.
std::optional< std::size_t > getElementID() const
void setElementID(std::size_t element_id)
std::unique_ptr< ParameterBase > createMeshElementParameter(std::string const &name, BaseLib::ConfigTree const &config, MeshLib::Mesh const &mesh)
A parameter represented by a mesh property vector.
MeshElementParameter(std::string const &name_, MeshLib::Mesh const &mesh, MeshLib::PropertyVector< T > const &property)
std::vector< T > operator()(double const, SpatialPosition const &pos) const override
Returns the parameter value at the given time and position.
int getNumberOfGlobalComponents() const override
bool isTimeDependent() const override
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > getNodalValuesOnElement(MeshLib::Element const &element, double const t) const override
Returns a matrix of values for all nodes of the given element.
MeshLib::PropertyVector< T > const & _property
MeshLib::Mesh const * mesh() const
std::vector< double > rotateWithCoordinateSystem(std::vector< double > const &values, SpatialPosition const &pos) const
std::optional< CoordinateSystem > _coordinate_system