SCOREC / fep

Finite Element Programming course materials
6 stars 4 forks source link

Refinement of Mesh in AD Problem #43

Closed stevespreiz closed 1 year ago

stevespreiz commented 1 year ago

Description

When I run the AD case on the order 1 finite elements the paraview output I get is for the 8x8 / 2x8 meshes as expected. However, when I run these with the order 2 finite elements the paraview output shows a mesh that has been refined by a factor of 8. Pictures of this for the 2x8 element mesh are attached.

mesh2 mesh2wrong

Open Questions

Is this possibly happening in the solver side or just on the exporting the solution file? (I don't get a great looking solution for the order 2 elements which could be a results of the $h$ being wrong in the solver if the solver is refining the mesh without me knowing)

cwsmith commented 1 year ago

@stevespreiz Good question. We are adding elements (subdivision) to help visualize the higher order field.

https://github.com/SCOREC/fep/blob/1d1487dc84d895cc1816f6a958da664bdc750983/a4/a4_advection_diffusion.cpp#L185-L188

Coloring by the 'element coloring' field should make things clearer:

elementColoring