Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::Materials::IMeshMaterialVariable Class Referenceabstract

Interface of a material variable on a mesh. More...

#include <arcane/core/materials/IMeshMaterialVariable.h>

Public Member Functions

virtual String name () const =0
 Name of the variable.
virtual IVariableglobalVariable () const =0
 Associated global variable on the mesh.
virtual void buildFromManager (bool is_continue)=0
virtual void syncReferences ()=0
 Synchronizes references.
virtual void addVariableRef (MeshMaterialVariableRef *var_ref)=0
 Adds a reference to this variable.
virtual void removeVariableRef (MeshMaterialVariableRef *var_ref)=0
 Removes a reference to this variable.
virtual MeshMaterialVariableReffirstReference () const =0
virtual IVariablematerialVariable (IMeshMaterial *mat)=0
virtual void setKeepOnChange (bool v)=0
 Indicates whether the variable value should be kept after a change in the list of materials.
virtual bool keepOnChange () const =0
 Indicates whether the variable value should be kept after a change in the list of materials.
virtual void synchronize ()=0
 Synchronizes the variable.
virtual void synchronize (MeshMaterialVariableSynchronizerList &sync_list)=0
virtual void dumpValues (std::ostream &ostr)=0
 Dumps the variable values to the stream ostr.
virtual void dumpValues (std::ostream &ostr, AllEnvCellVectorView view)=0
 Dumps the variable values for the view view to the stream ostr.
virtual void fillPartialValuesWithGlobalValues ()=0
 Fills partial values with the value of the associated global cell.
virtual void fillPartialValuesWithSuperValues (Int32 level)=0
 Fills partial values with the value of the super cell. If level equals LEVEL_MATERIAL, it copies material values with the middle one. If level equals LEVEL_ENVIRONMENT, it copies environment values with the global cell's. If level equals LEVEL_ALLENVIRONMENT, it fills all partial values with the global cell's value (this makes this method equivalent to fillGlobalValuesWithGlobalValues()).
virtual void serialize (ISerializer *sbuffer, Int32ConstArrayView ids)=0
 Serializes the variable for local ID entities ids.
virtual MatVarSpace space () const =0
 Variable definition space (material+environment or environment only).
Dependency Management
virtual void update (IMeshMaterial *mat)=0
 Recalculates the variable for material mat if necessary.
virtual void setUpToDate (IMeshMaterial *mat)=0
 Indicates that the variable has just been updated.
virtual Int64 modifiedTime (IMeshMaterial *mat)=0
 Time when the variable was updated.
virtual void addDepend (IMeshMaterialVariable *var)=0
 Adds var to the dependency list.
virtual void addDepend (IMeshMaterialVariable *var, const TraceInfo &tinfo)=0
 Adds var to the dependency list with trace info tinfo.
virtual void addDepend (IVariable *var)=0
 Adds var to the dependency list.
virtual void addDepend (IVariable *var, const TraceInfo &tinfo)=0
 Adds var to the dependency list with trace info tinfo.
virtual void removeDepend (IMeshMaterialVariable *var)=0
 Removes var from the dependency list.
virtual void removeDepend (IVariable *var)=0
 Removes var from the dependency list.
virtual void setComputeFunction (IMeshMaterialVariableComputeFunction *v)=0
 Sets the variable's recalculation function.
virtual IMeshMaterialVariableComputeFunctioncomputeFunction ()=0
 Function used to update the variable.
virtual void dependInfos (Array< VariableDependInfo > &infos, Array< MeshMaterialVariableDependInfo > &mat_infos)=0
 Dependency information.
virtual IMeshMaterialVariableInternal * _internalApi ()=0

Detailed Description

Interface of a material variable on a mesh.

Definition at line 47 of file core/materials/IMeshMaterialVariable.h.

Member Function Documentation

◆ addDepend() [1/4]

virtual void Arcane::Materials::IMeshMaterialVariable::addDepend ( IMeshMaterialVariable * var)
pure virtual

Adds var to the dependency list.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ addDepend() [2/4]

virtual void Arcane::Materials::IMeshMaterialVariable::addDepend ( IMeshMaterialVariable * var,
const TraceInfo & tinfo )
pure virtual

Adds var to the dependency list with trace info tinfo.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ addDepend() [3/4]

virtual void Arcane::Materials::IMeshMaterialVariable::addDepend ( IVariable * var)
pure virtual

Adds var to the dependency list.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ addDepend() [4/4]

virtual void Arcane::Materials::IMeshMaterialVariable::addDepend ( IVariable * var,
const TraceInfo & tinfo )
pure virtual

Adds var to the dependency list with trace info tinfo.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ addVariableRef()

virtual void Arcane::Materials::IMeshMaterialVariable::addVariableRef ( MeshMaterialVariableRef * var_ref)
pure virtual

Adds a reference to this variable.

Precondition: var_ref must not already reference a variable.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ computeFunction()

virtual IMeshMaterialVariableComputeFunction * Arcane::Materials::IMeshMaterialVariable::computeFunction ( )
pure virtual

Function used to update the variable.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ dependInfos()

virtual void Arcane::Materials::IMeshMaterialVariable::dependInfos ( Array< VariableDependInfo > & infos,
Array< MeshMaterialVariableDependInfo > & mat_infos )
pure virtual

Dependency information.

Fills the array infos with dependency information on global variables and the array mat_infos with those on material variables.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ dumpValues() [1/2]

virtual void Arcane::Materials::IMeshMaterialVariable::dumpValues ( std::ostream & ostr)
pure virtual

◆ dumpValues() [2/2]

virtual void Arcane::Materials::IMeshMaterialVariable::dumpValues ( std::ostream & ostr,
AllEnvCellVectorView view )
pure virtual

Dumps the variable values for the view view to the stream ostr.

Implemented in Arcane::Materials::ItemMaterialVariableArray< DataType >, and Arcane::Materials::ItemMaterialVariableScalar< DataType >.

◆ fillPartialValuesWithGlobalValues()

virtual void Arcane::Materials::IMeshMaterialVariable::fillPartialValuesWithGlobalValues ( )
pure virtual

◆ fillPartialValuesWithSuperValues()

virtual void Arcane::Materials::IMeshMaterialVariable::fillPartialValuesWithSuperValues ( Int32 level)
pure virtual

Fills partial values with the value of the super cell. If level equals LEVEL_MATERIAL, it copies material values with the middle one. If level equals LEVEL_ENVIRONMENT, it copies environment values with the global cell's. If level equals LEVEL_ALLENVIRONMENT, it fills all partial values with the global cell's value (this makes this method equivalent to fillGlobalValuesWithGlobalValues()).

Implemented in Arcane::Materials::ItemMaterialVariableBase< Traits >, Arcane::Materials::ItemMaterialVariableBase< MaterialVariableArrayTraits< DataType > >, and Arcane::Materials::ItemMaterialVariableBase< MaterialVariableScalarTraits< DataType > >.

◆ globalVariable()

◆ keepOnChange()

virtual bool Arcane::Materials::IMeshMaterialVariable::keepOnChange ( ) const
pure virtual

Indicates whether the variable value should be kept after a change in the list of materials.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ modifiedTime()

virtual Int64 Arcane::Materials::IMeshMaterialVariable::modifiedTime ( IMeshMaterial * mat)
pure virtual

Time when the variable was updated.

Implemented in Arcane::Materials::MeshMaterialVariable.

Referenced by Arcane::Materials::MeshMaterialVariable::update().

◆ name()

virtual String Arcane::Materials::IMeshMaterialVariable::name ( ) const
pure virtual

Name of the variable.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ removeDepend() [1/2]

virtual void Arcane::Materials::IMeshMaterialVariable::removeDepend ( IMeshMaterialVariable * var)
pure virtual

Removes var from the dependency list.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ removeDepend() [2/2]

virtual void Arcane::Materials::IMeshMaterialVariable::removeDepend ( IVariable * var)
pure virtual

Removes var from the dependency list.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ removeVariableRef()

virtual void Arcane::Materials::IMeshMaterialVariable::removeVariableRef ( MeshMaterialVariableRef * var_ref)
pure virtual

Removes a reference to this variable.

Precondition: var_ref must reference this variable (a call to addVariableRef() must have been made on this variable).

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ serialize()

virtual void Arcane::Materials::IMeshMaterialVariable::serialize ( ISerializer * sbuffer,
Int32ConstArrayView ids )
pure virtual

◆ setComputeFunction()

virtual void Arcane::Materials::IMeshMaterialVariable::setComputeFunction ( IMeshMaterialVariableComputeFunction * v)
pure virtual

Sets the variable's recalculation function.

If a recalculation function already existed, it is destroyed and replaced by this one.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ setKeepOnChange()

virtual void Arcane::Materials::IMeshMaterialVariable::setKeepOnChange ( bool v)
pure virtual

Indicates whether the variable value should be kept after a change in the list of materials.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ setUpToDate()

virtual void Arcane::Materials::IMeshMaterialVariable::setUpToDate ( IMeshMaterial * mat)
pure virtual

Indicates that the variable has just been updated.

For correct dependency management, this property must be called every time a variable has been updated.

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ space()

virtual MatVarSpace Arcane::Materials::IMeshMaterialVariable::space ( ) const
pure virtual

Variable definition space (material+environment or environment only).

Implemented in Arcane::Materials::MeshMaterialVariable.

◆ synchronize()

virtual void Arcane::Materials::IMeshMaterialVariable::synchronize ( )
pure virtual

Synchronizes the variable.

Synchronization is performed across all materials of the cell. It is essential that all ghost cells already have the correct number of materials.

Implemented in Arcane::Materials::ItemMaterialVariableArray< DataType >, and Arcane::Materials::ItemMaterialVariableScalar< DataType >.

References synchronize().

Referenced by synchronize().

◆ syncReferences()

virtual void Arcane::Materials::IMeshMaterialVariable::syncReferences ( )
pure virtual

Synchronizes references.

Synchronizes the values of references (VariableRef) to this variable with the current value of the variable. This method is called automatically when the number of elements of an array variable changes.

Implemented in Arcane::Materials::ItemMaterialVariableBase< Traits >, Arcane::Materials::ItemMaterialVariableBase< MaterialVariableArrayTraits< DataType > >, and Arcane::Materials::ItemMaterialVariableBase< MaterialVariableScalarTraits< DataType > >.

◆ update()

virtual void Arcane::Materials::IMeshMaterialVariable::update ( IMeshMaterial * mat)
pure virtual

Recalculates the variable for material mat if necessary.

Through the dependency mechanism, this operation is called recursively on all variables that the instance depends on. The recalculation function computeFunction() is then called if it turns out that one of the variables it depends on has been modified more recently.

Precondition: computeFunction() != 0

Implemented in Arcane::Materials::MeshMaterialVariable.


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