version 0.4
Ikarus::ResultRequirements< FERequirements > Class Template Reference

Class representing the requirements for obtaining specific results. More...

#include <ikarus/finiteelements/ferequirements.hh>

Public Types

using ParameterTypeRaw = typename FERequirements::ParameterTypeRaw
 
using SolutionVectorType = typename FERequirements::SolutionVectorType
 
using SolutionVectorTypeRaw = typename FERequirements::SolutionVectorTypeRaw
 

Public Member Functions

 ResultRequirements (FERequirements &&req, std::set< ResultType > &&p_resType)
 Constructor with FERequirements and result types. More...
 
 ResultRequirements (const FERequirements &req)
 Constructor with only FERequirements. More...
 
 ResultRequirements ()=default
 Default constructor. More...
 
bool isResultRequested (ResultType &&key) const
 Check if a specific result type is requested. More...
 
template<FEAffordance Affordance>
ResultRequirementsaddAffordance (Affordance &&affordance)
 Add an affordance to the finite element requirements. More...
 
ResultRequirementsinsertParameter (FEParameter &&key, ParameterTypeRaw &val)
 Insert a parameter into the finite element requirements. More...
 
ResultRequirementsinsertGlobalSolution (FESolutions &&key, SolutionVectorTypeRaw &sol)
 Insert a global solution into the finite element requirements. More...
 
template<ResultTypeConcept... ResultTypes>
ResultRequirementsaddResultRequest (ResultTypes &&... keys)
 Add one or more result types to the set of requested results. More...
 
const SolutionVectorTypeRawgetGlobalSolution (FESolutions &&key) const
 Get the global solution for a specific global solution type. More...
 
const ParameterTypeRawgetParameter (FEParameter &&key) const
 Get the value of a specific parameter. More...
 
const FERequirementsgetFERequirements () const
 Get the associated finite element requirements. More...
 
auto getRequestedResult () const
 Get the requested result type. More...
 

Detailed Description

template<typename FERequirements = FERequirements<>>
class Ikarus::ResultRequirements< FERequirements >

This class encapsulates the requirements for obtaining results, including the desired result types, associated affordances, and input parameters. It is templated on the type of FERequirements.

Template Parameters
FERequirementsType representing the finite element requirements. Default is FERequirements<>.

Member Typedef Documentation

◆ ParameterTypeRaw

template<typename FERequirements = FERequirements<>>
using Ikarus::ResultRequirements< FERequirements >::ParameterTypeRaw = typename FERequirements::ParameterTypeRaw

◆ SolutionVectorType

template<typename FERequirements = FERequirements<>>
using Ikarus::ResultRequirements< FERequirements >::SolutionVectorType = typename FERequirements::SolutionVectorType

◆ SolutionVectorTypeRaw

template<typename FERequirements = FERequirements<>>
using Ikarus::ResultRequirements< FERequirements >::SolutionVectorTypeRaw = typename FERequirements::SolutionVectorTypeRaw

Constructor & Destructor Documentation

◆ ResultRequirements() [1/3]

template<typename FERequirements = FERequirements<>>
Ikarus::ResultRequirements< FERequirements >::ResultRequirements ( FERequirements &&  req,
std::set< ResultType > &&  p_resType 
)
inline

Constructs a ResultRequirements object with the given FErequirements and set of result types.

Parameters
reqFinite element requirements.
p_resTypeSet of result types.

◆ ResultRequirements() [2/3]

template<typename FERequirements = FERequirements<>>
Ikarus::ResultRequirements< FERequirements >::ResultRequirements ( const FERequirements req)
inlineexplicit

Constructs a ResultRequirements object with the given FERequirements and an empty set of result types.

Parameters
reqFinite element requirements.

◆ ResultRequirements() [3/3]

template<typename FERequirements = FERequirements<>>
Ikarus::ResultRequirements< FERequirements >::ResultRequirements ( )
default

Constructs an empty ResultRequirements object.

Member Function Documentation

◆ addAffordance()

template<typename FERequirements = FERequirements<>>
template<FEAffordance Affordance>
ResultRequirements & Ikarus::ResultRequirements< FERequirements >::addAffordance ( Affordance &&  affordance)
inline

Adds the specified affordance to the finite element requirements.

Template Parameters
AffordanceType of affordance to be added.
Parameters
affordanceThe affordance to be added.
Returns
Reference to the ResultRequirements object.

◆ addResultRequest()

template<typename FERequirements = FERequirements<>>
template<ResultTypeConcept... ResultTypes>
ResultRequirements & Ikarus::ResultRequirements< FERequirements >::addResultRequest ( ResultTypes &&...  keys)
inline

Adds the specified result types to the set of requested results.

Template Parameters
ResultTypesTypes of results to be added.
Parameters
keysThe result types to be added.
Returns
Reference to the ResultRequirements object.

◆ getFERequirements()

template<typename FERequirements = FERequirements<>>
const FERequirements & Ikarus::ResultRequirements< FERequirements >::getFERequirements ( ) const
inline

Retrieves the associated finite element requirements.

Returns
Reference to the finite element requirements.

◆ getGlobalSolution()

template<typename FERequirements = FERequirements<>>
const SolutionVectorTypeRaw & Ikarus::ResultRequirements< FERequirements >::getGlobalSolution ( FESolutions &&  key) const
inline

Retrieves the global solution for the specified global solution type.

Parameters
keyThe global solution type.
Returns
Reference to the global solution value.

◆ getParameter()

template<typename FERequirements = FERequirements<>>
const ParameterTypeRaw & Ikarus::ResultRequirements< FERequirements >::getParameter ( FEParameter &&  key) const
inline

Retrieves the value of the specified parameter.

Parameters
keyThe parameter key.
Returns
Reference to the parameter value.

◆ getRequestedResult()

template<typename FERequirements = FERequirements<>>
auto Ikarus::ResultRequirements< FERequirements >::getRequestedResult ( ) const
inline

Retrieves the requested result type when only a single result type is present in the set of requested results.

Returns
Reference to the requested result type.
Exceptions
Dune::InvalidStateExceptionif the set of requested results does not contain a single result type.

◆ insertGlobalSolution()

template<typename FERequirements = FERequirements<>>
ResultRequirements & Ikarus::ResultRequirements< FERequirements >::insertGlobalSolution ( FESolutions &&  key,
SolutionVectorTypeRaw sol 
)
inline

Inserts the specified global solution into the finite element requirements.

Parameters
keyThe global solution key.
solThe global solution value.
Returns
Reference to the ResultRequirements object.

◆ insertParameter()

template<typename FERequirements = FERequirements<>>
ResultRequirements & Ikarus::ResultRequirements< FERequirements >::insertParameter ( FEParameter &&  key,
ParameterTypeRaw val 
)
inline

Inserts the specified parameter into the finite element requirements.

Parameters
keyThe parameter key.
valThe parameter value.
Returns
Reference to the ResultRequirements object.

◆ isResultRequested()

template<typename FERequirements = FERequirements<>>
bool Ikarus::ResultRequirements< FERequirements >::isResultRequested ( ResultType &&  key) const
inline

Checks if the specified result type is requested.

Parameters
keyThe result type to check.
Returns
True if the result type is requested, false otherwise.

The documentation for this class was generated from the following file: