Open tomidakn opened 2 days ago
failure from the pgen_compile
test:
src/mesh/amr_loadbalance.cpp:1223:47: error: implicit conversion loses integer precision: 'std::vector::size_type' (aka 'unsigned long') to 'const int' [-Werror,-Wshorten-64-to-32]
const int nf = my_blocks(0)->pmr->pvars_fc_.size();
~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
1 error generated.
This is to fix the divergence error with AMR reported in #617.
When a MeshBlock contacting a finer MeshBlock is refined, the original code refined normal B-fields on the shared face by interpolating the coarser fields, but they do not exactly match the existing finer fields on the already refined neighbor MeshBlock. With this commit, the shared face fields are copied from the finer MeshBlock, hence enforcing the divergence B constraint.
Prerequisite checklist