Public Types | |
| using | ValueType = Array2<T> |
| using | ValueDataType = IArray2DataT<T> |
| using | ThatClass = Array2VariableT<T> |
| using | BaseClass = Variable |
| 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... | |
Public Member Functions | |
| void | synchronize () override |
| Synchronizes the variable. | |
| void | synchronize (Int32ConstArrayView local_ids) override |
| Synchronizes the variable on a list of entities. | |
| Real | allocatedMemory () const override |
| Memory size (in Bytes) used by the variable. | |
| Integer | nbElement () const override |
| Number of elements of the variable. | |
| virtual ValueType & | value () |
| ConstArray2View< T > | constValueView () const |
| ConstArray2View< T > | valueView () const |
| Array2View< T > | valueView () |
| void | shrinkMemory () override |
| Frees any additional memory allocated for the data. | |
| void | copyItemsValues (Int32ConstArrayView source, Int32ConstArrayView destination) override |
| Copies the values of entities numbered source into entities numbered destination. | |
| void | copyItemsMeanValues (Int32ConstArrayView first_source, Int32ConstArrayView second_source, Int32ConstArrayView destination) override |
| Copies the mean values of entities numbered first_source and second_source into entities numbered destination. | |
| void | compact (Int32ConstArrayView old_to_new_ids) override |
| Compresses the variable's values. | |
| void | print (std::ostream &o) const override |
| Prints the variable's values to the stream o. | |
| void | setIsSynchronized () override |
| Indicates that the variable is synchronized. | |
| void | setIsSynchronized (const ItemGroup &item_group) override |
| Indicates that the variable is synchronized on the group item_group. | |
| IData * | data () override |
| Data associated with the variable. | |
| const IData * | data () const override |
| Data associated with the variable. | |
| void | directResize (Integer dim1) |
| void | directResize (Integer dim1, Integer dim2) |
| void | directResizeAndReshape (const ArrayShape &shape) |
| void | swapValues (ThatClass &rhs) |
| void | fillShape (ArrayShape &shape) |
| ValueDataType * | trueData () |
| Public Member Functions inherited from Arcane::Variable | |
| ~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. | |
Static Public Member Functions | |
| static ThatClass * | getReference (IVariable *var) |
| static ThatClass * | getReference (const VariableBuildInfo &v, const VariableInfo &vi) |
| static Int64 | incrementModifiedTime () |
| Increments the modification counter and returns its value before modification. | |
Protected Member Functions | |
| Array2VariableT (const VariableBuildInfo &v, const VariableInfo &vi) | |
| Constructs a variable based on the reference v. | |
| void | _internalResize (const VariableResizeArgs &resize_args) override |
| VariableComparerResults | _compareVariable (const VariableComparerArgs &compare_args) final |
| Comparison of values between variables. | |
| Protected Member Functions inherited from Arcane::Variable | |
| 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. | |
| 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) |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Additional Inherited Members | |
| 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 35 of file Array2Variable.h.
| using Arcane::Array2VariableT< T >::BaseClass = Variable |
Definition at line 43 of file Array2Variable.h.
| using Arcane::Array2VariableT< T >::ThatClass = Array2VariableT<T> |
Definition at line 42 of file Array2Variable.h.
| using Arcane::Array2VariableT< T >::ValueDataType = IArray2DataT<T> |
Definition at line 41 of file Array2Variable.h.
| using Arcane::Array2VariableT< T >::ValueType = Array2<T> |
Definition at line 40 of file Array2Variable.h.
|
protected |
Constructs a variable based on the reference v.
Definition at line 233 of file Array2Variable.cc.
References Arcane::Variable::_setData(), data(), Arcane::TraceAccessor::info(), Arcane::makeRef(), and Arcane::Variable::Variable().
|
finalprotectedvirtual |
Comparison of values between variables.
Implements Arcane::Variable.
Definition at line 431 of file Array2Variable.cc.
References ARCANE_CHECK_POINTER, ARCANE_FATAL, Arcane::Array2< DataType >::copy(), Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::get(), Arcane::IK_Particle, Arcane::Variable::itemGroup(), Arcane::Variable::itemKind(), Arcane::IDataReader::read(), Arcane::Same, Arcane::SameOnAllReplica, Arcane::Sync, and synchronize().
|
overrideprotectedvirtual |
Implements Arcane::Variable.
Definition at line 479 of file Array2Variable.cc.
|
overridevirtual |
Memory size (in Bytes) used by the variable.
Implements Arcane::IVariable.
Definition at line 388 of file Array2Variable.cc.
|
overridevirtual |
Compresses the variable's values.
This operation is internal to Arcane and must be done in conjunction with the entity family corresponding to this variable.
Implements Arcane::IVariable.
Definition at line 588 of file Array2Variable.cc.
References Arcane::arcaneIsCheck(), Arcane::Array2< DataType >::at(), Arcane::TraceAccessor::debug(), Arcane::Trace::High, Arcane::Variable::isPartial(), Arcane::Variable::name(), Arcane::Array2< DataType >::resize(), Arcane::ConstArrayView< T >::size(), and Arcane::Variable::syncReferences().
|
inline |
Definition at line 63 of file Array2Variable.h.
|
overridevirtual |
Copies the mean values of entities numbered first_source and second_source into entities numbered destination.
| first_source | list of localIds of the 1st source |
| second_source | list of localIds of the 2nd source |
| destination | list of destination localIds |
Implements Arcane::IVariable.
Definition at line 566 of file Array2Variable.cc.
References Arcane::ConstArrayView< T >::size(), and Arcane::Variable::syncReferences().
|
overridevirtual |
Copies the values of entities numbered source into entities numbered destination.
| source | list of source localIds |
| destination | list of destination localIds |
Implements Arcane::IVariable.
Definition at line 546 of file Array2Variable.cc.
References Arcane::ConstArrayView< T >::size(), and Arcane::Variable::syncReferences().
|
inlineoverridevirtual |
Data associated with the variable.
Implements Arcane::IVariable.
Definition at line 76 of file Array2Variable.h.
|
inlineoverridevirtual |
Data associated with the variable.
Implements Arcane::IVariable.
Definition at line 75 of file Array2Variable.h.
Referenced by Array2VariableT(), and Arcane::ItemVariableArrayRefT< DataTypeT >::copy().
| void Arcane::Array2VariableT< T >::directResize | ( | Integer | dim1 | ) |
Definition at line 284 of file Array2Variable.cc.
| void Arcane::Array2VariableT< DataType >::directResize | ( | Integer | dim1, |
| Integer | dim2 ) |
Definition at line 298 of file Array2Variable.cc.
| void Arcane::Array2VariableT< DataType >::directResizeAndReshape | ( | const ArrayShape & | shape | ) |
Definition at line 319 of file Array2Variable.cc.
| void Arcane::Array2VariableT< DataType >::fillShape | ( | ArrayShape & | shape | ) |
Definition at line 680 of file Array2Variable.cc.
|
static |
Definition at line 249 of file Array2Variable.cc.
|
static |
Definition at line 270 of file Array2Variable.cc.
|
inlineoverridevirtual |
Number of elements of the variable.
The returned values depend on the dimension of the variable:
Implements Arcane::IVariable.
Definition at line 60 of file Array2Variable.h.
|
overridevirtual |
Prints the variable's values to the stream o.
Implements Arcane::IVariable.
Definition at line 344 of file Array2Variable.cc.
|
overridevirtual |
Indicates that the variable is synchronized.
This operation is collective.
Implements Arcane::IVariable.
Definition at line 637 of file Array2Variable.cc.
|
overridevirtual |
Indicates that the variable is synchronized on the group item_group.
This operation is collective.
Implements Arcane::IVariable.
Definition at line 645 of file Array2Variable.cc.
|
overridevirtual |
Frees any additional memory allocated for the data.
This method is only useful for non-scalar variables
Implements Arcane::IVariable.
Definition at line 334 of file Array2Variable.cc.
References Arcane::Variable::syncReferences().
| void Arcane::Array2VariableT< DataType >::swapValues | ( | ThatClass & | rhs | ) |
Definition at line 654 of file Array2Variable.cc.
|
overridevirtual |
Synchronizes the variable.
La synchronisation ne peut se faire que sur les variables du maillage.
Implements Arcane::IVariable.
Definition at line 354 of file Array2Variable.cc.
References Arcane::IItemFamily::allItemsSynchronizer(), ARCANE_FATAL, ARCANE_THROW, Arcane::Variable::fullName(), Arcane::IK_Unknown, Arcane::Variable::isPartial(), Arcane::Variable::itemGroup(), Arcane::Variable::itemKind(), and Arcane::IVariableSynchronizer::synchronize().
Referenced by _compareVariable().
|
overridevirtual |
Synchronizes the variable on a list of entities.
Synchronization can only be performed on mesh variables. Only the entities listed in local_ids will be synchronized. Note: an entity present in this list on one subdomain must be present in this list for any other subdomain that possesses this entity.
Reimplemented from Arcane::IVariable.
Definition at line 371 of file Array2Variable.cc.
References Arcane::IItemFamily::allItemsSynchronizer(), ARCANE_FATAL, ARCANE_THROW, Arcane::Variable::fullName(), Arcane::IK_Unknown, Arcane::Variable::isPartial(), Arcane::Variable::itemGroup(), Arcane::Variable::itemKind(), and Arcane::IVariableSynchronizer::synchronize().
|
inline |
Definition at line 85 of file Array2Variable.h.
|
virtual |
Definition at line 670 of file Array2Variable.cc.
|
inline |
Definition at line 65 of file Array2Variable.h.
|
inline |
Definition at line 64 of file Array2Variable.h.