Public Member Functions | |
| MeshMaterialVariable (const MaterialVariableBuildInfo &v, MatVarSpace mvs) | |
| String | name () const override |
| Name of the variable. | |
| void | addVariableRef (MeshMaterialVariableRef *var_ref) override |
| Adds a reference to this variable. | |
| void | removeVariableRef (MeshMaterialVariableRef *var_ref) override |
| Removes a reference to this variable. | |
| MeshMaterialVariableRef * | firstReference () const override |
| IVariable * | materialVariable (IMeshMaterial *mat) override |
| void | setKeepOnChange (bool v) override |
| Indicates whether the variable value should be kept after a change in the list of materials. | |
| bool | keepOnChange () const override |
| Indicates whether the variable value should be kept after a change in the list of materials. | |
| MatVarSpace | space () const override |
| Variable definition space (material+environment or environment only). | |
Dependency Management | |
| void | update (IMeshMaterial *mat) override |
| Recalculates the variable for material mat if necessary. | |
| void | setUpToDate (IMeshMaterial *mat) override |
| Indicates that the variable has just been updated. | |
| Int64 | modifiedTime (IMeshMaterial *mat) override |
| Time when the variable was updated. | |
| void | addDepend (IMeshMaterialVariable *var) override |
| Adds var to the dependency list. | |
| void | addDepend (IMeshMaterialVariable *var, const TraceInfo &tinfo) override |
| Adds var to the dependency list with trace info tinfo. | |
| void | addDepend (IVariable *var) override |
| Adds var to the dependency list. | |
| void | addDepend (IVariable *var, const TraceInfo &tinfo) override |
| Adds var to the dependency list with trace info tinfo. | |
| void | removeDepend (IMeshMaterialVariable *var) override |
| Removes var from the dependency list. | |
| void | removeDepend (IVariable *var) override |
| Removes var from the dependency list. | |
| void | setComputeFunction (IMeshMaterialVariableComputeFunction *v) override |
| Sets the variable's recalculation function. | |
| IMeshMaterialVariableComputeFunction * | computeFunction () override |
| Function used to update the variable. | |
| void | dependInfos (Array< VariableDependInfo > &infos, Array< MeshMaterialVariableDependInfo > &mat_infos) override |
| Dependency information. | |
| IMeshMaterialVariableInternal * | _internalApi () override |
| Public Member Functions inherited from Arcane::Materials::IMeshMaterialVariable | |
| virtual IVariable * | globalVariable () const =0 |
| Associated global variable on the mesh. | |
| virtual void | buildFromManager (bool is_continue)=0 |
| virtual void | syncReferences ()=0 |
| Synchronizes references. | |
| 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. | |
Public functions reserved for Arcane to manage synchronizations | |
| MeshMaterialVariablePrivate * | m_p = nullptr |
| UniqueArray< Span< std::byte > > | m_views_as_bytes |
| virtual Int32 | dataTypeSize () const =0 |
| void | incrementReference () |
| virtual void | copyToBuffer (ConstArrayView< MatVarIndex > matvar_indexes, ByteArrayView bytes) const =0 |
| virtual void | copyFromBuffer (ConstArrayView< MatVarIndex > matvar_indexes, ByteConstArrayView bytes)=0 |
| ITraceMng * | _traceMng () const |
| void | _copyToBuffer (SmallSpan< const MatVarIndex > matvar_indexes, Span< std::byte > bytes, RunQueue *queue) const |
| void | _copyFromBuffer (SmallSpan< const MatVarIndex > matvar_indexes, Span< const std::byte > bytes, RunQueue *queue) |
| virtual Ref< IData > | _internalCreateSaveDataRef (Integer nb_value)=0 |
| virtual void | _saveData (IMeshComponent *component, IData *data)=0 |
| virtual void | _restoreData (IMeshComponent *component, IData *data, Integer data_index, Int32ConstArrayView ids, bool allow_null_id)=0 |
| virtual void | _copyBetweenPartialAndGlobal (const CopyBetweenPartialAndGlobalArgs &args)=0 |
| virtual void | _initializeNewItemsWithZero (InitializeWithZeroArgs &args)=0 |
| virtual void | _syncReferences (bool update_views)=0 |
| virtual void | _resizeForIndexer (ResizeVariableIndexerArgs &args)=0 |
| static void | _genericCopyTo (Span< const std::byte > input, SmallSpan< const Int32 > input_indexes, Span< std::byte > output, SmallSpan< const Int32 > output_indexes, const RunQueue &queue, Int32 data_type_size) |
Definition at line 69 of file MeshMaterialVariable.h.
| Arcane::Materials::MeshMaterialVariable::MeshMaterialVariable | ( | const MaterialVariableBuildInfo & | v, |
| MatVarSpace | mvs ) |
Definition at line 182 of file MeshMaterialVariable.cc.
|
override |
Definition at line 192 of file MeshMaterialVariable.cc.
|
protected |
Definition at line 500 of file MeshMaterialVariable.cc.
|
protected |
Definition at line 485 of file MeshMaterialVariable.cc.
|
static |
Definition at line 515 of file MeshMaterialVariable.cc.
|
overridevirtual |
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 546 of file MeshMaterialVariable.cc.
|
protected |
Definition at line 451 of file MeshMaterialVariable.cc.
|
overridevirtual |
Adds var to the dependency list.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 388 of file MeshMaterialVariable.cc.
|
overridevirtual |
Adds var to the dependency list with trace info tinfo.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 394 of file MeshMaterialVariable.cc.
|
overridevirtual |
Adds var to the dependency list.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 407 of file MeshMaterialVariable.cc.
|
overridevirtual |
Adds var to the dependency list with trace info tinfo.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 413 of file MeshMaterialVariable.cc.
|
overridevirtual |
Adds a reference to this variable.
Precondition: var_ref must not already reference a variable.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 216 of file MeshMaterialVariable.cc.
References Arcane::Materials::MeshMaterialVariableRef::previousReference().
|
overridevirtual |
Function used to update the variable.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 432 of file MeshMaterialVariable.cc.
|
overridevirtual |
Dependency information.
Fills the array infos with dependency information on global variables and the array mat_infos with those on material variables.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 438 of file MeshMaterialVariable.cc.
References Arcane::Array< T >::add().
|
overridevirtual |
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 281 of file MeshMaterialVariable.cc.
| void Arcane::Materials::MeshMaterialVariable::incrementReference | ( | ) |
Definition at line 201 of file MeshMaterialVariable.cc.
|
overridevirtual |
Indicates whether the variable value should be kept after a change in the list of materials.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 318 of file MeshMaterialVariable.cc.
|
overridevirtual |
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 299 of file MeshMaterialVariable.cc.
|
overridevirtual |
Time when the variable was updated.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 381 of file MeshMaterialVariable.cc.
References Arcane::Materials::IMeshComponent::id().
|
overridevirtual |
Name of the variable.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 290 of file MeshMaterialVariable.cc.
Referenced by Arcane::Materials::MeshMaterialVariableSynchronizerList::add(), Arcane::Materials::ItemMaterialVariableScalar< DataType >::dumpValues(), Arcane::Materials::ItemMaterialVariableScalar< DataType >::dumpValues(), and update().
|
overridevirtual |
Removes var from the dependency list.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 400 of file MeshMaterialVariable.cc.
|
overridevirtual |
Removes var from the dependency list.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 419 of file MeshMaterialVariable.cc.
|
overridevirtual |
Removes a reference to this variable.
Precondition: var_ref must reference this variable (a call to addVariableRef() must have been made on this variable).
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 237 of file MeshMaterialVariable.cc.
References ARCANE_FATAL, Arcane::Materials::MeshMaterialVariableRef::nextReference(), and Arcane::Materials::MeshMaterialVariableRef::previousReference().
|
overridevirtual |
Sets the variable's recalculation function.
If a recalculation function already existed, it is destroyed and replaced by this one.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 426 of file MeshMaterialVariable.cc.
|
overridevirtual |
Indicates whether the variable value should be kept after a change in the list of materials.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 309 of file MeshMaterialVariable.cc.
|
overridevirtual |
Indicates that the variable has just been updated.
For correct dependency management, this property must be called every time a variable has been updated.
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 374 of file MeshMaterialVariable.cc.
References Arcane::Materials::IMeshComponent::id(), and Arcane::IVariable::incrementModifiedTime().
|
overridevirtual |
Variable definition space (material+environment or environment only).
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 460 of file MeshMaterialVariable.cc.
Referenced by Arcane::Materials::MeshMaterialVariableSynchronizerList::add(), Arcane::Materials::ItemMaterialVariableArray< DataType >::serialize(), and Arcane::Materials::ItemMaterialVariableScalar< DataType >::serialize().
|
overridevirtual |
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
Implements Arcane::Materials::IMeshMaterialVariable.
Definition at line 327 of file MeshMaterialVariable.cc.
References ARCANE_FATAL, Arcane::Materials::IMeshMaterialVariableComputeFunction::execute(), Arcane::Materials::IMeshComponent::id(), Arcane::IVariable::modifiedTime(), Arcane::Materials::IMeshMaterialVariable::modifiedTime(), name(), Arcane::IVariable::update(), Arcane::Materials::MeshMaterialVariableDependInfo::variable(), and Arcane::VariableDependInfo::variable().
|
protected |
Definition at line 143 of file MeshMaterialVariable.h.
|
protected |
Definition at line 144 of file MeshMaterialVariable.h.