GEOS-DEV / GEOS-DEV/GEOS

Using relatives or absolute paths to objects in FieldSpecifications

Open
#2,390 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hey all,

I have been working with multiple meshBodies in GEOS and I realized that boundary conditions seem to work only when I prescribe the relative path to the objects, for example,

<FieldSpecification
  name="fixedPressure"
  initialCondition="0"
  setNames="{ all }"
  objectPath="ElementRegions/Domain/cb1"
  fieldName="pressure"
  scale="0.0"/>

seems to work fine, whereas

<FieldSpecification
  name="fixedPressure"
  initialCondition="0"
  setNames="{ all }"
  objectPath="mesh1/Level0/ElementRegions/Domain/cb1"
  fieldName="pressure"
  scale="0.0"/>

does not do anything (not even throws an error). Here, mesh1 is the MeshBody name and Level0 the MeshLevel name.

Interestingly, if the fieldSpec is a initial condition, both options seem to work fine.

Is this a bug? Or is there a reason for it to behave this way? When dealing with multiple MeshBodies this is a bit of an issue because sometimes the code won't run when you just prescribe the relative path and that object doesn't exist in all bodies.

Here are two input files to replicate the behavior. (Converted to .txt as github apparently doesn't like .xml)

But you can just try to use whatever input file you are working with and try to replace the relative paths by absolute ones and see if the results change.

test_fullPath.txt
test_relativePath.txt

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

Start with the attached test_fullPath.txt and test_relativePath.txt files and compare how the FieldSpecification objectPath values are resolved for boundary conditions versus initial conditions. Trace the FieldSpecification path handling and reproduce the differing results; done means the absolute and relative path behavior is explained or corrected for multiple MeshBodies.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
hpc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.