Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::CaseFunction Class Reference

Dataset function. More...

#include <arcane/core/CaseFunction.h>

Inheritance diagram for Arcane::CaseFunction:
Collaboration diagram for Arcane::CaseFunction:

Public Member Functions

 CaseFunction (const CaseFunctionBuildInfo &info)
 Constructs a dataset function.
String name () const override
 function name
void setName (const String &new_name) override
 Sets the function name to new_name.
eParamType paramType () const override
 Function parameter type.
void setParamType (eParamType type) override
 Sets the function parameter type.
eValueType valueType () const override
 Function value type.
void setValueType (eValueType type) override
 Sets the function value type.
void setTransformValueFunction (const String &str) override
 Sets a value transformation function. For now, this is just a multiplicative coefficient. The string str must be convertible to the value type.
String transformValueFunction () const override
 Returns the value transformation function.
void setTransformParamFunction (const String &str) override
 Sets a parameter transformation function. For now, this is just a multiplicative coefficient. It is only applied to real parameters. The string str must be convertible to a real number.
String transformParamFunction () const override
 Parameter transformation function.
void setDeltatCoef (Real v) override
 Sets the value of the deltat multiplier coefficient.
Real deltatCoef () const override
 Value of the deltat multiplier coefficient.
bool checkIfValid () const override
 Checks the validity of the function.
Ref< ICaseFunctiontoReference ()
ITraceMngtraceMng () const
Public Member Functions inherited from Arcane::ICaseFunction
virtual ~ICaseFunction ()=default
 Releases resources.
virtual void value (Real param, Real &v) const =0
 Value v of the option for parameter param.
virtual void value (Real param, Integer &v) const =0
 Value v of the option for parameter param.
virtual void value (Real param, bool &v) const =0
 Value v of the option for parameter param.
virtual void value (Real param, String &v) const =0
 Value v of the option for parameter param.
virtual void value (Real param, Real3 &v) const =0
 Value v of the option for parameter param.
virtual void value (Integer param, Real &v) const =0
 Value v of the option for parameter param.
virtual void value (Integer param, Integer &v) const =0
 Value v of the option for parameter param.
virtual void value (Integer param, bool &v) const =0
virtual void value (Integer param, String &v) const =0
 Value v of the option for parameter param.
virtual void value (Integer param, Real3 &v) const =0
 Value v of the option for parameter param.
Public Member Functions inherited from Arcane::ReferenceCounterImpl
void addReference ()
void removeReference ()
void _internalAddReference ()
bool _internalRemoveReference ()

Protected Member Functions

template<typename ParamType>
void _applyParamTransform2 (ParamType &param) const
Real _applyValueComulTransform (Real v, Real comul) const
Integer _applyValueComulTransform (Integer v, Integer comul) const
String _applyValueComulTransform (const String &v, const String &comul) const
bool _applyValueComulTransform (bool v, bool comul) const
Real3 _applyValueComulTransform (Real3 v, Real3 comul) const
void _applyValueTransform (Real &value) const
void _applyValueTransform (Integer &value) const
void _applyValueTransform (String &value) const
void _applyValueTransform (Real3 &value) const
void _applyValueTransform (bool &value) const
template<typename ValueType>
void _applyValueTransform2 (ValueType &value) const
void _applyParamTransform (Real &value) const
void _applyParamTransform (Integer &value) const

Private Member Functions

 ARCCORE_DEFINE_REFERENCE_COUNTED_INCLASS_METHODS ()

Private Attributes

ITraceMngm_trace
 Trace manager.
String m_name
 Name of the function.
eParamType m_param_type
 Parameter type (x).
eValueType m_value_type
 Value type (y).
String m_transform_param_func
 Parameter transformation function.
String m_transform_value_func
 Value transformation function.
Real m_deltat_coef

Additional Inherited Members

Public Types inherited from Arcane::ICaseFunction
enum  eParamType { ParamUnknown = 0 , ParamReal = 1 , ParamInteger = 2 }
 Type of a function parameter. More...
enum  eValueType {
  ValueUnknown = 0 , ValueReal = 1 , ValueInteger = 2 , ValueBool = 3 ,
  ValueString = 4 , ValueReal3 = 5
}
 Type of a function value. More...

Detailed Description

Dataset function.

Definition at line 80 of file CaseFunction.h.

Constructor & Destructor Documentation

◆ CaseFunction()

Arcane::CaseFunction::CaseFunction ( const CaseFunctionBuildInfo & info)
explicit

Constructs a dataset function.

Definition at line 45 of file CaseFunction.cc.

References m_name, m_param_type, m_trace, m_transform_param_func, m_transform_value_func, and m_value_type.

Referenced by Arcane::CaseFunction2::CaseFunction2(), Arcane::CaseTable::CaseTable(), and Arcane::StandardCaseFunction::StandardCaseFunction().

Here is the caller graph for this function:

◆ ~CaseFunction()

Arcane::CaseFunction::~CaseFunction ( )
override

Definition at line 60 of file CaseFunction.cc.

Member Function Documentation

◆ _applyParamTransform() [1/2]

void Arcane::CaseFunction::_applyParamTransform ( Integer & value) const
protected

Definition at line 242 of file CaseFunction.cc.

◆ _applyParamTransform() [2/2]

void Arcane::CaseFunction::_applyParamTransform ( Real & value) const
protected

Definition at line 233 of file CaseFunction.cc.

◆ _applyParamTransform2()

template<typename ParamType>
void Arcane::CaseFunction::_applyParamTransform2 ( ParamType & param) const
protected

Definition at line 213 of file CaseFunction.cc.

◆ _applyValueComulTransform() [1/5]

bool Arcane::CaseFunction::_applyValueComulTransform ( bool v,
bool comul ) const
protected

Definition at line 156 of file CaseFunction.cc.

◆ _applyValueComulTransform() [2/5]

String Arcane::CaseFunction::_applyValueComulTransform ( const String & v,
const String & comul ) const
protected

Definition at line 149 of file CaseFunction.cc.

◆ _applyValueComulTransform() [3/5]

Integer Arcane::CaseFunction::_applyValueComulTransform ( Integer v,
Integer comul ) const
protected

Definition at line 139 of file CaseFunction.cc.

◆ _applyValueComulTransform() [4/5]

Real Arcane::CaseFunction::_applyValueComulTransform ( Real v,
Real comul ) const
protected

Definition at line 134 of file CaseFunction.cc.

◆ _applyValueComulTransform() [5/5]

Real3 Arcane::CaseFunction::_applyValueComulTransform ( Real3 v,
Real3 comul ) const
protected

Definition at line 144 of file CaseFunction.cc.

◆ _applyValueTransform() [1/5]

void Arcane::CaseFunction::_applyValueTransform ( bool & value) const
protected

Definition at line 204 of file CaseFunction.cc.

◆ _applyValueTransform() [2/5]

void Arcane::CaseFunction::_applyValueTransform ( Integer & value) const
protected

Definition at line 194 of file CaseFunction.cc.

◆ _applyValueTransform() [3/5]

void Arcane::CaseFunction::_applyValueTransform ( Real & value) const
protected

Definition at line 184 of file CaseFunction.cc.

◆ _applyValueTransform() [4/5]

void Arcane::CaseFunction::_applyValueTransform ( Real3 & value) const
protected

Definition at line 189 of file CaseFunction.cc.

◆ _applyValueTransform() [5/5]

void Arcane::CaseFunction::_applyValueTransform ( String & value) const
protected

Definition at line 199 of file CaseFunction.cc.

◆ _applyValueTransform2()

template<typename ValueType>
void Arcane::CaseFunction::_applyValueTransform2 ( ValueType & value) const
protected

Definition at line 167 of file CaseFunction.cc.

◆ checkIfValid()

bool Arcane::CaseFunction::checkIfValid ( ) const
overridevirtual

Checks the validity of the function.

Return values
trueif the function is valid,
falseotherwise.

Implements Arcane::ICaseFunction.

Reimplemented in Arcane::CaseTable.

Definition at line 125 of file CaseFunction.cc.

◆ deltatCoef()

Real Arcane::CaseFunction::deltatCoef ( ) const
inlineoverridevirtual

Value of the deltat multiplier coefficient.

Implements Arcane::ICaseFunction.

Definition at line 110 of file CaseFunction.h.

◆ name()

String Arcane::CaseFunction::name ( ) const
inlineoverridevirtual

function name

Implements Arcane::ICaseFunction.

Definition at line 94 of file CaseFunction.h.

References m_name.

Referenced by Arcane::CaseTable::_findValue().

Here is the caller graph for this function:

◆ paramType()

eParamType Arcane::CaseFunction::paramType ( ) const
inlineoverridevirtual

Function parameter type.

Implements Arcane::ICaseFunction.

Definition at line 97 of file CaseFunction.h.

References m_param_type.

Referenced by Arcane::CaseTable::setParamType().

Here is the caller graph for this function:

◆ setDeltatCoef()

void Arcane::CaseFunction::setDeltatCoef ( Real v)
inlineoverridevirtual

Sets the value of the deltat multiplier coefficient.

This coefficient, 0.0 by default, is used for functions that take physical time as a parameter. In this case, the function uses the global current time as a parameter, to which the global current time step multiplied by this coefficient is added.

Implements Arcane::ICaseFunction.

Definition at line 109 of file CaseFunction.h.

◆ setName()

void Arcane::CaseFunction::setName ( const String & new_name)
overridevirtual

Sets the function name to new_name.

Implements Arcane::ICaseFunction.

Definition at line 68 of file CaseFunction.cc.

References m_name, and Arcane::String::null().

Here is the call graph for this function:

◆ setParamType()

void Arcane::CaseFunction::setParamType ( eParamType type)
overridevirtual

Sets the function parameter type.

Implements Arcane::ICaseFunction.

Reimplemented in Arcane::CaseTable.

Definition at line 82 of file CaseFunction.cc.

References m_param_type.

Referenced by Arcane::CaseTable::setParamType().

Here is the caller graph for this function:

◆ setTransformParamFunction()

void Arcane::CaseFunction::setTransformParamFunction ( const String & str)
overridevirtual

Sets a parameter transformation function. For now, this is just a multiplicative coefficient. It is only applied to real parameters. The string str must be convertible to a real number.

Implements Arcane::ICaseFunction.

Definition at line 116 of file CaseFunction.cc.

References m_transform_param_func.

◆ setTransformValueFunction()

void Arcane::CaseFunction::setTransformValueFunction ( const String & str)
overridevirtual

Sets a value transformation function. For now, this is just a multiplicative coefficient. The string str must be convertible to the value type.

Implements Arcane::ICaseFunction.

Definition at line 107 of file CaseFunction.cc.

References m_transform_value_func.

◆ setValueType()

void Arcane::CaseFunction::setValueType ( eValueType type)
overridevirtual

Sets the function value type.

Implements Arcane::ICaseFunction.

Definition at line 93 of file CaseFunction.cc.

References m_value_type.

◆ toReference()

Ref< ICaseFunction > Arcane::CaseFunction::toReference ( )

Definition at line 251 of file CaseFunction.cc.

◆ traceMng()

ITraceMng * Arcane::CaseFunction::traceMng ( ) const
inline

Definition at line 115 of file CaseFunction.h.

◆ transformParamFunction()

String Arcane::CaseFunction::transformParamFunction ( ) const
inlineoverridevirtual

Parameter transformation function.

Implements Arcane::ICaseFunction.

Definition at line 107 of file CaseFunction.h.

References m_transform_param_func.

◆ transformValueFunction()

String Arcane::CaseFunction::transformValueFunction ( ) const
inlineoverridevirtual

Returns the value transformation function.

Implements Arcane::ICaseFunction.

Definition at line 104 of file CaseFunction.h.

References m_transform_value_func.

◆ valueType()

eValueType Arcane::CaseFunction::valueType ( ) const
inlineoverridevirtual

Function value type.

Implements Arcane::ICaseFunction.

Definition at line 100 of file CaseFunction.h.

References m_value_type.

Member Data Documentation

◆ m_deltat_coef

Real Arcane::CaseFunction::m_deltat_coef
private

Definition at line 126 of file CaseFunction.h.

◆ m_name

String Arcane::CaseFunction::m_name
private

Name of the function.

Definition at line 121 of file CaseFunction.h.

Referenced by CaseFunction(), name(), and setName().

◆ m_param_type

eParamType Arcane::CaseFunction::m_param_type
private

Parameter type (x).

Definition at line 122 of file CaseFunction.h.

Referenced by CaseFunction(), paramType(), and setParamType().

◆ m_trace

ITraceMng* Arcane::CaseFunction::m_trace
private

Trace manager.

Definition at line 120 of file CaseFunction.h.

Referenced by CaseFunction().

◆ m_transform_param_func

String Arcane::CaseFunction::m_transform_param_func
private

Parameter transformation function.

Definition at line 124 of file CaseFunction.h.

Referenced by CaseFunction(), setTransformParamFunction(), and transformParamFunction().

◆ m_transform_value_func

String Arcane::CaseFunction::m_transform_value_func
private

Value transformation function.

Definition at line 125 of file CaseFunction.h.

Referenced by CaseFunction(), setTransformValueFunction(), and transformValueFunction().

◆ m_value_type

eValueType Arcane::CaseFunction::m_value_type
private

Value type (y).

Definition at line 123 of file CaseFunction.h.

Referenced by CaseFunction(), setValueType(), and valueType().


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