FaceDivFree interpolation for a staggered field #4075
-
Hi everyone! In our code, we have a staggered magnetic field (each component is face-centred in its respective direction), so each component has its own index type. Therefore, in the variableSetUp method of the class inheriting from the AmrLevel class, we need to add a separate element to desc_lst (correct?). However, to use the face_divfree_interp interpolator (of type FaceDivFree, to preserve the divergence of the magnetic field) we need to inform AMReX that the components provided in separate elements of desc_lst should participate in the interpolation. Unfortunately, I did not find any example of such interpolation in the tutorials, code examples, some other codes which use AMReX, or any explicit instruction about this subject in the AMReX documentation. I appreciated any hint about using the mentioned interpolation method. Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I assume you wanted to use the divergence free interpolater in FillPath. You should be able to call amrex/Src/AmrCore/AMReX_FillPatchUtil.H Line 277 in e792933 amrex/Src/AmrCore/AMReX_FillPatchUtil.H Line 685 in e792933 AmrLevel::FillPatch . For convenience, you might want to create a function say FillPatchBfield that does what AmrLevel::FillPatch does for other variables.
Aslo, |
Beta Was this translation helpful? Give feedback.
I assume you wanted to use the divergence free interpolater in FillPath. You should be able to call
amrex/Src/AmrCore/AMReX_FillPatchUtil.H
Line 277 in e792933
amrex/Src/AmrCore/AMReX_FillPatchUtil.H
Line 685 in e792933
AmrLevel::FillPatch
. For convenience, you might want to create a function sayFillPatchBfield
that does whatAmrLevel::FillPatch
does for other variables.Aslo,
AmrLevel
has two virtual functionsvirtual void init (AmrLevel &old)
…