GEOS-DEV / GEOS-DEV/GEOS

Improve separation between business and geometry in mesh generators

Open
#2,209 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

EPIC - Mesh/PerfRobust type: cleanup / refactor
Dominant language
C++
Stars
287
Forks
109
Avg merge
4d 41m
Merged PRs (30d)
5

Description

Describe the issue

Currently, the mesh generation tools depend on business domain, for example by looping over the constitutive relations of the sub regions when importing the fields. Fixing the blurred lines will help future developments and validations.

Proposed cleanup

In MeshGeneratorBase (and especially in its implementations):

For a first PR (Done in https://github.com/GEOSX/GEOSX/pull/2212).

  • Split importFields into business and a geometry part.

As a second step, split generateMesh into business and geometry part (Done in https://github.com/GEOSX/GEOS/pull/2272).

  • Keeping the CellBlockManager* in the mesh/generator folder, and the DomainPartition, MeshBody in the business part. 

The refactoring for VTKMeshGenerator and InternalMeshGenerator looks quite identical and within close reach.


  • The work for InternalWellGenerator may be a tad more challenging because WellElementRegion are directly created in the Generator, without the help of any CellBlock or FaceBlock like we do for the other types of (sub) regions. To be studied with care.

As a last architecture potential refactoring.

  • Challenge the CellBlocABC::getExternalProperties feature. Is it relevant w.r.t. MeshGeneratorBase::importFields?

On a more C++ technical point of view for a last PR (and during the continuous refactoring process).

  • Be sure that all the remaining business includes (core + tests) are removed.
  • Split the generator folder into its own cmake target, with the appropriate dependencies.
    Can we only expose the *ABC classes and a few utility classes?
  • Remove the cmake dependencies (core + tests) .
  • See what we can do with the public/private/interface feature proposed by cmake.
  • Search for the Region word in the generators folder to check if its the appropriate wording.
  • Update the unit tests accordingly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review MeshGeneratorBase and its VTKMeshGenerator, InternalMeshGenerator, and InternalWellGenerator implementations, noting that earlier refactoring steps are marked done. Then examine CellBlocABC::getExternalProperties, remaining business includes, generator CMake dependencies, Region naming, and unit tests. Done means completing the agreed architecture cleanup and updating the affected tests and build targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
backend, build-system, testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.