Using relatives or absolute paths to objects in FieldSpecifications
Nobody has claimed this yet.
- 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.
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
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