Public Member Functions | |
| ~Variable () override | |
| Frees resources. | |
| Variable (const Variable &from)=delete | |
| Copy constructor (do not use). | |
| Variable & | operator= (const Variable &from)=delete |
| Copy assignment operator (do not use). | |
| ISubDomain * | subDomain () override |
| Subdomain associated with the variable (TODO deprecate end of 2023). | |
| IVariableMng * | variableMng () const override |
| Variable manager associated with the variable. | |
| String | fullName () const final |
| Full variable name (with family prefix). | |
| String | name () const final |
| Variable name. | |
| String | itemFamilyName () const final |
| Name of the associated family (null if none). | |
| String | meshName () const final |
| Name of the associated mesh (null if none). | |
| String | itemGroupName () const final |
| Name of the associated entity group. | |
| int | property () const override |
| void | notifyReferencePropertyChanged () override |
| void | setUsed (bool v) override |
| Sets the usage state of the variable. | |
| bool | isUsed () const override |
| Usage state of the variable. | |
| bool | isPartial () const override |
| Indicates if the variable is partial. | |
| void | setTraceInfo (Integer, eTraceType) override |
| void | read (IDataReader *d) override |
| void | write (IDataWriter *d) override |
| Saves the variable. | |
| void | notifyEndRead () override |
| Notifies of external modification of data(). | |
| void | notifyBeginWrite () override |
| Notifies of the start of writing data(). | |
| void | addVariableRef (VariableRef *ref) override |
| Adds a reference to this variable. | |
| void | removeVariableRef (VariableRef *ref) override |
| Removes a reference to this variable. | |
| VariableRef * | firstReference () const override |
| First reference (or null) on this variable. | |
| Integer | nbReference () const override |
| Number of references on this variable. | |
| VariableMetaData * | createMetaData () const override |
| Creates an instance containing the variable's metadata. | |
| Ref< VariableMetaData > | createMetaDataRef () const override |
| Creates an instance containing the variable's metadata. | |
| void | syncReferences () override |
| Synchronizes references. | |
| IMesh * | mesh () const final |
| Mesh associated with the variable. | |
| MeshHandle | meshHandle () const final |
| Mesh associated with the variable. | |
| ItemGroup | itemGroup () const final |
| Associated mesh group. | |
| IItemFamily * | itemFamily () const final |
| Associated entity family. | |
| eItemKind | itemKind () const override |
| Kind of mesh entities on which the variable is based. | |
| Integer | dimension () const override |
| Dimension of the variable. | |
| Integer | multiTag () const override |
| Indicates if the variable is a multi-sized array. | |
| Int32 | checkIfSync (Integer max_print) final |
| Checks if the variable is properly synchronized. | |
| Int32 | checkIfSameOnAllReplica (Integer max_print) final |
| Checks if the variable has the same values on all replicas. | |
| Int32 | checkIfSame (IDataReader *reader, Integer max_print, bool compare_ghost) final |
| Checks that the variable is identical to a reference value. | |
| eDataType | dataType () const override |
| Data type managed by the variable (Real, Integer, ...). | |
| bool | initialize (const ItemGroup &, const String &) override |
| Initializes the variable on a group. | |
| IDataFactoryMng * | dataFactoryMng () const final |
| Data factory associated with the variable. | |
| void | serialize (ISerializer *sbuffer, IDataOperation *operation) override |
| void | serialize (ISerializer *sbuffer, Int32ConstArrayView ids, IDataOperation *operation) override |
| Serializes the variable for identifiers ids. | |
| void | resize (Integer n) override |
| Sets the number of elements for an array variable. | |
| void | resizeFromGroup () override |
| Sets the number of elements for a mesh variable. | |
| void | setAllocationInfo (const DataAllocationInfo &v) override |
| Sets allocation information. | |
| DataAllocationInfo | allocationInfo () const override |
| Allocation information. | |
| IObservable * | writeObservable () override |
| Write observable. | |
| IObservable * | readObservable () override |
| Read observable. | |
| IObservable * | onSizeChangedObservable () override |
| Size change observable. | |
| void | addTag (const String &tagname, const String &tagvalue) override |
| Adds the tag tagname with the value tagvalue. | |
| void | removeTag (const String &tagname) override |
| Removes the tag tagname. | |
| bool | hasTag (const String &tagname) override |
| true if the variable has the tag tagname | |
| String | tagValue (const String &tagname) override |
| Value of the tag tagname. The string is null if the tag does not exist. | |
| void | update () override |
| Recalculates the variable if necessary. | |
| void | setUpToDate () override |
| Indicates that the variable has just been updated. | |
| Int64 | modifiedTime () override |
| Time when the variable was updated. | |
| void | addDepend (IVariable *var, eDependType dt) override |
| Adds var to the list of dependencies. | |
| void | addDepend (IVariable *var, eDependType dt, const TraceInfo &tinfo) override |
| Adds var to the list of dependencies with trace info tinfo. | |
| void | removeDepend (IVariable *var) override |
| Removes var from the list of dependencies. | |
| void | setComputeFunction (IVariableComputeFunction *v) override |
| Sets the variable's recalculation function. | |
| IVariableComputeFunction * | computeFunction () override |
| Function used to update the variable. | |
| void | dependInfos (Array< VariableDependInfo > &infos) override |
| Dependency information. | |
| void | update (Real wanted_time) override |
| void | changeGroupIds (Int32ConstArrayView old_to_new_ids) override |
| pH: EXPERIMENTAL | |
| IVariableInternal * | _internalApi () override |
| Internal Arcane API. | |
| IMemoryAccessTrace * | memoryAccessTrace () const override |
| Public Member Functions inherited from Arcane::TraceAccessor | |
| TraceAccessor (ITraceMng *m) | |
| Constructs an accessor via the trace manager m. | |
| TraceAccessor (const TraceAccessor &rhs) | |
| Copy constructor. | |
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| Copy assignment operator. | |
| virtual | ~TraceAccessor () |
| Frees resources. | |
| ITraceMng * | traceMng () const |
| Trace manager. | |
| TraceMessage | info () const |
| Flow for an information message. | |
| TraceMessage | pinfo () const |
| Flow for a parallel information message. | |
| TraceMessage | info (char category) const |
| Flow for an information message of a given category. | |
| TraceMessage | pinfo (char category) const |
| Flow for a parallel information message of a given category. | |
| TraceMessage | info (bool v) const |
| Flow for an information message. | |
| TraceMessage | warning () const |
| Flow for a warning message. | |
| TraceMessage | pwarning () const |
| TraceMessage | error () const |
| Flow for an error message. | |
| TraceMessage | perror () const |
| TraceMessage | log () const |
| Flow for a log message. | |
| TraceMessage | plog () const |
| Flow for a log message. | |
| TraceMessage | logdate () const |
| Flow for a log message preceded by the date. | |
| TraceMessage | fatal () const |
| Flow for a fatal error message. | |
| TraceMessage | pfatal () const |
| Flow for a parallel fatal error message. | |
| TraceMessageDbg | debug (Trace::eDebugLevel=Trace::Medium) const |
| Flow for a debug message. | |
| Trace::eDebugLevel | configDbgLevel () const |
| Debug level of the configuration file. | |
| TraceMessage | info (Int32 verbose_level) const |
| Flow for an information message of a given level. | |
| TraceMessage | linfo () const |
| Flow for an information message with the local information level of this instance. | |
| TraceMessage | linfo (Int32 relative_level) const |
| Flow for an information message with the local information level of this instance. | |
| void | fatalMessage (const StandaloneTraceMessage &o) const |
| Public Member Functions inherited from Arcane::IVariable | |
| virtual | ~IVariable ()=default |
| Frees resources. | |
| virtual Real | allocatedMemory () const =0 |
| Memory size (in Bytes) used by the variable. | |
| virtual Integer | nbElement () const =0 |
| Number of elements of the variable. | |
| virtual void | shrinkMemory ()=0 |
| Frees any additional memory allocated for the data. | |
| virtual void | synchronize ()=0 |
| Synchronizes the variable. | |
| virtual void | synchronize (Int32ConstArrayView local_ids) |
| Synchronizes the variable on a list of entities. | |
| virtual void | copyItemsValues (Int32ConstArrayView source, Int32ConstArrayView destination)=0 |
| Copies the values of entities numbered source into entities numbered destination. | |
| virtual void | copyItemsMeanValues (Int32ConstArrayView first_source, Int32ConstArrayView second_source, Int32ConstArrayView destination)=0 |
| Copies the mean values of entities numbered first_source and second_source into entities numbered destination. | |
| virtual void | compact (Int32ConstArrayView new_to_old_ids)=0 |
| Compresses the variable's values. | |
| virtual IData * | data ()=0 |
| Data associated with the variable. | |
| virtual const IData * | data () const =0 |
| Data associated with the variable. | |
| virtual void | print (std::ostream &o) const =0 |
| Prints the variable's values to the stream o. | |
| virtual void | setIsSynchronized ()=0 |
| Indicates that the variable is synchronized. | |
| virtual void | setIsSynchronized (const ItemGroup &item_group)=0 |
| Indicates that the variable is synchronized on the group item_group. | |
Protected Member Functions | |
| Variable (const VariableBuildInfo &v, const VariableInfo &vi) | |
| Creates a variable linked to the reference v. | |
| void | _setProperty (int property) |
| void | _setData (const Ref< IData > &data) |
| Positions the data. | |
| void | _setValidData (bool valid_data) |
| Indicates if the variable data is valid. | |
| bool | _hasValidData () const |
| Indicates if the variable data is valid. | |
| virtual void | _internalResize (const VariableResizeArgs &resize_args)=0 |
| void | _checkSwapIsValid (Variable *rhs) |
| Checks if it is possible to swap the values of the instance with those of rhs. | |
| bool | _wantShrink () const |
| void | _resize (const VariableResizeArgs &resize_args) |
| virtual VariableComparerResults | _compareVariable (const VariableComparerArgs &compare_args)=0 |
| Comparison of values between variables. | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Friends | |
| class | VariablePrivate |
Additional Inherited Members | |
| Public Types inherited from Arcane::IVariable | |
| enum | eDependType { DPT_PreviousTime , DPT_CurrentTime } |
| Dependency Type. More... | |
| enum | { PNoDump = (1 << 0) , PNoNeedSync = (1 << 1) , PHasTrace = (1 << 2) , PSubDomainDepend = (1 << 3) , PSubDomainPrivate = (1 << 4) , PExecutionDepend = (1 << 5) , PPrivate = (1 << 6) , PTemporary = (1 << 7) , PNoRestore = (1 << 8) , PNoExchange = (1 << 9) , PPersistant = (1 << 10) , PNoReplicaSync = (1 << 11) , PInShMem = (1 << 12) , PDumpNull = (1 << 13) } |
| Properties of a variable. More... | |
| static Int64 | incrementModifiedTime () |
| Increments the modification counter and returns its value before modification. | |
| Static Public Attributes inherited from Arcane::IVariable | |
| static const char * | TAG_POST_PROCESSING = "PostProcessing" |
| Tag used to indicate if a variable will be post-processed. | |
| static const char * | TAG_POST_PROCESSING_AT_THIS_ITERATION = "PostProcessingAtThisIteration" |
| Tag used to indicate if a variable will be post-processed at this iteration. | |
Definition at line 74 of file Variable.h.
|
protected |
Creates a variable linked to the reference v.
Definition at line 343 of file Variable.cc.
References Arcane::TraceAccessor::TraceAccessor(), and Arcane::TraceAccessor::traceMng().
Referenced by _checkSwapIsValid(), Arcane::Array2VariableT< T >::Array2VariableT(), operator=(), Variable(), Arcane::VariableArrayT< T >::VariableArrayT(), and Arcane::VariableScalarT< T >::VariableScalarT().
|
override |
Frees resources.
Definition at line 353 of file Variable.cc.
|
protected |
Checks if it is possible to swap the values of the instance with those of rhs.
Since this method is called by a derived class, we are sure that rhs is the same C++ type as the instance and therefore there is no need to check, for example, that the dimensions or the data type are the same. For the swap to be valid, the mesh, the family and the group must be the same. To do this, it is sufficient to check that the group is the same.
Definition at line 1394 of file Variable.cc.
References ARCANE_FATAL, isPartial(), itemGroup(), Arcane::VariablePrivate::m_is_used, and Variable().
|
protectedpure virtual |
Comparison of values between variables.
Implemented in Arcane::Array2VariableT< T >, Arcane::Array2VariableT< DataType >, Arcane::Array2VariableT< Int32 >, Arcane::Array2VariableT< Int64 >, Arcane::Array2VariableT< Real >, Arcane::Array2VariableT< Real2 >, Arcane::Array2VariableT< Real2x2 >, Arcane::Array2VariableT< Real3 >, Arcane::Array2VariableT< Real3x3 >, Arcane::VariableArrayT< T >, Arcane::VariableArrayT< DataType >, Arcane::VariableArrayT< Int32 >, Arcane::VariableArrayT< Int64 >, Arcane::VariableArrayT< Real >, Arcane::VariableArrayT< Real2 >, Arcane::VariableArrayT< Real2x2 >, Arcane::VariableArrayT< Real3 >, Arcane::VariableArrayT< Real3x3 >, Arcane::VariableScalarT< T >, and Arcane::VariableScalarT< DataType >.
Referenced by checkIfSame(), checkIfSameOnAllReplica(), and checkIfSync().
|
protected |
Indicates if the variable data is valid.
The data is valid at the end of a call to setUsed().
Definition at line 941 of file Variable.cc.
|
overridevirtual |
|
protected |
Definition at line 997 of file Variable.cc.
Positions the data.
If data is null, a fatal error is sent
Definition at line 917 of file Variable.cc.
References ARCANE_FATAL, and Arcane::IVariable::data().
Referenced by Arcane::Array2VariableT< T >::Array2VariableT(), Arcane::VariableArrayT< T >::VariableArrayT(), and Arcane::VariableScalarT< T >::VariableScalarT().
|
protected |
Definition at line 950 of file Variable.cc.
|
protected |
Indicates if the variable data is valid.
Definition at line 932 of file Variable.cc.
Referenced by notifyEndRead().
|
protected |
Definition at line 1410 of file Variable.cc.
|
overridevirtual |
Adds var to the list of dependencies.
Implements Arcane::IVariable.
Definition at line 1233 of file Variable.cc.
|
overridevirtual |
Adds var to the list of dependencies with trace info tinfo.
Implements Arcane::IVariable.
Definition at line 1242 of file Variable.cc.
Adds the tag tagname with the value tagvalue.
Implements Arcane::IVariable.
Definition at line 1294 of file Variable.cc.
|
overridevirtual |
Adds a reference to this variable.
Implements Arcane::IVariable.
Definition at line 373 of file Variable.cc.
References Arcane::VariableRef::previousReference().
|
overridevirtual |
Allocation information.
Implements Arcane::IVariable.
Definition at line 1431 of file Variable.cc.
References Arcane::IData::allocationInfo(), and Arcane::IVariable::data().
|
overridevirtual |
|
finalvirtual |
Checks that the variable is identical to a reference value.
This operation checks that the variable values are identical to a reference value read from the reader reader.
For each value different from the reference, a message is displayed.
| max_print | maximum number of messages to display. If 0, no element is displayed. If positive, display at most max_print elements. If negative, all elements are displayed. |
| compare_ghost | if true, compares values both on owned entities and ghost entities. Otherwise, it only compares on owned entities. |
Implements Arcane::IVariable.
Definition at line 829 of file Variable.cc.
References _compareVariable(), Arcane::VariableComparerArgs::setCompareGhost(), and Arcane::VariableComparerArgs::setMaxPrint().
Checks if the variable has the same values on all replicas.
Compare the variable's values with those of the same subdomain of other replicas. For each different element, a message is displayed.
This method is collective across the same subdomain as other replicas. Therefore, it should only be called if the variable exists on all subdomains otherwise it causes a blocking.
This method only works for variables of numeric types. In this case, it throws a NotSupportedException.
| max_print | maximum number of messages to display. If 0, no elements are displayed. If positive, displays at most max_print elements. If negative, all elements are displayed. For each different element, the minimum and maximum value is displayed. |
Implements Arcane::IVariable.
Definition at line 816 of file Variable.cc.
References _compareVariable(), Arcane::SameOnAllReplica, and Arcane::VariableComparerArgs::setMaxPrint().
Checks if the variable is properly synchronized.
This operation only works for mesh variables.
A variable is synchronized when its values are the same across all subdomains, both on owned elements and ghost elements.
For each unsynchronized element, a message is displayed.
| max_print | maximum number of messages to display. If 0, no element is displayed. If positive, display at most max_print elements. If negative, all elements are displayed. |
Implements Arcane::IVariable.
Definition at line 802 of file Variable.cc.
References _compareVariable(), Arcane::VariableComparerArgs::setCompareGhost(), Arcane::VariableComparerArgs::setMaxPrint(), and Arcane::Sync.
|
overridevirtual |
Function used to update the variable.
Implements Arcane::IVariable.
Definition at line 1270 of file Variable.cc.
|
overridevirtual |
Creates an instance containing the variable's metadata.
The returned instance must be destroyed by calling the delete operator.
Implements Arcane::IVariable.
Definition at line 767 of file Variable.cc.
|
overridevirtual |
Creates an instance containing the variable's metadata.
Implements Arcane::IVariable.
Definition at line 776 of file Variable.cc.
References Arcane::makeRef().
|
finalvirtual |
Data factory associated with the variable.
Implements Arcane::IVariable.
Definition at line 959 of file Variable.cc.
|
overridevirtual |
Data type managed by the variable (Real, Integer, ...).
Implements Arcane::IVariable.
Definition at line 528 of file Variable.cc.
Referenced by Arcane::VariableArrayT< T >::initialize().
|
overridevirtual |
Dependency information.
Fills the array infos with dependency information.
Implements Arcane::IVariable.
Definition at line 1279 of file Variable.cc.
References Arcane::Array< T >::add().
|
overridevirtual |
Dimension of the variable.
The possible values are as follows:
Implements Arcane::IVariable.
Definition at line 881 of file Variable.cc.
|
overridevirtual |
First reference (or null) on this variable.
Implements Arcane::IVariable.
Definition at line 431 of file Variable.cc.
|
finalvirtual |
Full variable name (with family prefix).
Implements Arcane::IVariable.
Definition at line 492 of file Variable.cc.
Referenced by operator=(), resizeFromGroup(), serialize(), serialize(), Arcane::Array2VariableT< T >::synchronize(), Arcane::Array2VariableT< T >::synchronize(), Arcane::VariableArrayT< T >::synchronize(), and Arcane::VariableArrayT< T >::synchronize().
|
overridevirtual |
true if the variable has the tag tagname
Implements Arcane::IVariable.
Definition at line 1312 of file Variable.cc.
|
inlineoverridevirtual |
Initializes the variable on a group.
Initializes the variable with the value value for all elements of the group group.
This operation is only usable with mesh variables.
| group_name | group. It must correspond to an existing group of the variable's type (e.g., CellGroup for a cell variable). |
| value | initialization value. The string must be convertible to the variable's type. |
| true | in case of error or if the variable is not a mesh variable. |
| false | if the initialization is successful. |
Implements Arcane::IVariable.
Reimplemented in Arcane::VariableArrayT< T >, Arcane::VariableArrayT< DataType >, Arcane::VariableArrayT< Int32 >, Arcane::VariableArrayT< Int64 >, Arcane::VariableArrayT< Real >, Arcane::VariableArrayT< Real2 >, Arcane::VariableArrayT< Real2x2 >, Arcane::VariableArrayT< Real3 >, and Arcane::VariableArrayT< Real3x3 >.
Definition at line 152 of file Variable.h.
References initialize().
Referenced by initialize().
|
overridevirtual |
Indicates if the variable is partial.
A variable is partial when it is not defined on all entities of a family. In this case, group()!=itemFamily()->allItems().
Implements Arcane::IVariable.
Definition at line 899 of file Variable.cc.
Referenced by _checkSwapIsValid(), Arcane::Array2VariableT< T >::compact(), Arcane::VariableArrayT< T >::compact(), operator=(), Arcane::Array2VariableT< T >::synchronize(), Arcane::Array2VariableT< T >::synchronize(), Arcane::VariableArrayT< T >::synchronize(), and Arcane::VariableArrayT< T >::synchronize().
|
overridevirtual |
Usage state of the variable.
Implements Arcane::IVariable.
Definition at line 721 of file Variable.cc.
Referenced by operator=().
|
finalvirtual |
Associated entity family.
If a variable is not used or not yet allocated, the returned value is null. However, the variable can still be associated with a family. In this case, you must use the itemFamilyName() function to retrieve the name of this family.
Implements Arcane::IVariable.
Definition at line 908 of file Variable.cc.
Referenced by Arcane::VariableArrayT< T >::initialize().
|
finalvirtual |
Name of the associated family (null if none).
Implements Arcane::IVariable.
Definition at line 501 of file Variable.cc.
Referenced by operator=().
|
finalvirtual |
Associated mesh group.
If a variable is not used or not yet allocated, the returned value is the null group. However, the variable can still be associated with a group. In this case, you must use the itemGroupName() function to retrieve the name of this group.
Implements Arcane::IVariable.
Definition at line 863 of file Variable.cc.
Referenced by _checkSwapIsValid(), Arcane::Array2VariableT< T >::_compareVariable(), Arcane::VariableArrayT< T >::_compareVariable(), Arcane::VariableArrayT< T >::setIsSynchronized(), Arcane::Array2VariableT< T >::synchronize(), Arcane::Array2VariableT< T >::synchronize(), Arcane::VariableArrayT< T >::synchronize(), and Arcane::VariableArrayT< T >::synchronize().
|
finalvirtual |
Name of the associated entity group.
Implements Arcane::IVariable.
Definition at line 510 of file Variable.cc.
Referenced by operator=().
|
overridevirtual |
Kind of mesh entities on which the variable is based.
For scalar or array variables, there is no kind, and the method returns IK_Unknown. For other variables, it returns the kind of the mesh element (Node, Cell, ...), namely:
Implements Arcane::IVariable.
Definition at line 872 of file Variable.cc.
Referenced by Arcane::Array2VariableT< T >::_compareVariable(), Arcane::VariableArrayT< T >::_compareVariable(), Arcane::VariableScalarT< T >::_compareVariable(), Arcane::VariableArrayT< T >::initialize(), resizeFromGroup(), setUsed(), Arcane::Array2VariableT< T >::synchronize(), Arcane::Array2VariableT< T >::synchronize(), Arcane::VariableArrayT< T >::synchronize(), and Arcane::VariableArrayT< T >::synchronize().
|
inlineoverridevirtual |
Implements Arcane::IVariable.
Definition at line 197 of file Variable.h.
|
finalvirtual |
Mesh associated with the variable.
This operation is only meaningful for variables on mesh entities.
Implements Arcane::IVariable.
Definition at line 843 of file Variable.cc.
|
finalvirtual |
Mesh associated with the variable.
This operation is only meaningful for variables on mesh entities.
Implements Arcane::IVariable.
Definition at line 854 of file Variable.cc.
|
finalvirtual |
Name of the associated mesh (null if none).
Implements Arcane::IVariable.
Definition at line 519 of file Variable.cc.
Referenced by operator=().
|
overridevirtual |
Time when the variable was updated.
Implements Arcane::IVariable.
Definition at line 1224 of file Variable.cc.
|
overridevirtual |
Indicates if the variable is a multi-sized array.
This value is only useful for 2D or higher arrays.
Implements Arcane::IVariable.
Definition at line 890 of file Variable.cc.
|
finalvirtual |
Variable name.
Implements Arcane::IVariable.
Definition at line 483 of file Variable.cc.
Referenced by Arcane::Array2VariableT< T >::compact(), Arcane::VariableArrayT< T >::compact(), and operator=().
|
overridevirtual |
Number of references on this variable.
Implements Arcane::IVariable.
Definition at line 456 of file Variable.cc.
|
overridevirtual |
Notifies of the start of writing data().
This method triggers the observables registered in writeObservable().
Implements Arcane::IVariable.
Definition at line 1345 of file Variable.cc.
References Arcane::IObservable::notifyAllObservers(), and writeObservable().
Referenced by write().
|
overridevirtual |
Notifies of external modification of data().
Signals to the instance the end of a read operation that modified data(). This method must therefore be called as soon as a modification of data() has been performed. This method triggers the observables registered in readObservable().
Implements Arcane::IVariable.
Definition at line 1333 of file Variable.cc.
References _setValidData(), Arcane::IObservable::notifyAllObservers(), readObservable(), setUpToDate(), and syncReferences().
Referenced by read().
|
overridevirtual |
Indicates that the properties of one of the references to this variable have changed (internal)
Implements Arcane::IVariable.
Definition at line 627 of file Variable.cc.
Referenced by operator=().
|
overridevirtual |
Size change observable.
The observers registered in this observable are called when the number of elements of the variable changes. This is the case, for example, after a remeshing for a cell variable
Implements Arcane::IVariable.
Definition at line 1148 of file Variable.cc.
Referenced by syncReferences().
|
overridevirtual |
Implements Arcane::IVariable.
Definition at line 540 of file Variable.cc.
References Arcane::IVariable::PDumpNull, Arcane::IVariable::PExecutionDepend, Arcane::IVariable::PInShMem, Arcane::IVariable::PNoDump, Arcane::IVariable::PNoExchange, Arcane::IVariable::PNoNeedSync, Arcane::IVariable::PNoReplicaSync, Arcane::IVariable::PNoRestore, Arcane::IVariable::PPersistant, Arcane::IVariable::PPrivate, property(), Arcane::IVariable::PSubDomainDepend, Arcane::IVariable::PTemporary, and Arcane::VariableRef::referenceProperty().
Referenced by operator=(), property(), and removeVariableRef().
|
overridevirtual |
Reads the variable.
Implements Arcane::IVariable.
Definition at line 1354 of file Variable.cc.
References Arcane::IVariable::data(), notifyEndRead(), and Arcane::IDataReader::read().
|
overridevirtual |
Read observable.
The observers registered in this observable are called after reading the variable (read operation).
Implements Arcane::IVariable.
Definition at line 1139 of file Variable.cc.
Referenced by notifyEndRead().
|
overridevirtual |
Removes var from the list of dependencies.
Implements Arcane::IVariable.
Definition at line 1251 of file Variable.cc.
|
overridevirtual |
Removes the tag tagname.
If the tag tagname is not in the list, nothing happens.
Implements Arcane::IVariable.
Definition at line 1303 of file Variable.cc.
|
overridevirtual |
Removes a reference to this variable.
Implements Arcane::IVariable.
Definition at line 394 of file Variable.cc.
References Arcane::IVariableMng::_internalApi(), Arcane::VariableRef::nextReference(), Arcane::IVariable::PPersistant, Arcane::VariableRef::previousReference(), property(), and Arcane::ISubDomain::variableMng().
|
overridevirtual |
Sets the number of elements for an array variable.
When the variable is a 1D or 2D array type, it sets the number of array elements to new_size. For a 2D array, the number of elements in the first dimension is modified.
This operation must not be called for mesh variables because the number of elements is determined automatically based on the number of entities in the group it relies on. For this type of variable, resizeFromGroup() must be called.
This operation synchronizes the references (syncReferences()).
Implements Arcane::IVariable.
Definition at line 1011 of file Variable.cc.
Referenced by setUsed().
|
overridevirtual |
Sets the number of elements for a mesh variable.
Reallocates the size of the mesh variable based on the group it relies on.
This operation only has an effect on mesh variables. For others, no action is performed.
This operation synchronizes the references (syncReferences()).
Implements Arcane::IVariable.
Definition at line 1020 of file Variable.cc.
References ARCANE_FATAL, Arcane::TraceAccessor::debug(), fullName(), Arcane::Trace::High, Arcane::IK_Unknown, itemKind(), Arcane::ItemGroup::null(), and syncReferences().
Referenced by setUsed().
|
overridevirtual |
Serializes the variable.
The operation is only meaningful in read mode (ISerializer::ModeGet)
Implements Arcane::IVariable.
Definition at line 982 of file Variable.cc.
References Arcane::TraceAccessor::debug(), fullName(), Arcane::Trace::High, Arcane::ISerializer::mode(), Arcane::ISerializer::ModeGet, and syncReferences().
|
overridevirtual |
Serializes the variable for identifiers ids.
Serialization depends on the variable's dimension. For scalar variables (dimension=0), nothing is done. For array or mesh variables, ids corresponds to an array of first dimension indirection.
The operation is only meaningful in read mode (ISerializer::ModeGet)
Implements Arcane::IVariable.
Definition at line 968 of file Variable.cc.
References Arcane::TraceAccessor::debug(), fullName(), Arcane::Trace::High, Arcane::ISerializer::mode(), Arcane::ISerializer::ModeGet, and syncReferences().
|
overridevirtual |
Sets allocation information.
Implements Arcane::IVariable.
Definition at line 1419 of file Variable.cc.
References Arcane::IVariable::data(), Arcane::IData::setAllocationInfo(), and syncReferences().
|
overridevirtual |
Sets the variable's recalculation function.
The specified function v must be allocated via the new operator. If a recalculation function already existed, it is destroyed (via the delete operator) and replaced by this one.
Implements Arcane::IVariable.
Definition at line 1261 of file Variable.cc.
|
inlineoverridevirtual |
Implements Arcane::IVariable.
Definition at line 119 of file Variable.h.
|
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::IVariable.
Definition at line 1214 of file Variable.cc.
References Arcane::ISubDomain::commonVariables(), Arcane::CommonVariables::globalTime(), Arcane::IVariable::incrementModifiedTime(), and subDomain().
Referenced by notifyEndRead().
|
overridevirtual |
Sets the usage state of the variable.
Implements Arcane::IVariable.
Definition at line 636 of file Variable.cc.
References Arcane::IParallelMng::_internalApi(), ARCANE_FATAL, Arcane::DIP_Legacy, Arcane::getGlobalDataInitialisationPolicy(), Arcane::IK_Unknown, itemKind(), Arcane::ISubDomain::parallelMng(), Arcane::IVariable::PInShMem, Arcane::IVariable::PSubDomainPrivate, resize(), resizeFromGroup(), and subDomain().
Referenced by operator=().
|
overridevirtual |
Subdomain associated with the variable (TODO deprecate end of 2023).
Implements Arcane::IVariable.
Definition at line 465 of file Variable.cc.
Referenced by operator=(), setUpToDate(), and setUsed().
|
overridevirtual |
Synchronizes references.
Synchronizes the values of references (VariableRef) to this variable with the variable's current value. This method is called automatically when a scalar variable is modified or the number of elements of an array variable changes.
Implements Arcane::IVariable.
Definition at line 785 of file Variable.cc.
References Arcane::IObservable::notifyAllObservers(), onSizeChangedObservable(), and Arcane::VariableRef::updateFromInternal().
Referenced by Arcane::Array2VariableT< T >::compact(), Arcane::VariableArrayT< T >::compact(), Arcane::Array2VariableT< T >::copyItemsMeanValues(), Arcane::VariableArrayT< T >::copyItemsMeanValues(), Arcane::VariableArrayT< Real >::copyItemsMeanValues(), Arcane::Array2VariableT< T >::copyItemsValues(), Arcane::VariableArrayT< T >::copyItemsValues(), notifyEndRead(), resizeFromGroup(), serialize(), serialize(), setAllocationInfo(), Arcane::Array2VariableT< T >::shrinkMemory(), and Arcane::VariableArrayT< T >::shrinkMemory().
Value of the tag tagname. The string is null if the tag does not exist.
Implements Arcane::IVariable.
Definition at line 1321 of file Variable.cc.
|
overridevirtual |
Recalculates the variable 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.
Implements Arcane::IVariable.
Definition at line 1160 of file Variable.cc.
References update().
Referenced by update().
|
overridevirtual |
Implements Arcane::IVariable.
Definition at line 1169 of file Variable.cc.
|
overridevirtual |
Variable manager associated with the variable.
Implements Arcane::IVariable.
Definition at line 474 of file Variable.cc.
Referenced by operator=().
|
overridevirtual |
Saves the variable.
Implements Arcane::IVariable.
Definition at line 1364 of file Variable.cc.
References Arcane::IVariable::data(), notifyBeginWrite(), and Arcane::IDataWriter::write().
|
overridevirtual |
Write observable.
The observers registered in this observable are called before writing the variable (write operation).
Implements Arcane::IVariable.
Definition at line 1130 of file Variable.cc.
Referenced by notifyBeginWrite().
|
friend |
Definition at line 229 of file Variable.h.