Coarsens a Cartesian mesh by 2. More...
#include <arcane/cartesianmesh/CartesianMeshCoarsening2.h>
Public Member Functions | |
| void | createCoarseCells () |
| Coarsens the initial mesh by 2. | |
| void | removeRefinedCells () |
| 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 Member Functions | |
| CartesianMeshCoarsening2 (ICartesianMesh *m) | |
| Int64 | _getMaxUniqueId (const ItemGroup &group) |
| Returns the max of uniqueId() of entities in a group. | |
| void | _recomputeMeshGenerationInfo () |
| Recalculates the information about the number of cells per direction. | |
| void | _writeMeshSVG (const String &name) |
| void | _doDoubleGhostLayers () |
| Doubles the ghost layer of the initial mesh. | |
| void | _createCoarseCells2D () |
| void | _createCoarseCells3D () |
Private Attributes | |
| friend | CartesianMeshImpl |
| ICartesianMesh * | m_cartesian_mesh = nullptr |
| Int32 | m_verbosity_level = false |
| UniqueArray< Int64 > | m_coarse_cells_uid |
| uniqueId() of the coarse cells | |
| bool | m_is_create_coarse_called = false |
| bool | m_is_remove_refined_called = false |
| Int64 | m_first_own_cell_unique_id_offset = NULL_ITEM_UNIQUE_ID |
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 must the number of local cells in each subdomain.
The coarsening occurs upon calling createCoarseCell(). After this call, the mesh has the following structure:
It is then possible to keep only the coarse cells and remove the refined cells by calling the method.
Definition at line 76 of file CartesianMeshCoarsening2.h.
|
explicitprivate |
Definition at line 47 of file CartesianMeshCoarsening2.cc.
|
private |
List of the first child of each coarse cell
Definition at line 239 of file CartesianMeshCoarsening2.cc.
References Arcane::Array< T >::add(), Arcane::MutableItemBase::addFlags(), ARCANE_CHECK_POINTER, ARCANE_FATAL, Arcane::IParallelMng::commRank(), Arcane::CartesianGridDimension::FaceUniqueIdComputer2D::computeForCell(), ENUMERATE_, Arcane::Cell::face(), Arcane::CartesianGridDimension::getCellComputer2D(), Arcane::CartesianGridDimension::getFaceComputer2D(), Arcane::CartesianGridDimension::getNodeComputer2D(), Arcane::CellDirectionMng::globalNbCell(), Arcane::ItemFlags::II_JustRefined, Arcane::TraceAccessor::info(), Arcane::ItemTypeInfo::localFace(), Arcane::Item::localId(), m_coarse_cells_uid, Arcane::Item::mutableItemBase(), Arcane::ItemTypeInfo::LocalFace::node(), Arcane::IItemFamily::notifyItemsOwnerChanged(), Arcane::Item::null(), Arcane::Item::owner(), Arcane::MeshModifierAddCellsArgs::setAllowBuildFaces(), Arcane::MutableItemBase::setOwner(), Arcane::Item::typeInfo(), Arcane::Item::uniqueId(), and Arcane::IItemFamily::view().
Referenced by createCoarseCells().
|
private |
List of the first child of each coarse cell
Definition at line 433 of file CartesianMeshCoarsening2.cc.
References Arcane::Array< T >::add(), Arcane::MutableItemBase::addFlags(), Arcane::Array< T >::addRange(), ARCANE_CHECK_POINTER, ARCANE_FATAL, Arcane::IParallelMng::commRank(), Arcane::CartesianGridDimension::CellUniqueIdComputer3D::compute(), Arcane::CartesianGridDimension::FaceUniqueIdComputer3D::computeForCell(), ENUMERATE_, Arcane::Cell::face(), Arcane::CartesianGridDimension::getCellComputer3D(), Arcane::CartesianGridDimension::getFaceComputer3D(), Arcane::CartesianGridDimension::getNodeComputer3D(), Arcane::CellDirectionMng::globalNbCell(), Arcane::ItemFlags::II_JustRefined, Arcane::TraceAccessor::info(), Arcane::ItemTypeInfo::localFace(), Arcane::Item::localId(), m_coarse_cells_uid, Arcane::Item::mutableItemBase(), Arcane::ItemTypeInfo::LocalFace::node(), Arcane::IItemFamily::notifyItemsOwnerChanged(), Arcane::Item::null(), Arcane::Item::owner(), Arcane::MeshModifierAddCellsArgs::setAllowBuildFaces(), Arcane::MutableItemBase::setOwner(), Arcane::Item::typeInfo(), Arcane::Item::uniqueId(), and Arcane::IItemFamily::view().
Referenced by createCoarseCells().
|
private |
Doubles the ghost layer of the initial mesh.
This will then allow for the correct cell ghost layer value for the final coarse mesh.
Definition at line 99 of file CartesianMeshCoarsening2.cc.
References Arcane::IGhostLayerMng::builderVersion(), Arcane::IGhostLayerMng::nbGhostLayer(), Arcane::IGhostLayerMng::setBuilderVersion(), Arcane::IMeshModifier::setDynamic(), Arcane::IGhostLayerMng::setNbGhostLayer(), and Arcane::IMeshModifier::updateGhostLayers().
Referenced by createCoarseCells().
Returns the max of uniqueId() of entities in a group.
Definition at line 60 of file CartesianMeshCoarsening2.cc.
References ENUMERATE_, and Arcane::Item::uniqueId().
Referenced by createCoarseCells().
|
private |
Recalculates the information about the number of cells per direction.
Definition at line 678 of file CartesianMeshCoarsening2.cc.
Referenced by createCoarseCells().
|
private |
Definition at line 75 of file CartesianMeshCoarsening2.cc.
| void Arcane::CartesianMeshCoarsening2::createCoarseCells | ( | ) |
Coarsens the initial mesh by 2.
This method is collective.
Creates the patch with the child cells
Definition at line 127 of file CartesianMeshCoarsening2.cc.
References _createCoarseCells2D(), _createCoarseCells3D(), _doDoubleGhostLayers(), _getMaxUniqueId(), _recomputeMeshGenerationInfo(), ARCANE_FATAL, Arcane::MeshStats::dumpStats(), ENUMERATE_, Arcane::Cell::face(), Arcane::TraceAccessor::info(), Arcane::Cell::level(), Arcane::ItemVectorView::localIds(), Arcane::math::max(), Arcane::Cell::nbFace(), Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::node(), Arcane::CellDirectionMng::ownNbCell(), Arcane::IParallelMng::reduce(), Arcane::MessagePassing::ReduceMax, Arcane::Array< T >::resize(), Arcane::TraceAccessor::traceMng(), Arcane::Item::uniqueId(), and Arcane::ItemGroup::view().
| void Arcane::CartesianMeshCoarsening2::removeRefinedCells | ( | ) |
Definition at line 707 of file CartesianMeshCoarsening2.cc.
|
private |
Definition at line 79 of file CartesianMeshCoarsening2.h.
|
private |
Definition at line 98 of file CartesianMeshCoarsening2.h.
|
private |
uniqueId() of the coarse cells
Definition at line 101 of file CartesianMeshCoarsening2.h.
Referenced by _createCoarseCells2D(), and _createCoarseCells3D().
|
private |
Definition at line 104 of file CartesianMeshCoarsening2.h.
|
private |
Definition at line 102 of file CartesianMeshCoarsening2.h.
|
private |
Definition at line 103 of file CartesianMeshCoarsening2.h.
|
private |
Definition at line 99 of file CartesianMeshCoarsening2.h.