|
ThunderEgg
1.0.0
|
Generates Domain objects form a given p4est object. More...
#include <P4estDomainGenerator.h>


Public Types | |
| using | BlockMapFunc = std::function< void(int block_no, double unit_x, double unit_y, double &x, double &y)> |
| Maps coordinate in a block to a coordinate in the domain. More... | |
Public Member Functions | |
| P4estDomainGenerator (p4est_t *p4est, const std::array< int, 2 > &ns, int num_ghost_cells, const BlockMapFunc &bmf) | |
| Construct a new P4estDomainGenerator object. More... | |
| P4estDomainGenerator (const P4estDomainGenerator &) | |
| P4estDomainGenerator (P4estDomainGenerator &&)=default | |
| P4estDomainGenerator & | operator= (const P4estDomainGenerator &) |
| P4estDomainGenerator & | operator= (P4estDomainGenerator &&)=default |
| Domain< 2 > | getFinestDomain () |
| Return the finest domain. | |
| bool | hasCoarserDomain () |
| return true if there is a coarser domain to be generated. | |
| Domain< 2 > | getCoarserDomain () |
| Return a new coarser domain. | |
Public Member Functions inherited from ThunderEgg::DomainGenerator< 2 > | |
| virtual | ~DomainGenerator () |
| Destroy the DomainGenerator object. | |
Generates Domain objects form a given p4est object.
| using ThunderEgg::P4estDomainGenerator::BlockMapFunc = std::function<void(int block_no, double unit_x, double unit_y, double& x, double& y)> |
Maps coordinate in a block to a coordinate in the domain.
Each block is treated as a unit square. The input wil be the block number and a coordinate withing that unit square.
| block_no | the block number |
| unit_x | the x coordinate in the block |
| unit_y | the y coordinate in the block |
| x | the resulting x coordinate of the mapping function |
| y | the resulting y coordinate of the mapping function |
| ThunderEgg::P4estDomainGenerator::P4estDomainGenerator | ( | p4est_t * | p4est, |
| const std::array< int, 2 > & | ns, | ||
| int | num_ghost_cells, | ||
| const BlockMapFunc & | bmf | ||
| ) |
Construct a new P4estDomainGenerator object.
| p4est | the p4est object |
| ns | the number of cells in each direction |
| num_ghost_cells | the number of ghost cells on each side of the patch |
| bmf | the function used to map the blocks to the domain |