ForestClaw / forestclaw

Quadtree/octree adaptive PDE solver based based on p4est.
http://www.forestclaw.org
BSD 2-Clause "Simplified" License
58 stars 22 forks source link

Problem with normal_match in parallel #130

Open donnaaboise opened 6 years ago

donnaaboise commented 6 years ago

I have the parallel implementation working for the conservative fix, but am running into assertion errors in the normal_match routine. If I don't call this routine, the code runs on multiple processors, and maintains conservation. But including the normal_match call causes an assertion failure at this line:

FCLAW_ASSERT (0 <= patchno && patchno < block->num_patches);
donnaaboise commented 6 years ago

Problem is in my code that is calling this routine - See #129.

cburstedde commented 6 years ago

Some routines in forestclaw2d.h are legal to allow from ghost cells, others are not. I need to improve documentation and put in more assertions.

cburstedde commented 6 years ago

The convention is that routines in forestclaw2d.h taking blockno, patchno are legal for local patches only. Whenever fclaw2d_patch_t * is passed (i.e., to the transforms), ghosts are fine, too. The iterator callbacks are called for local patches by construction.