Improve separation between business and geometry in mesh generators
Nobody has claimed this yet.
- 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
importFieldsinto 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 themesh/generator folder, and theDomainPartition,MeshBodyin the business part. The refactoring forVTKMeshGeneratorandInternalMeshGeneratorlooks quite identical and within close reach. - The work for
InternalWellGeneratormay be a tad more challenging becauseWellElementRegionare directly created in theGenerator, without the help of anyCellBlockorFaceBlocklike we do for the other types of (sub) regions. To be studied with care.
As a last architecture potential refactoring.
- Challenge the
CellBlocABC::getExternalPropertiesfeature. 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
generatorfolder into its owncmaketarget, with the appropriate dependencies.
Can we only expose the*ABCclasses and a few utility classes? - Remove the
cmakedependencies (core + tests) . - See what we can do with the
public/private/interfacefeature proposed by cmake. - Search for the
Regionword in thegeneratorsfolder to check if its the appropriate wording. - Update the unit tests accordingly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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