33class PiecewiseLinearInterpolation;
66 std::vector<std::unique_ptr<ParameterBase>>
const& )
82 if (values.size() == 1)
86 if (values.size() == 2)
90 return {result(0, 0), result(0, 1), result(1, 0), result(1, 1)};
92 if (values.size() == 3)
97 result(0, 0), result(0, 1), result(0, 2),
98 result(1, 0), result(1, 1), result(1, 2),
99 result(2, 0), result(2, 1), result(2, 2),
102 if (values.size() == 4)
106 return {result(0, 0), result(0, 1), result(1, 0), result(1, 1)};
108 if (values.size() == 9)
113 result(0, 0), result(0, 1), result(0, 2),
114 result(1, 0), result(1, 1), result(1, 2),
115 result(2, 0), result(2, 1), result(2, 2),
119 "Coordinate transformation for a {:d}-component parameter is not "
162 virtual Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
164 double const t)
const
168 Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> result(n_nodes,
173 auto const nodes = element.
getNodes();
174 for (
int i = 0; i < n_nodes; ++i)
177 nodes[i]->getID(), element.
getID(), std::nullopt, *nodes[i]);
178 auto const& values = this->
operator()(t, x_position);
179 auto const row_values =
180 Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, 1>
const>(
181 values.data(), values.size());
182 result.row(i) = row_values;
194 const std::vector<std::unique_ptr<MeshLib::Mesh>>& meshes,
195 std::map<std::string,
196 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>>
const&
Definition of the Element class.
Definition of the Node class.
virtual unsigned getNumberOfNodes() const =0
virtual Node *const * getNodes() const =0
Get array of element nodes.
virtual std::size_t getID() const final
Returns the ID of the element.
void setAll(std::optional< std::size_t > const &node_id, std::optional< std::size_t > const &element_id, std::optional< unsigned > const &integration_point, std::optional< MathLib::Point3d > const &coordinates)
std::unique_ptr< ParameterBase > createParameter(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
std::optional< std::string > isDefinedOnSameMesh(ParameterBase const ¶meter, MeshLib::Mesh const &mesh)
MeshLib::Mesh const * _mesh
virtual bool isTimeDependent() const =0
MeshLib::Mesh const * mesh() const
virtual void initialize(std::vector< std::unique_ptr< ParameterBase > > const &)
std::vector< double > rotateWithCoordinateSystem(std::vector< double > const &values, SpatialPosition const &pos) const
ParameterBase(std::string name_, MeshLib::Mesh const *mesh=nullptr)
std::optional< CoordinateSystem > _coordinate_system
void setCoordinateSystem(CoordinateSystem const &coordinate_system)
virtual ~ParameterBase()=default
~Parameter() override=default
virtual int getNumberOfGlobalComponents() const =0
virtual Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > getNodalValuesOnElement(MeshLib::Element const &element, double const t) const
Returns a matrix of values for all nodes of the given element.
virtual std::vector< T > operator()(double const t, SpatialPosition const &pos) const =0
Returns the parameter value at the given time and position.