Skip to content

Commit

Permalink
[arcane:tests] In the testDir() methods, disable null pred_cell/next_…
Browse files Browse the repository at this point in the history
…cell tests (not compatible with once cell layer)

- And add a test with once cell layer.
  • Loading branch information
AlexlHer committed Dec 17, 2024
1 parent 49c8301 commit 792b37c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 6 deletions.
14 changes: 8 additions & 6 deletions arcane/ceapart/src/arcane/tests/CartesianMeshTestUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ _testDirCell()
DirCell dir_cell(cdm[icell]);
Cell prev_cell = dir_cell.previous();
Cell next_cell = dir_cell.next();
if (prev_cell.null() && next_cell.null())
ARCANE_FATAL("Null previous and next cell");
// AH: Désactivation de ce if : bloquant s'il n'y a qu'une seule couche de mailles.
// if (prev_cell.null() && next_cell.null())
// ARCANE_FATAL("Null previous and next cell");
DirCell dir_cell2(cdm2[icell]);
Cell prev_cell2 = dir_cell2.previous();
Cell next_cell2 = dir_cell2.next();
Expand Down Expand Up @@ -263,10 +264,11 @@ _testDirCellAccelerator()
DirCellLocalId dir_cell(cdm.dirCellId(icell));
CellLocalId prev_cell = dir_cell.previous();
CellLocalId next_cell = dir_cell.next();
if (prev_cell.isNull() && next_cell.isNull()) {
inout_dummy_var[icell] = -5;
return;
}
// AH: Désactivation de ce if : bloquant s'il n'y a qu'une seule couche de mailles.
// if (prev_cell.isNull() && next_cell.isNull()) {
// inout_dummy_var[icell] = -5;
// return;
// }

DirCellLocalId dir_cell2(cdm2.dirCellId(icell));
CellLocalId prev_cell2 = dir_cell2.previous();
Expand Down
5 changes: 5 additions & 0 deletions arcane/ceapart/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ ARCANE_ADD_TEST_PARALLEL(cartesian2D-1_repart testCartesianMesh2D-1.arc 4 "-m 20
if (Lima_FOUND)
ARCANE_ADD_TEST(cartesian2D-lima testCartesianMesh2D-2.arc "-m 20")
endif()

arcane_add_test_sequential(cartesian2D-3 testCartesianMesh2D-3.arc "-m 20")
arcane_add_test_parallel(cartesian2D-3 testCartesianMesh2D-3.arc 2 "-m 20")
arcane_add_accelerator_test_sequential(cartesian2D-3 testCartesianMesh2D-3.arc "-m 20")

arcane_add_test(cartesian2D_coarsen1 testCartesianMesh2D-coarsen-1.arc "-m 20" "-We,ARCANE_CARTESIANMESH_COARSENING_VERBOSITY_LEVEL,1")
arcane_add_test(cartesian2D_coarsen2 testCartesianMesh2D-coarsen-2.arc "-m 20" "-We,ARCANE_CARTESIANMESH_COARSENING_VERBOSITY_LEVEL,2")
arcane_add_test(cartesian3D_coarsen2 testCartesianMesh3D-coarsen-2.arc "-m 20" "-We,ARCANE_CARTESIANMESH_COARSENING_VERBOSITY_LEVEL,2")
Expand Down
37 changes: 37 additions & 0 deletions arcane/ceapart/tests/testCartesianMesh2D-3.arc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0"?>
<cas codename="ArcaneTest" xml:lang="fr" codeversion="1.0">
<arcane>
<titre>Test CartesianMesh</titre>
<description>Test des maillages cartesiens 2D avec une seule couche de maille en Y</description>

<boucle-en-temps>CartesianMeshTestLoop</boucle-en-temps>

<modules>
<module name="ArcanePostProcessing" active="true"/>
</modules>
</arcane>

<arcane-post-traitement>
<periode-sortie>1</periode-sortie>
<depouillement>
<variable>Density</variable>
<variable>NodeDensity</variable>
<groupe>AllCells</groupe>
<groupe>AllNodes</groupe>
<groupe>AllFacesDirection0</groupe>
<groupe>AllFacesDirection1</groupe>
</depouillement>
</arcane-post-traitement>

<maillage>
<meshgenerator>
<cartesian>
<nsd>2 1</nsd>
<origine>0.0 0.0</origine>
<lx nx='4' prx='1.0'>4.0</lx>
<ly ny='1' pry='1.0'>1.0</ly>
</cartesian>
</meshgenerator>
</maillage>

</cas>

0 comments on commit 792b37c

Please sign in to comment.