GEOS-DEV / GEOS-DEV/GEOS

Refactor code branches based on meshBody.hasParticles()

Open
#2,475 0 comments 0 reactions 3 assignees View on GitHub

@CusiniM is already working on this.

Since May 23, 2023.

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

Description

After the merging of PR https://github.com/GEOS-DEV/GEOS/pull/1756/, there will be a few locations in the code where we will have unsightly logical branches depending on whether a meshBody is discretized with particles or not. These should be streamlined by or immediately after the meshLevel->meshDiscretization PR.

These are the specific functions as flagged by the comments below. They can also be easily found by searching for hasParticles().

  1. ProblemManager::generateMesh: "mesh bodies with particles load their data into particle blocks, not cell blocks"
  2. ProblemManager::generateMesh: "particle mesh bodies don't have a finite element discretization"
  3. ProblemManager::setRegionQuadrature: "branch due to difference in particle vs cell regions"
  4. DomainPartition::setupCommunications: "Currently, particle-based mesh bodies do not construct their own domain decomposition"
  5. MeshManager::importFields: "field import is not currently compatible with particle mesh bodies"

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.