35 return _property.getNumberOfGlobalComponents();
45 "Trying to access a MeshNodeParameter but the node id is not "
48 auto const num_comp =
_property.getNumberOfGlobalComponents();
49 std::vector<T> cache(num_comp);
50 for (
int c = 0; c < num_comp; ++c)
67 Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> result(
71 auto const nodes = element.
getNodes();
72 for (
unsigned i = 0; i < n_nodes; ++i)
75 auto const& values = this->
operator()(t, x_position);
77 Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, 1>
const>(
78 values.data(), values.size());
virtual unsigned getNumberOfNodes() const =0
virtual Node *const * getNodes() const =0
Get array of element nodes.
std::optional< std::size_t > getNodeID() const
void setNodeID(std::size_t node_id)
std::unique_ptr< ParameterBase > createMeshNodeParameter(std::string const &name, BaseLib::ConfigTree const &config, MeshLib::Mesh const &mesh)
bool isTimeDependent() const override
MeshNodeParameter(std::string const &name_, MeshLib::Mesh const &mesh, MeshLib::PropertyVector< T > const &property)
MeshLib::PropertyVector< T > const & _property
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.
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
MeshLib::Mesh const * mesh() const
std::vector< double > rotateWithCoordinateSystem(std::vector< double > const &values, SpatialPosition const &pos) const
std::optional< CoordinateSystem > _coordinate_system