ForestClaw / forestclaw

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

ForestClaw I/O: Reading and writing domain's parititon #322

Closed tim-griesbach closed 4 months ago

tim-griesbach commented 4 months ago

This PR adds to the set of functions implemented in the PR https://github.com/ForestClaw/forestclaw/pull/306 the functionality to read and write a domain partition. The new functionalities are again showcased in the same swirl example workflow as in the PR https://github.com/ForestClaw/forestclaw/pull/306, namely applications/clawpack/advection/2d/swirl/swirl.cpp and also there is still the macro FCLAW_SWIRL_IO_DEMO that must be set to 1 to activate the workflow example.

This PR completes a set of ForestClaw I/O functionalities that can be used to implement a restart for an application by plugging in the required data. This required data includes in particular data bytes from fclaw2d_global_t, the options and the patch data. See also the documentation in flcaw{2,3}d_file.h and the mentioned workflow example for more details on writing and reading global data blocks and parallel arrays.

scottaiton commented 4 months ago

I changed the target branch to develop-3d, which we are using until some downstream projects get updated. This is the branch with the dimension-independent interface. Looks like there's one minor merge conflux to resolve. In this branch, all the example use the dimension-independent interface and you have to access the underlying 2d domain through glob->domain->d2.

tim-griesbach commented 4 months ago

I changed the target branch to develop-3d, which we are using until some downstream projects get updated. This is the branch with the dimension-independent interface. Looks like there's one minor merge conflux to resolve. In this branch, all the example use the dimension-independent interface and you have to access the underlying 2d domain through glob->domain->d2.

Thanks! I resolved the merge conflict.