Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::CartesianMeshCoarsening2 Class Reference

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.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () 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

Detailed Description

Coarsens a Cartesian mesh by 2.

Warning
This method is experimental.

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:

  • coarse cells are created for every quadruplet of existing cells which thus become refined cells.
  • each coarse cell is at level 0 (Cell::level()) and each initial cell is at level 1.
  • these child cells can be accessed via the Cell::nbHChildren() and Cell::hChild() methods.
  • there will be two patches in the mesh. The first will contain the level zero cells and the second will contain the level 1 cells, which are the original cells before coarsening.

It is then possible to keep only the coarse cells and remove the refined cells by calling the method.

  • removeRefinedCells() which deletes cells other than the coarse cells. After this call, there is only a Cartesian mesh with half the number of cells in each direction. It will then be possible to call the refinement methods to create additional levels. Here is an example of user code:
ICartesianMesh* cartesian_mesh = ...;
Ref<CartesianMeshCoarsening> coarser = CartesianMeshUtils::createCartesianMeshCoarsening(cartesian_mesh);
coarser->createCoarseCells();
Reference to an instance.

Definition at line 76 of file CartesianMeshCoarsening2.h.

Member Function Documentation

◆ createCoarseCells()

◆ removeRefinedCells()

void Arcane::CartesianMeshCoarsening2::removeRefinedCells ( )

Definition at line 707 of file CartesianMeshCoarsening2.cc.


The documentation for this class was generated from the following files: