GEOS icon indicating copy to clipboard operation
GEOS copied to clipboard

Simplification & consolidation of CellElementRegion definition

Open MelReyCG opened this issue 2 years ago • 11 comments

In order to simplify the cellBlocks referencing and thus simplify user workflows, this PR propose the following functionalities:


  1. Possibility to reference all cellBlock from a regionAttribute at once, without listing all primitives:
    <CellElementRegion
      name="burdens"
      cellBlockAttributeValues="{ 1, 4, 5 }"
      materialList="{}" />

instead of:

    <CellElementRegion
      name="burdens"
      cellBlocks="{ 1_tetrahedra, 1_pyramids, 1_hexahedra, ...
                    4_tetrahedra, 4_pyramids, 4_hexahedra, ...
                    5_tetrahedra, 5_pyramids, 5_hexahedra, ... }"
      materialList="{}" />

  1. Possibility to reference all cellBlocks with fnmatch patterns:
    <CellElementRegion
      name="reservoir"
      cellBlocksMatch="{ * }"
      materialList="{}" />
    <CellElementRegion
      name="reservoir"
      cellBlocksMatch="{ [1-4]_* }"
      materialList="{}" />

  1. This PR also improved the cellBlock errors:
  • Improved the error when a cellBlock is referenced twice
  • Added an error when the cellBlockAttributeValues, cellBlocks, cellBlocksMatch attributes are mixed (allowing only one way to select cellblocks).
  • Improved the error when a referenced cellBlock is missing,
  • Improved the error when failing to select cellBlocks. See the form and more details here: new cellBlocks errors.pdf (not up to date).

This PR also:

  • Updates the Sphinx documentation page as it was incomplete, by providing the whole necessary python package list and a part to describe how to generate the .rst class tables.
  • Adds some .rst tables that were not previously pushed (forgotten?).

MelReyCG avatar Dec 08 '23 15:12 MelReyCG

Codecov Report

Attention: Patch coverage is 85.80645% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 53.51%. Comparing base (8ec9d99) to head (1b63330). Report is 1 commits behind head on develop.

:exclamation: Current head 1b63330 differs from pull request most recent head 4a50918. Consider uploading reports for the commit 4a50918 to get more accurate results

Files Patch % Lines
src/coreComponents/mesh/CellElementRegion.cpp 82.60% 12 Missing :warning:
...ponents/unitTests/meshTests/testElementRegions.cpp 78.78% 7 Missing :warning:
src/coreComponents/mesh/ElementType.hpp 82.35% 3 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2878      +/-   ##
===========================================
+ Coverage    53.26%   53.51%   +0.24%     
===========================================
  Files          989      990       +1     
  Lines        83524    83652     +128     
===========================================
+ Hits         44492    44769     +277     
+ Misses       39032    38883     -149     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 08 '24 15:03 codecov[bot]