Remhos icon indicating copy to clipboard operation
Remhos copied to clipboard

Uncorrected mapping with NCmesh

Open sungho91 opened this issue 1 year ago • 4 comments

Hi all,

I'm incorporating Remhos into my code to remap the L2 fields after remeshing. I believe the remapping is functioning correctly with the conforming mesh, but I'm encountering some issues with a non-conforming mesh.

In the case of a conforming mesh, the mesh simply moves, and the field does not move because they are advected together. However, with a non-conforming mesh, the shape of the field is altered, leading to incorrect mapping (see attached image).

text2-1

This is obvious when I use the example of Remhos. I typed mpirun -np 8 remhos -m ./data/cube01_hex.mesh -p 10 -rs 1 -o 2 -dt 0.02 -tf 0.8 -ho 1 -lo 4 -fct 2 but I modified element attributes of 1st and 2nd element to two and Remhos like this way. You can see non-conforming mesh and final remapped field is highly distorted. I think advection is prohibited between coarse- and fine-mesh regions.

mesh->EnsureNCMesh(true);
Array<int> refs;

for (int i = 0; i < mesh->GetNE(); i++)
{
if(mesh->GetAttribute(i) >= 2)
{
refs.Append(i);
}
}

mesh->GeneralRefinement(refs, 1);
refs.DeleteAll();
mesh->Finalize(true);

image1-1

Any comments would be greatly appreciated.

Sungho

sungho91 avatar Oct 05 '23 14:10 sungho91

Hi @sungho91 the methods -lo 3 and -lo 4 are not implemented for NC meshes and won't work.

We haven't tested Remhos with NC meshes, but I expect some combinations to work. I'll try and let you know soon.

You can also try by simplifying the setup (disable the monotonicity), and then go back incrementally. For example -ho 3 -lo 0 -fct 0 and if that works, try enabling some -lo option, and then finally try enabling the -fct option.

vladotomov avatar Oct 05 '23 18:10 vladotomov

@vladotomov

According to my quick couple of tests, introducing a low-order solver prohibits advection between coarse- and fine-mesh regions. -ho 2 or -ho 3 without -lo and -fct works but the solution from them seems to need improvement.

sungho91 avatar Oct 06 '23 01:10 sungho91

I'm on travel this week, but I'll take a look when I come back.

vladotomov avatar Oct 10 '23 13:10 vladotomov

@sungho91 seems that the -ho 3 and -lo 5 (simplest LO solver) work with the code in master, I tried these: mpirun -np 4 remhos -m ./data/amr-quad.mesh -p 14 -rs 2 -dt 0.001 -tf 0.4 -ho 3 -lo 5 -fct 2 mpirun -np 4 remhos -m ./data/amr-quad.mesh -p 14 -rs 2 -dt 0.001 -tf 0.4 -ho 3 -lo 5 -fct 4

Screen Shot 2023-10-18 at 11 07 09 AM

vladotomov avatar Oct 18 '23 18:10 vladotomov