OGS
ParameterLib::Parameter< T > Struct Template Referenceabstract

Detailed Description

template<typename T>
struct ParameterLib::Parameter< T >

A Parameter is a function \( (t, x) \mapsto f(t, x) \in T^n \).

Where \( t \) is the time and \( x \) is the SpatialPosition. \( n \) is the number of components of \(f\)'s results, i.e., 1 for a scalar parameter and >1 for a vectorial or tensorial parameter.

Definition at line 23 of file WellboreGeometry.h.

#include <Parameter.h>

Inheritance diagram for ParameterLib::Parameter< T >:
[legend]
Collaboration diagram for ParameterLib::Parameter< T >:
[legend]

Public Member Functions

 ~Parameter () override=default
 
virtual int getNumberOfGlobalComponents () const =0
 
virtual std::vector< T > operator() (double const t, SpatialPosition const &pos) const =0
 Returns the parameter value at the given time and position.
 
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.
 
 ParameterBase (std::string name_, MeshLib::Mesh const *mesh=nullptr)
 
- Public Member Functions inherited from ParameterLib::ParameterBase
 ParameterBase (std::string name_, MeshLib::Mesh const *mesh=nullptr)
 
virtual ~ParameterBase ()=default
 
virtual bool isTimeDependent () const =0
 
void setCoordinateSystem (CoordinateSystem const &coordinate_system)
 
virtual void initialize (std::vector< std::unique_ptr< ParameterBase > > const &)
 
MeshLib::Mesh const * mesh () const
 

Additional Inherited Members

- Public Attributes inherited from ParameterLib::ParameterBase
std::string const name
 
- Protected Member Functions inherited from ParameterLib::ParameterBase
std::vector< double > rotateWithCoordinateSystem (std::vector< double > const &values, SpatialPosition const &pos) const
 
- Protected Attributes inherited from ParameterLib::ParameterBase
std::optional< CoordinateSystem_coordinate_system
 
MeshLib::Mesh const * _mesh
 

Constructor & Destructor Documentation

◆ ~Parameter()

template<typename T >
ParameterLib::Parameter< T >::~Parameter ( )
overridedefault

Member Function Documentation

◆ getNodalValuesOnElement()

template<typename T >
virtual Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > ParameterLib::Parameter< T >::getNodalValuesOnElement ( MeshLib::Element const & element,
double const t ) const
inlinevirtual

Returns a matrix of values for all nodes of the given element.

Reimplemented in ParameterLib::ConstantParameter< T >, ParameterLib::MeshElementParameter< T >, ParameterLib::MeshNodeParameter< T >, ParameterLib::RandomFieldMeshElementParameter< T >, and ParameterLib::RasterParameter.

Definition at line 164 of file Parameter.h.

166 {
167 auto const n_nodes = static_cast<int>(element.getNumberOfNodes());
168 auto const n_components = getNumberOfGlobalComponents();
169 Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> result(n_nodes,
170 n_components);
171
172 // Column vector of values, copied for each node.
173 SpatialPosition x_position;
174 auto const nodes = element.getNodes();
175 for (int i = 0; i < n_nodes; ++i)
176 {
177 x_position.setAll(
178 nodes[i]->getID(), element.getID(), std::nullopt, *nodes[i]);
179 auto const& values = this->operator()(t, x_position);
180 auto const row_values =
181 Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, 1> const>(
182 values.data(), values.size());
183 result.row(i) = row_values;
184 }
185
186 return result;
187 }
virtual int getNumberOfGlobalComponents() const =0
virtual std::vector< T > operator()(double const t, SpatialPosition const &pos) const =0
Returns the parameter value at the given time and position.

References MeshLib::Element::getID(), MeshLib::Element::getNodes(), ParameterLib::Parameter< T >::getNumberOfGlobalComponents(), MeshLib::Element::getNumberOfNodes(), ParameterLib::Parameter< T >::operator()(), and ParameterLib::SpatialPosition::setAll().

Referenced by ProcessLib::WellboreSimulator::WellboreSimulatorFEM< ShapeFunction, GlobalDim >::WellboreSimulatorFEM(), ProcessLib::HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryConditionLocalAssembler< ShapeFunctionDisplacement, GlobalDim >::assemble(), ProcessLib::RobinBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::VariableDependentNeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianComponentTransportEquation(), and ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getLocalTemperature().

◆ getNumberOfGlobalComponents()

◆ operator()()

◆ ParameterBase()

template<typename T >
ParameterLib::ParameterBase::ParameterBase ( std::string name_,
MeshLib::Mesh const * mesh = nullptr )
inlineexplicit

Definition at line 49 of file Parameter.h.

51 : name(std::move(name_)), _mesh(mesh)
52 {
53 }
MeshLib::Mesh const * _mesh
Definition Parameter.h:130
std::string const name
Definition Parameter.h:73
MeshLib::Mesh const * mesh() const
Definition Parameter.h:71

The documentation for this struct was generated from the following files: