High order `FEM` visualization
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 287
- Forks
- 109
- Avg merge
- 4d 41m
- Merged PRs (30d)
- 5
Description
Describe the bug
High order visualization seems to be incomplete / buggy (wrong number of local dofs).
Ideally, I would like to get the solution per element instead of per local dof, but AFAIK this seems un-implemented.
To Reproduce
Consider the mwe consisting of:
- a reduced
.xmlusing an acoustic solver on a bilayer mesh, usingQ2spectral elements (hence3points per hexahedron edge);
xml
<?xml version="1.0" ?>
<Problem>
<Solvers>
<AcousticSEM
name="acousticSolver"
discretization="FE1"
targetRegions="{ Fluid1, Fluid2 }"
sourceCoordinates="{ { 1500, 20, 2900 } }"
timeSourceFrequency="10"
receiverCoordinates="{ { 3752.29351, 20, 2933.3333 } }"/>
</Solvers>
<NumericalMethods>
<FiniteElements>
<FiniteElementSpace
name="FE1"
order="2"
formulation="SEM"/>
</FiniteElements>
</NumericalMethods>
<ElementRegions>
<CellElementRegion
name="Fluid1"
cellBlocks="{ 1_hexahedra }"
materialList="{ nullModel }"/>
<CellElementRegion
name="Fluid2"
cellBlocks="{ 2_hexahedra }"
materialList="{ nullModel }"/>
</ElementRegions>
<Mesh>
<VTKMesh
name="Bilayer"
fieldsToImport="{ mediumVelocity }"
fieldNamesInGEOSX="{ mediumVelocity }"
file="high_order_bug.vtu"
useGlobalIds="0"/>
</Mesh>
<Outputs>
<VTK
name="vtkOutput"
writeFEMFaces="1"/>
</Outputs>
<Events maxTime="1e-1">
<!-- control the timestepping here with forceDt -->
<PeriodicEvent
name="fluidSolverApplications"
forceDt="1e-2"
target="/Solvers/acousticSolver"/>
<!-- output -->
<PeriodicEvent
name="outputs"
timeFrequency="5e-2"
targetExactTimestep="0"
target="/Outputs/vtkOutput">
</PeriodicEvent>
</Events>
</Problem>
- a
.vtuinput mesh withnx=3, ny=1, nz=2elements.
Input the .xml to GEOS, and open the output .pvd file in paraview.
Expected behavior
I expect to see the correct number of points (px = 3 * 2 + 1) * (py = 1 * 2 + 1) * (pz = 2 * 2 + 1) = 105 points, and 6 * 8 = 48 subcells.
Also, the ordering seems wrong: applying a PointDatatoCellData filter renders incorrect results (likely a connectivity issue).
Screenshots
On this screenshot:
- the number of points in a
xyplane seems ok except for the lastzlayer. - the number of points in the
zdirection is incorrect (3instead of5).
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 by running the provided XML with high-order Q2 spectral elements and the linked high_order_bug.vtu mesh, then inspect the generated .pvd output in ParaView. Compare the output against the expected 105 points, 48 subcells, and correct connectivity when applying PointDataToCellData; done means the high-order visualization matches those expectations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100