Open tim-griesbach opened 1 year ago
I edited the issue to elaborate more on the role of 3dx in this issue.
I edited the issue again and now it only focusses on the 3D translation issue in fclaw3d_map.c
that is related to differentiating between the three cases 2d, 3dx and 3d. The 3D translation issue related to fclaw3d_exchange
is now fixed in the PR https://github.com/ForestClaw/forestclaw/pull/270.
If I include
fclaw2d_convenience.h
infclaw2d_global.h
this results in errors of the formbecause
fclaw2d_convenience.h
includes p4est headers and these check if a p4est 2D header andp4est_to_p8est.h
are both included and throw an error if this is the case.Up to my understanding, we encounter the error described above because the 3D code in
fclaw3d_map.c
is generated from the 2D code infclaw2d_map.c
by including it. However,fclaw2d_map.c
differentiates including dimension-dependent headers only based onPATCH_DIM
andREFINE_DIM
, which are not necessarily defined. Therefore, 2D headers are included in the 3D code.In
fclaw2d_map.c
we must consider three cases (2d, 3d, 3dx). Because of the possible 3dx case the macrosREFINE_DIM
andPATCH_DIM
are used but these macros are only defined in Clawpatch. Since infclaw2d_map.c
PATCH_DIM
is also used to detect the 2d case, an undefinedPATCH_DIM
leads to always entering the 2d case. This is the case because infclaw2d_map.c
PATCH_DIM
(and alsoREFINE_DIM
) is set to 2 if it is undefined.