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


Public Types | |
| using | BlockMapFunc = std::function< void(int block_no, double unit_x, double unit_y, double unit_z, double &x, double &y, double &z)> |
| Maps coordinate in a block to a coordinate in the domain. More... | |
Public Member Functions | |
| P8estDomainGenerator (p8est_t *p8est, const std::array< int, 3 > &ns, int num_ghost_cells, const BlockMapFunc &bmf) | |
| Construct a new P8estDomainGenerator object. More... | |
| P8estDomainGenerator (P8estDomainGenerator &) | |
| P8estDomainGenerator (P8estDomainGenerator &&)=default | |
| P8estDomainGenerator & | operator= (const P8estDomainGenerator &) |
| P8estDomainGenerator & | operator= (P8estDomainGenerator &&)=default |
| Domain< 3 > | getFinestDomain () |
| Return the finest domain. | |
| bool | hasCoarserDomain () |
| return true if there is a coarser domain to be generated. | |
| Domain< 3 > | getCoarserDomain () |
| Return a new coarser domain. | |
Public Member Functions inherited from ThunderEgg::DomainGenerator< 3 > | |
| virtual | ~DomainGenerator () |
| Destroy the DomainGenerator object. | |
Generates Domain objects form a given p4est object.
| using ThunderEgg::P8estDomainGenerator::BlockMapFunc = std::function<void(int block_no, double unit_x, double unit_y, double unit_z, double& x, double& y, double& z)> |
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 |
| unit_z | the z coordinate in the block |
| x | the resulting x coordinate of the mapping function |
| y | the resulting y coordinate of the mapping function |
| z | the resulting z coordinate of the mapping function |
| ThunderEgg::P8estDomainGenerator::P8estDomainGenerator | ( | p8est_t * | p8est, |
| const std::array< int, 3 > & | ns, | ||
| int | num_ghost_cells, | ||
| const BlockMapFunc & | bmf | ||
| ) |
Construct a new P8estDomainGenerator object.
| p8est | the p8est 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 |