Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
AMR for Cartesian Meshes

This subsection explains the AMR part of Arcane for Cartesian Meshes.

Introduction

Two types of AMR are available in Arcane:

  • Cell-based AMR for unstructured (and Cartesian) meshes (amr-type=1),
  • Patch-based AMR for Cartesian meshes (amr-type=3).

AMR type 1 allows refining one or more cells by providing an array of localIds.

mesh()->modifier()->flagCellToRefine(cells_local_id);
mesh()->modifier()->adapt();

For Cartesian meshes, several methods are available to encapsulate the non-structured AMR methods and allow for the creation of patches.

Note
Nodes of cells common between levels are not duplicated in AMR type 1. They are in AMR type 3.

For Cartesian meshes, AMR type 3 is also available and introduces a new API. The user marks cells to refine, and then Arcane handles determining regular patches as well as overlap cells. The operation is more guided.

To use AMR type 3, the face numbering must be changed. Currently, the change is made during the first call to Arcane::ICartesianMesh::computeDirections(). Furthermore, patch numbering can be managed by the class Arcane::CartesianMeshNumberingMng.

The choice of AMR type to use is made in the dataset:

<mesh amr-type="3">
<meshgenerator>
<cartesian>
<nsd>2 2</nsd>
<origine>0.0 0.0</origine>
<lx nx='16'>64.0</lx>
<ly ny='16'>64.0</ly>
</cartesian>
</meshgenerator>
</mesh>
Note
It is not yet possible to specify the AMR type with the new version of the Cartesian mesh generator.


Table of Contents for this subsection:

  1. Notions
    Explanation of some concepts provided by AMR.
  1. Functionality
    Explanation of how AMR works in Arcane.