Implementation of a material manager. More...
#include <arcane/materials/internal/MeshMaterialMng.h>
Classes | |
| class | RunnerInfo |
| Information about the execution queue used. More... | |
| class | InternalApi |
Public Member Functions | |
| MeshMaterialMng (const MeshHandle &mesh_handle, const String &name) | |
| void | build () |
| IMesh * | mesh () override |
| Associated mesh. | |
| ITraceMng * | traceMng () override |
| Trace manager. | |
| MeshMaterialInfo * | registerMaterialInfo (const String &name) override |
| Registers the material info with name name. | |
| IMeshEnvironment * | createEnvironment (const MeshEnvironmentBuildInfo &infos) override |
| Creation of an environment. | |
| IMeshBlock * | createBlock (const MeshBlockBuildInfo &infos) override |
| Creates a block. | |
| void | addEnvironmentToBlock (IMeshBlock *block, IMeshEnvironment *env) override |
| Adds an environment to an existing block. | |
| void | removeEnvironmentToBlock (IMeshBlock *block, IMeshEnvironment *env) override |
| Removes an environment from an existing block. | |
| void | endCreate (bool is_continue) override |
| Indicates that environment creation is finished. | |
| void | setDataInitialisationWithZero (bool v) override |
| Indicates how to initialize new values in material and environment cells. | |
| bool | isDataInitialisationWithZero () const override |
| Indicates how to initialize new values in material and environment cells. | |
| void | setKeepValuesAfterChange (bool v) override |
| Sets the saving of values between two modifications of the materials. | |
| bool | isKeepValuesAfterChange () const override |
| Indicates if variable values are preserved between modifications. | |
| void | setMeshModificationNotified (bool v) override |
| Indicates if environments and materials follow changes in the mesh topology. | |
| bool | isMeshModificationNotified () const override |
| Indicates if environments and materials follow changes in the mesh topology. | |
| void | setModificationFlags (int v) override |
| Sets the flags to parameterize material/environment modifications. | |
| int | modificationFlags () const override |
| Flags to parameterize modifications. | |
| void | setAllocateScalarEnvironmentVariableAsMaterial (bool v) override |
| Sets the option indicating whether scalar variables of environments are allocated on materials. | |
| bool | isAllocateScalarEnvironmentVariableAsMaterial () const override |
| Indicates if environment scalar variables are allocated on materials. | |
| void | setDataCompressorServiceName (const String &name) override |
| Name of the service used to compress data during forceRecompute(). | |
| String | dataCompressorServiceName () const override |
| Virtual name of the service used to compress data. | |
| String | name () const override |
| Manager name. | |
| ConstArrayView< IMeshMaterial * > | materials () const override |
| List of materials. | |
| ConstArrayView< IMeshComponent * > | materialsAsComponents () const override |
| List of materials viewed as components. | |
| ConstArrayView< IMeshEnvironment * > | environments () const override |
| List of environments. | |
| ConstArrayView< IMeshComponent * > | environmentsAsComponents () const override |
| List of environments viewed as components. | |
| ConstArrayView< IMeshComponent * > | components () const override |
| List of all components. | |
| ConstArrayView< IMeshBlock * > | blocks () const override |
| List of blocks. | |
| IMeshEnvironment * | findEnvironment (const String &name, bool throw_exception=true) override |
| Returns the environment with name name. | |
| IMeshBlock * | findBlock (const String &name, bool throw_exception=true) override |
| Returns the block with name name. | |
| void | fillWithUsedVariables (Array< IMeshMaterialVariable * > &variables) override |
| Fills the array variables with the list of used material variables. | |
| IMeshMaterialVariable * | findVariable (const String &name) override |
| Variable with name name or nullptr if none of this name exists. | |
| IMeshMaterialVariable * | checkVariable (IVariable *global_var) override |
| Material variable associated with the global variable global_var (nullptr if none). | |
| void | dumpInfos (std::ostream &o) override |
| Writes the material and environment info to the stream o. | |
| void | dumpCellInfos (Cell cell, std::ostream &o) override |
| Writes the cell info cell to the stream o. | |
| void | checkValid () override |
| Checks the validity of internal structures. | |
| void | forceRecompute () override |
| Forces the recalculation of material information. | |
| Mutex * | variableLock () override |
| Lock used for multi-threading. | |
| bool | synchronizeMaterialsInCells () override |
| Synchronizes material cells. | |
| void | checkMaterialsInCells (Integer max_print) override |
| Checks that material cells are consistent between subdomains. | |
| Int64 | timestamp () const override |
| Counter for the number of modifications of the material list and environments. | |
| ConstArrayView< MeshEnvironment * > | trueEnvironments () const |
| ConstArrayView< MeshMaterial * > | trueMaterials () const |
| Int32 | nbVariable () const |
| AllEnvCellVectorView | _view (SmallSpan< const Int32 > cells_local_id) |
| AllEnvCellVectorView | view (const CellGroup &cells) final |
| View of environment cells corresponding to the group cells. | |
| AllEnvCellVectorView | view (CellVectorView cells) final |
| View of environment cells corresponding to the group cells. | |
| AllEnvCellVectorView | view (SmallSpan< const Int32 > cells_local_id) final |
| View of environment cells corresponding to local cell IDs cells_local_id. | |
| CellToAllEnvCellConverter | cellToAllEnvCellConverter () override |
| Creates an instance to convert from 'Cell' to 'AllEnvCell'. | |
| void | recreateFromDump () override |
| Recreates the material and environment info from the dump info. | |
| void | visitVariables (IFunctorWithArgumentT< IMeshMaterialVariable * > *functor) override |
| Applies the functor functor to all material variables. | |
| void | setSynchronizeVariableVersion (Integer version) override |
| Sets the version of the implementation for synchronizing material variables. | |
| Integer | synchronizeVariableVersion () const override |
| Version of the implementation for synchronizing material variables. | |
| bool | isInMeshMaterialExchange () const override |
| True if a mesh exchange with material management is underway. | |
| IMeshMaterialVariableFactoryMng * | variableFactoryMng () const override |
| Interface of the variable factory. | |
| void | setUseMaterialValueWhenRemovingPartialValue (bool v) override |
| Indicates whether the material or environment value is used when transforming a cell from a partial cell to a pure cell. | |
| bool | isUseMaterialValueWhenRemovingPartialValue () const override |
| AllEnvData * | allEnvData () |
| ComponentItemSharedInfo * | componentItemSharedInfo (Int32 level) const |
| void | syncVariablesReferences (bool check_resize) |
| Updates the variable references. | |
| void | incrementTimestamp () |
| void | dumpInfos2 (std::ostream &o) |
| const MeshHandle & | meshHandle () const |
| void | enableCellToAllEnvCellForRunCommand (bool is_enable, bool force_create=false) override |
| Activates or deactivates the construction and update of the table of "connectivity" CellLocalId -> AllEnvCell for RUNCOMMAND. | |
| bool | isCellToAllEnvCellForRunCommand () const override |
| IMeshMaterialMngInternal * | _internalApi () const override |
| Internal API for Arcane. | |
| Runner & | runner () const |
| RunQueue & | runQueue () const |
| Accelerator::RunQueuePool & | asyncRunQueuePool () const |
| Real | additionalCapacityRatio () const |
| SmallSpan< const Int32 > | identitySelectionView () |
| 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 |
Private Types | |
| using | FullNameVariableMap = std::map<String, IMeshMaterialVariable*> |
| Type of the list of variables by full name. | |
| using | FullNameVariablePair = FullNameVariableMap::value_type |
| Pair of the list of variables by full name. | |
| using | VariableToMaterialVariableMap = std::map<IVariable*, IMeshMaterialVariable*> |
| using | VariableToMaterialVariablePair = VariableToMaterialVariableMap::value_type |
Friends | |
| class | MeshMaterialBackup |
Additional Inherited Members | |
| Static Public Member Functions inherited from Arcane::Materials::IMeshMaterialMng | |
| static IMeshMaterialMng * | getReference (const MeshHandleOrMesh &mesh_handle, bool create=true) |
| Retrieves or creates the reference associated with mesh. | |
| static Ref< IMeshMaterialMng > | getTrueReference (const MeshHandle &mesh_handle, bool create=true) |
| Retrieves or creates the reference associated with mesh. | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Implementation of a material manager.
Definition at line 62 of file MeshMaterialMng.h.
|
private |
Type of the list of variables by full name.
Definition at line 347 of file MeshMaterialMng.h.
|
private |
Pair of the list of variables by full name.
Definition at line 349 of file MeshMaterialMng.h.
|
private |
Definition at line 351 of file MeshMaterialMng.h.
|
private |
Definition at line 352 of file MeshMaterialMng.h.
| Arcane::Materials::MeshMaterialMng::MeshMaterialMng | ( | const MeshHandle & | mesh_handle, |
| const String & | name ) |
Definition at line 148 of file MeshMaterialMng.cc.
|
override |
Definition at line 173 of file MeshMaterialMng.cc.
|
private |
Definition at line 867 of file MeshMaterialMng.cc.
|
private |
Definition at line 358 of file MeshMaterialMng.cc.
|
inlineoverrideprivatevirtual |
Synchronizer for environment-only variables on all cells.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 439 of file MeshMaterialMng.h.
|
inlineoverrideprivatevirtual |
Synchronizer for material and environment variables on all cells.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 435 of file MeshMaterialMng.h.
|
private |
Definition at line 1127 of file MeshMaterialMng.cc.
|
private |
Definition at line 1044 of file MeshMaterialMng.cc.
|
private |
Creation of a material.
Creates a material named name, in environment env, with info infos.
Definition at line 374 of file MeshMaterialMng.cc.
References ARCANE_FATAL, Arcane::Materials::MeshMaterial::build(), Arcane::TraceAccessor::info(), Arcane::Materials::MeshEnvironment::materialMng(), Arcane::Materials::MeshMaterialInfo::materialMng(), and name().
Referenced by createEnvironment().
|
private |
Definition at line 1338 of file MeshMaterialMng.cc.
|
private |
Updates the structures following a modification of material or environment cells.
Definition at line 699 of file MeshMaterialMng.cc.
Referenced by endCreate(), and forceRecompute().
Definition at line 674 of file MeshMaterialMng.cc.
|
private |
Definition at line 648 of file MeshMaterialMng.cc.
|
private |
Definition at line 622 of file MeshMaterialMng.cc.
|
private |
Definition at line 826 of file MeshMaterialMng.cc.
|
inlineoverridevirtual |
Internal API for Arcane.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 327 of file MeshMaterialMng.h.
|
private |
Definition at line 613 of file MeshMaterialMng.cc.
|
private |
Definition at line 1279 of file MeshMaterialMng.cc.
|
private |
Definition at line 880 of file MeshMaterialMng.cc.
|
private |
Definition at line 1141 of file MeshMaterialMng.cc.
|
private |
Definition at line 1294 of file MeshMaterialMng.cc.
|
inlineprivate |
Definition at line 431 of file MeshMaterialMng.h.
| AllEnvCellVectorView Arcane::Materials::MeshMaterialMng::_view | ( | SmallSpan< const Int32 > | cells_local_id | ) |
Definition at line 1054 of file MeshMaterialMng.cc.
|
overridevirtual |
Adds an environment to an existing block.
Adds the environment env to the block block.
The modification of a block can only take place during initialization, (i.e., before calling endCreate()).
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 506 of file MeshMaterialMng.cc.
References Arcane::Materials::MeshBlock::addEnvironment(), and ARCANE_CHECK_POINTER.
|
inline |
Definition at line 335 of file MeshMaterialMng.h.
|
inline |
Definition at line 310 of file MeshMaterialMng.h.
|
inline |
Definition at line 334 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
List of blocks.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 226 of file MeshMaterialMng.h.
| void Arcane::Materials::MeshMaterialMng::build | ( | ) |
Definition at line 220 of file MeshMaterialMng.cc.
|
overridevirtual |
Creates an instance to convert from 'Cell' to 'AllEnvCell'.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 1035 of file MeshMaterialMng.cc.
|
overridevirtual |
Checks that material cells are consistent between subdomains.
This method allows checking that all ghost cells of our subdomain have the same list of materials as the associated owned cells.
In case of an error, the list of inconsistent cells is displayed and a FatalErrorException is raised.
max_print indicates the maximum number of errors to display in case of an error. If it is negative, all cells are displayed.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 1006 of file MeshMaterialMng.cc.
|
overridevirtual |
Checks the validity of internal structures.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 742 of file MeshMaterialMng.cc.
References Arcane::Materials::matimpl::ConstituentItemBase::_superItemBase(), Arcane::Materials::ConstituentItem::_varIndex(), Arcane::IItemFamily::allItems(), ARCANE_FATAL, Arcane::Materials::MatVarIndex::arrayIndex(), Arcane::Materials::AllEnvCell::cell(), Arcane::Materials::EnvCell::cell(), ENUMERATE_ALLENVCELL, Arcane::Materials::ConstituentItem::globalCell(), Arcane::Materials::matimpl::ConstituentItemBase::globalItemBase(), Arcane::Materials::ConstituentItem::level(), Arcane::Item::localId(), Arcane::ItemVectorView::localIds(), Arcane::Materials::MatCell::material(), mesh(), Arcane::Materials::IMeshComponent::name(), Arcane::Materials::AllEnvCell::nbEnvironment(), Arcane::Item::uniqueId(), Arcane::ItemGroup::view(), and view().
|
overridevirtual |
Material variable associated with the global variable global_var (nullptr if none).
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 838 of file MeshMaterialMng.cc.
| ComponentItemSharedInfo * Arcane::Materials::MeshMaterialMng::componentItemSharedInfo | ( | Int32 | level | ) | const |
Definition at line 1318 of file MeshMaterialMng.cc.
|
inlineoverridevirtual |
List of all components.
This list is the concatenation of environmentsAsComponents() and materialsAsComponents(). It is only valid once endCreate() has been called.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 225 of file MeshMaterialMng.h.
|
private |
Definition at line 1363 of file MeshMaterialMng.cc.
|
overridevirtual |
Creates a block.
Creates a block with the info infos.
The creation of a block can only take place during initialization, (i.e., before calling endCreate()), but after the creation of environments.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 476 of file MeshMaterialMng.cc.
References ARCANE_FATAL, Arcane::Materials::MeshBlock::build(), Arcane::Materials::MeshBlockBuildInfo::environments(), Arcane::TraceAccessor::info(), Arcane::Materials::MeshBlockBuildInfo::name(), name(), and Arcane::ConstArrayView< T >::size().
Referenced by recreateFromDump().
|
overridevirtual |
Creation of an environment.
The environment info is provided by the structure infos. Along with the environment, all constituent materials are created.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 421 of file MeshMaterialMng.cc.
References _createMaterial(), ARCANE_FATAL, Arcane::Materials::MeshEnvironment::build(), Arcane::TraceAccessor::info(), Arcane::Materials::MeshEnvironment::materials(), Arcane::Materials::MeshEnvironmentBuildInfo::materials(), Arcane::Materials::MeshEnvironment::name(), Arcane::Materials::MeshEnvironmentBuildInfo::name(), and traceMng().
Referenced by recreateFromDump().
|
inlineoverridevirtual |
Virtual name of the service used to compress data.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 218 of file MeshMaterialMng.h.
|
overridevirtual |
Writes the cell info cell to the stream o.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 1015 of file MeshMaterialMng.cc.
References ENUMERATE_CELL_ENVCELL, ENUMERATE_CELL_MATCELL, and Arcane::Materials::ConstituentItem::globalCell().
|
overridevirtual |
Writes the material and environment info to the stream o.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 893 of file MeshMaterialMng.cc.
References Arcane::Materials::MeshMaterialVariableIndexer::name(), and Arcane::ConstArrayView< T >::size().
| void Arcane::Materials::MeshMaterialMng::dumpInfos2 | ( | std::ostream & | o | ) |
Definition at line 934 of file MeshMaterialMng.cc.
|
inlineoverridevirtual |
Activates or deactivates the construction and update of the table of "connectivity" CellLocalId -> AllEnvCell for RUNCOMMAND.
It can also be activated by the environment variable ARCANE_ALLENVCELL_FOR_RUNCOMMAND. Optionally, the table can be forced to be created, which can be useful during a late call of this method compared to ForceRecompute()
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 319 of file MeshMaterialMng.h.
|
overridevirtual |
Indicates that environment creation is finished.
The instance is not usable until this method has been called.
If is_continue is true, it rebuilds for each material and environment the list of their cells from the recovery information.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 526 of file MeshMaterialMng.cc.
References _endUpdate(), Arcane::Materials::IMeshMaterialVariable::buildFromManager(), Arcane::Materials::Environment, Arcane::TraceAccessor::info(), Arcane::Materials::MaterialAndEnvironment, mesh(), and Arcane::Materials::IMeshMaterialVariable::name().
Referenced by recreateFromDump().
|
inlineoverridevirtual |
List of environments.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 223 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
List of environments viewed as components.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 224 of file MeshMaterialMng.h.
|
overridevirtual |
Fills the array variables with the list of used material variables.
The array variables is cleared before the call.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 850 of file MeshMaterialMng.cc.
References Arcane::Array< T >::add(), Arcane::Array< T >::clear(), Arcane::Materials::IMeshMaterialVariable::globalVariable(), and Arcane::IVariable::isUsed().
|
overridevirtual |
Returns the block with name name.
If no block with this name exists, returns null if throw_exception is false and throws an exception if throw_exception is true.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 660 of file MeshMaterialMng.cc.
References ARCANE_FATAL, and name().
|
overridevirtual |
Returns the environment with name name.
If no environment with this name exists, returns null if throw_exception is false and throws an exception if throw_exception is true.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 634 of file MeshMaterialMng.cc.
References ARCANE_FATAL, and name().
Referenced by recreateFromDump().
|
overridevirtual |
Variable with name name or nullptr if none of this name exists.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 803 of file MeshMaterialMng.cc.
References Arcane::IVariable::fullName(), mesh(), and name().
|
overridevirtual |
Forces the recalculation of material information.
This method allows forcing the recalculation of information on cells mixed, for example, following a mesh change. This is a temporary method that will eventually be removed. Mixed values are invalidated after calling this method.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 686 of file MeshMaterialMng.cc.
References _endUpdate().
|
inlineprivate |
Definition at line 341 of file MeshMaterialMng.h.
Definition at line 1375 of file MeshMaterialMng.cc.
|
inline |
Definition at line 314 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Indicates if environment scalar variables are allocated on materials.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 212 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 325 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Indicates how to initialize new values in material and environment cells.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 200 of file MeshMaterialMng.h.
|
overridevirtual |
True if a mesh exchange with material management is underway.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 1118 of file MeshMaterialMng.cc.
|
inlineoverridevirtual |
Indicates if variable values are preserved between modifications.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 203 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Indicates if environments and materials follow changes in the mesh topology.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 206 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 303 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
List of materials.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 221 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
List of materials viewed as components.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 222 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Associated mesh.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 186 of file MeshMaterialMng.h.
Referenced by checkValid(), endCreate(), findVariable(), and recreateFromDump().
|
inline |
Definition at line 317 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Flags to parameterize modifications.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 209 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Manager name.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 220 of file MeshMaterialMng.h.
Referenced by _createMaterial(), createBlock(), findBlock(), findEnvironment(), findVariable(), recreateFromDump(), registerMaterialInfo(), and setDataCompressorServiceName().
|
inline |
Definition at line 255 of file MeshMaterialMng.h.
|
overridevirtual |
Recreates the material and environment info from the dump info.
This method replaces endCreate() and can only be used during recovery and during initialization.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 1200 of file MeshMaterialMng.cc.
References Arcane::Materials::MeshBlockBuildInfo::addEnvironment(), Arcane::Materials::MeshEnvironmentBuildInfo::addMaterial(), ARCANE_FATAL, createBlock(), createEnvironment(), Arcane::AbstractArray< T >::empty(), endCreate(), findEnvironment(), Arcane::IItemFamily::findGroup(), Arcane::TraceAccessor::info(), mesh(), name(), Arcane::ItemGroup::null(), registerMaterialInfo(), and Arcane::AbstractArray< T >::size().
|
overridevirtual |
Registers the material info with name name.
This operation only registers the information of a material. This information is then used when creating the environment via createEnvironment().
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 398 of file MeshMaterialMng.cc.
References ARCANE_FATAL, and name().
Referenced by recreateFromDump().
|
overridevirtual |
Removes an environment from an existing block.
Removes the environment env from the block block.
The modification of a block can only take place during initialization, (i.e., before calling endCreate()).
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 516 of file MeshMaterialMng.cc.
References ARCANE_CHECK_POINTER, and Arcane::Materials::MeshBlock::removeEnvironment().
|
inline |
Definition at line 332 of file MeshMaterialMng.h.
|
inline |
Definition at line 333 of file MeshMaterialMng.h.
|
overridevirtual |
Sets the option indicating whether scalar variables of environments are allocated on materials.
If active, then environment scalar variables are still allocated on materials. This allows declaring the same variable both as a material variable and an environment variable (e.g., MaterialVariableCellReal and EnvironmentVariableCellReal).
By default, this option is not active.
This method must be enabled before calling endCreate() to be taken into account.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 593 of file MeshMaterialMng.cc.
References Arcane::TraceAccessor::info().
|
overridevirtual |
Name of the service used to compress data during forceRecompute().
If null (the default), no compression is performed.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 604 of file MeshMaterialMng.cc.
References name().
|
inlineoverridevirtual |
Indicates how to initialize new values in material and environment cells.
If true, the new values are initialized to zero or the null vector following the data type. If false, initialization is done with the global value.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 199 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Sets the saving of values between two modifications of the materials.
If active, the values of partial variables are preserved between two modifications of the material list.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 202 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Indicates if environments and materials follow changes in the mesh topology.
This method must be called before any material creation.
If v is false, environments and materials are not notified of changes in the mesh topology. In this case, all associated data is invalidated.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 205 of file MeshMaterialMng.h.
|
overridevirtual |
Sets the flags to parameterize material/environment modifications.
The possible flags are a combination of eModificationFlags.
For example:
This method must be enabled before calling endCreate() to be taken into account.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 582 of file MeshMaterialMng.cc.
References Arcane::TraceAccessor::info().
|
inlineoverridevirtual |
Sets the version of the implementation for synchronizing material variables.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 282 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Indicates whether the material or environment value is used when transforming a cell from a partial cell to a pure cell.
When transitioning from a partial cell to a pure cell, the partial value must be copied into the global value. By default, the behavior is not the same depending on whether optimizations are active or not (
If this property is true, it allows using the material value in all cases.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 299 of file MeshMaterialMng.h.
|
overridevirtual |
Synchronizes material cells.
This method allows synchronizing between subdomains the cells of each material. It is collective
During this call, the subdomain owning N cells sends to the subdomains that possess these N cells as ghost cells the list of materials it possesses. These latter subdomains update this list by adding or removing the necessary materials.
After this call, it is guaranteed that the ghost cells of a subdomain have the same list of materials and environments as the cells of the subdomain that owns these cells. It is possible, in particular, to synchronize variables via MeshMaterialVariableRef::synchronize().
Returns true if the materials of this subdomain have been modified following the synchronization, false otherwise.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 997 of file MeshMaterialMng.cc.
|
inlineoverridevirtual |
Version of the implementation for synchronizing material variables.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 287 of file MeshMaterialMng.h.
| void Arcane::Materials::MeshMaterialMng::syncVariablesReferences | ( | bool | check_resize | ) |
Updates the variable references.
This must be done when the number of elements per material or environment changes because the arrays containing the associated variables may be modified during the operation.
Definition at line 715 of file MeshMaterialMng.cc.
References Arcane::TraceAccessor::info(), Arcane::Materials::IMeshMaterialVariable::name(), and Arcane::Materials::IMeshMaterialVariableInternal::syncReferences().
|
inlineoverridevirtual |
Counter for the number of modifications of the material list and environments.
This counter increases every time materials are added or removed. The increment is not necessarily constant.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 251 of file MeshMaterialMng.h.
References m_timestamp.
|
inlineoverridevirtual |
Trace manager.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 187 of file MeshMaterialMng.h.
References Arcane::TraceAccessor::traceMng().
Referenced by createEnvironment().
|
inline |
Definition at line 253 of file MeshMaterialMng.h.
|
inline |
Definition at line 254 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Interface of the variable factory.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 294 of file MeshMaterialMng.h.
|
inlineoverridevirtual |
Lock used for multi-threading.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 243 of file MeshMaterialMng.h.
|
inlinefinalvirtual |
View of environment cells corresponding to the group cells.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 266 of file MeshMaterialMng.h.
|
inlinefinalvirtual |
View of environment cells corresponding to the group cells.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 261 of file MeshMaterialMng.h.
Referenced by checkValid().
|
inlinefinalvirtual |
View of environment cells corresponding to local cell IDs cells_local_id.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 271 of file MeshMaterialMng.h.
|
overridevirtual |
Applies the functor functor to all material variables.
Implements Arcane::Materials::IMeshMaterialMng.
Definition at line 728 of file MeshMaterialMng.cc.
Referenced by Arcane::Materials::IncrementalComponentModifier::_copyBetweenPartialsAndGlobals(), Arcane::Materials::IncrementalComponentModifier::_resizeVariablesIndexer(), and Arcane::Materials::MeshMaterialExchangeMng::ExchangeCellStep::serialize().
|
friend |
Definition at line 68 of file MeshMaterialMng.h.
|
private |
Container for AllEnvCellToAllEnvCell for accelerator.
Definition at line 404 of file MeshMaterialMng.h.
|
private |
Definition at line 368 of file MeshMaterialMng.h.
|
private |
Definition at line 393 of file MeshMaterialMng.h.
|
private |
Definition at line 392 of file MeshMaterialMng.h.
|
private |
Definition at line 390 of file MeshMaterialMng.h.
|
private |
Definition at line 381 of file MeshMaterialMng.h.
|
private |
Definition at line 379 of file MeshMaterialMng.h.
|
private |
Definition at line 398 of file MeshMaterialMng.h.
|
private |
Definition at line 377 of file MeshMaterialMng.h.
|
private |
Definition at line 378 of file MeshMaterialMng.h.
|
private |
Definition at line 395 of file MeshMaterialMng.h.
|
private |
Definition at line 386 of file MeshMaterialMng.h.
|
private |
Identity array for selection.
Definition at line 410 of file MeshMaterialMng.h.
|
private |
Definition at line 411 of file MeshMaterialMng.h.
|
private |
Definition at line 357 of file MeshMaterialMng.h.
|
private |
Definition at line 365 of file MeshMaterialMng.h.
|
private |
Definition at line 363 of file MeshMaterialMng.h.
|
private |
Definition at line 360 of file MeshMaterialMng.h.
|
private |
Definition at line 364 of file MeshMaterialMng.h.
|
private |
Definition at line 405 of file MeshMaterialMng.h.
|
private |
Definition at line 407 of file MeshMaterialMng.h.
|
private |
Definition at line 366 of file MeshMaterialMng.h.
|
private |
Definition at line 361 of file MeshMaterialMng.h.
|
private |
Definition at line 362 of file MeshMaterialMng.h.
|
private |
Definition at line 374 of file MeshMaterialMng.h.
|
private |
Definition at line 375 of file MeshMaterialMng.h.
|
private |
Definition at line 373 of file MeshMaterialMng.h.
|
private |
Definition at line 356 of file MeshMaterialMng.h.
|
private |
Definition at line 399 of file MeshMaterialMng.h.
|
private |
Definition at line 367 of file MeshMaterialMng.h.
|
private |
Definition at line 372 of file MeshMaterialMng.h.
|
private |
Definition at line 359 of file MeshMaterialMng.h.
|
private |
Definition at line 397 of file MeshMaterialMng.h.
|
private |
Definition at line 389 of file MeshMaterialMng.h.
|
private |
Definition at line 401 of file MeshMaterialMng.h.
|
private |
Definition at line 394 of file MeshMaterialMng.h.
|
private |
Counter for the number of material modifications.
Definition at line 391 of file MeshMaterialMng.h.
Referenced by timestamp().
|
private |
Definition at line 382 of file MeshMaterialMng.h.
|
private |
Definition at line 380 of file MeshMaterialMng.h.
|
private |
Definition at line 376 of file MeshMaterialMng.h.
|
private |
Definition at line 387 of file MeshMaterialMng.h.
|
private |
Definition at line 396 of file MeshMaterialMng.h.
|
private |
Definition at line 370 of file MeshMaterialMng.h.
|
private |
Definition at line 358 of file MeshMaterialMng.h.
|
private |
Definition at line 383 of file MeshMaterialMng.h.
|
private |
Definition at line 384 of file MeshMaterialMng.h.