12#ifndef ARCANE_CORE_IVARIABLE_H
13#define ARCANE_CORE_IVARIABLE_H
17#include "arccore/serialize/SerializeGlobal.h"
19#include "arcane/utils/Ref.h"
180 friend class VariableMng;
284 ARCANE_DEPRECATED_REASON(
"Y2021: This method is a noop")
437 ARCCORE_DEPRECATED_2020(
"Use meshHandle() instead")
490 ARCANE_DEPRECATED_REASON(
"Y2024: Use createMetaDataRef() instead")
685 virtual
void print(std::ostream& o) const = 0;
747 ARCANE_DEPRECATED_REASON(
"Y2021: This method is a noop")
Declarations of types on entities.
Base class for 1D data vectors.
Information on data allocation.
Interface of the data factory manager.
Interface of an operation on a data.
Interface for reading variable data.
Interface for writing variable data.
Interface of a data item.
Interface of an entity family.
Interface of an observable.
Interface of the subdomain manager.
Interface of the functor class for recalculating a variable.
Internal part of Ivariable.
Variable manager interface.
virtual Real allocatedMemory() const =0
Memory size (in Bytes) used by the variable.
virtual void changeGroupIds(Int32ConstArrayView old_to_new_ids)=0
pH: EXPERIMENTAL
virtual eDataType dataType() const =0
Data type managed by the variable (Real, Integer, ...).
virtual void addTag(const String &tagname, const String &tagvalue)=0
Adds the tag tagname with the value tagvalue.
eDependType
Dependency Type.
virtual String meshName() const =0
Name of the associated mesh (null if none).
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 bool hasTag(const String &tagname)=0
true if the variable has the tag tagname
virtual void setUsed(bool v)=0
Sets the usage state of the variable.
virtual String itemFamilyName() const =0
Name of the associated family (null if none).
virtual VariableMetaData * createMetaData() const =0
Creates an instance containing the variable's metadata.
virtual void notifyEndRead()=0
Notifies of external modification of data().
virtual void setUpToDate()=0
Indicates that the variable has just been updated.
virtual String fullName() const =0
Full variable name (with family prefix).
@ PSubDomainDepend
Indicates that the variable value is dependent on the subdomain.
@ PNoExchange
Indicates that the variable should not be exchanged.
@ PNoReplicaSync
Indicates that the variable does not necessarily have the same value across replicas.
@ PTemporary
Indicates that the variable is temporary.
@ PInShMem
Indicates that the variable must be allocated in shared memory.
@ PExecutionDepend
Indicates that the variable value is dependent on the execution.
@ PHasTrace
Indicates that the variable is traced (only in trace mode).
@ PPrivate
Indicates that the variable is private.
@ PPersistant
Indicates that the variable is persistent.
@ PNoRestore
Indicates that the variable should not be restored.
@ PSubDomainPrivate
Indicates that the variable is private to the subdomain.
@ PNoNeedSync
Indicates that the variable is not necessarily synchronized.
@ PNoDump
Indicates that the variable should not be saved.
@ PDumpNull
Indicates that the save will be null for this variable and for this subdomain.
virtual ARCANE_DEPRECATED_2018 void read(IDataReader *reader)=0
virtual bool initialize(const ItemGroup &group, const String &value)=0
Initializes the variable on a group.
virtual int property() const =0
Returns the properties of the variable.
virtual Ref< VariableMetaData > createMetaDataRef() const =0
Creates an instance containing the variable's metadata.
virtual eItemKind itemKind() const =0
Kind of mesh entities on which the variable is based.
virtual Int64 modifiedTime()=0
Time when the variable was updated.
virtual Integer nbReference() const =0
Number of references on this variable.
virtual String tagValue(const String &tagname)=0
Value of the tag tagname. The string is null if the tag does not exist.
virtual void synchronize()=0
Synchronizes the variable.
virtual IDataFactoryMng * dataFactoryMng() const =0
Data factory associated with the variable.
virtual ~IVariable()=default
Frees resources.
virtual bool isPartial() const =0
Indicates if the variable is partial.
virtual Integer dimension() const =0
Dimension of the variable.
virtual void resizeFromGroup()=0
Sets the number of elements for a mesh variable.
virtual void notifyReferencePropertyChanged()=0
virtual void removeDepend(IVariable *var)=0
Removes var from the list of dependencies.
virtual IData * data()=0
Data associated with the variable.
virtual void syncReferences()=0
Synchronizes references.
virtual Int32 checkIfSync(Integer max_print=0)=0
Checks if the variable is properly synchronized.
virtual VariableRef * firstReference() const =0
First reference (or null) on this variable.
virtual bool isUsed() const =0
Usage state of the variable.
virtual void dependInfos(Array< VariableDependInfo > &infos)=0
Dependency information.
virtual ItemGroup itemGroup() const =0
Associated mesh group.
static Int64 incrementModifiedTime()
Increments the modification counter and returns its value before modification.
virtual Integer multiTag() const =0
Indicates if the variable is a multi-sized array.
virtual ARCANE_DEPRECATED_2018 void write(IDataWriter *writer)=0
Saves the variable.
virtual IVariableComputeFunction * computeFunction()=0
Function used to update the variable.
virtual Int32 checkIfSame(IDataReader *reader, Integer max_print, bool compare_ghost)=0
Checks that the variable is identical to a reference value.
virtual IMesh * mesh() const =0
Mesh associated with the variable.
virtual DataAllocationInfo allocationInfo() const =0
Allocation information.
virtual ISubDomain * subDomain()=0
Subdomain associated with the variable (TODO deprecate end of 2023).
virtual IObservable * readObservable()=0
Read observable.
virtual IObservable * onSizeChangedObservable()=0
Size change observable.
virtual void update()=0
Recalculates the variable if necessary.
static const char * TAG_POST_PROCESSING
Tag used to indicate if a variable will be post-processed.
virtual void compact(Int32ConstArrayView new_to_old_ids)=0
Compresses the variable's values.
virtual void addDepend(IVariable *var, eDependType dt)=0
Adds var to the list of dependencies.
virtual void notifyBeginWrite()=0
Notifies of the start of writing data().
virtual Int32 checkIfSameOnAllReplica(Integer max_print=0)=0
Checks if the variable has the same values on all replicas.
virtual void setComputeFunction(IVariableComputeFunction *v)=0
Sets the variable's recalculation function.
virtual IObservable * writeObservable()=0
Write observable.
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 des...
virtual void removeTag(const String &tagname)=0
Removes the tag tagname.
virtual void serialize(ISerializer *sbuffer, IDataOperation *operation=0)=0
virtual void setAllocationInfo(const DataAllocationInfo &v)=0
Sets allocation information.
virtual Integer nbElement() const =0
Number of elements of the variable.
virtual IItemFamily * itemFamily() const =0
Associated entity family.
virtual String itemGroupName() const =0
Name of the associated entity group.
virtual MeshHandle meshHandle() const =0
Mesh associated with the variable.
static const char * TAG_POST_PROCESSING_AT_THIS_ITERATION
Tag used to indicate if a variable will be post-processed at this iteration.
virtual void addVariableRef(VariableRef *var_ref)=0
Adds a reference to this variable.
virtual String name() const =0
Variable name.
virtual void removeVariableRef(VariableRef *var_ref)=0
Removes a reference to this variable.
virtual void copyItemsValues(Int32ConstArrayView source, Int32ConstArrayView destination)=0
Copies the values of entities numbered source into entities numbered destination.
virtual IVariableInternal * _internalApi()=0
Internal Arcane API.
virtual void shrinkMemory()=0
Frees any additional memory allocated for the data.
virtual IVariableMng * variableMng() const =0
Variable manager associated with the variable.
virtual void resize(Integer new_size)=0
Sets the number of elements for an array variable.
Reference to an instance.
Unicode character string.
Information about a variable dependency.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
eTraceType
Possible trace type.
eItemKind
Mesh entity type.
double Real
Type representing a real number.
std::int32_t Int32
Signed integer type of 32 bits.