Coarsens a Cartesian mesh by 2. More...
#include <arcane/cartesianmesh/CartesianMeshCoarsening.h>
Public Member Functions | |
| void | createCoarseCells () |
| Coarsens the initial mesh by 2. | |
| ConstArrayView< Int32 > | refinedCells (Int32 index) const |
| List of localIds() of refined cells for the parent cell at index index. | |
| ConstArrayView< Int32 > | coarseCells () const |
| List of localIds() of coarse cells. | |
| void | removeRefinedCells () |
| Removes refined cells. | |
| 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 |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Coarsens a Cartesian mesh by 2.
This class allows coarsening a Cartesian mesh. Instances of this class are created via ICartesianMesh::createCartesianMeshCoarsening().
The initial mesh must be Cartesian and must not have patches.
The mesh must be an AMR mesh (IMesh::isAmrActivated()==true).
The number of cells in each dimension must be a multiple of 2 as well as the number of local cells in each subdomain.
The coarsening is done in two phases:
Definition at line 78 of file CartesianMeshCoarsening.h.
|
inline |
List of localIds() of coarse cells.
This method is only valid after calling createCoarseCells().
Definition at line 113 of file CartesianMeshCoarsening.h.
| void Arcane::CartesianMeshCoarsening::createCoarseCells | ( | ) |
Coarsens the initial mesh by 2.
This method is collective.
List of the first child of each coarse cell
Definition at line 70 of file CartesianMeshCoarsening.cc.
References Arcane::Array< T >::add(), Arcane::MutableItemBase::addFlags(), ARCANE_FATAL, Arcane::IParallelMng::commRank(), ENUMERATE_, Arcane::ItemBase::flags(), Arcane::CellDirectionMng::globalNbCell(), Arcane::ItemFlags::II_UserMark1, Arcane::TraceAccessor::info(), Arcane::Item::itemBase(), Arcane::Cell::itemLocalId(), Arcane::IItemFamily::itemsUniqueIdToLocalId(), Arcane::Cell::level(), Arcane::ItemTypeInfo::localFace(), Arcane::Item::localId(), Arcane::String::localstr(), Arcane::math::max(), Arcane::Item::mutableItemBase(), Arcane::ItemTypeInfo::LocalFace::node(), Arcane::ItemWithNodes::node(), Arcane::IItemFamily::notifyItemsOwnerChanged(), Arcane::Item::owner(), Arcane::CellDirectionMng::ownNbCell(), Arcane::IParallelMng::reduce(), Arcane::MessagePassing::ReduceMax, Arcane::MutableItemBase::removeFlags(), Arcane::Array< T >::resize(), Arcane::MutableItemBase::setOwner(), Arcane::Item::typeInfo(), Arcane::Item::uniqueId(), Arcane::IItemFamily::view(), and Arcane::SimpleSVGMeshExporter::write().
|
inline |
List of localIds() of refined cells for the parent cell at index index.
This method is only valid after calling createCoarseCells().
In 2D, there are 4 refined cells per coarse cell. In 3D, there are 8.
Definition at line 104 of file CartesianMeshCoarsening.h.
| void Arcane::CartesianMeshCoarsening::removeRefinedCells | ( | ) |
Removes refined cells.
createCoarseCells() must be called beforehand.
Definition at line 282 of file CartesianMeshCoarsening.cc.
References Arcane::Array< T >::add(), ARCANE_FATAL, Arcane::MeshStats::dumpStats(), Arcane::IMeshModifier::endUpdate(), ENUMERATE_, Arcane::Item::isOwn(), Arcane::IMeshModifier::removeCells(), Arcane::IMeshModifier::setDynamic(), Arcane::TraceAccessor::traceMng(), and Arcane::IMeshModifier::updateGhostLayers().