![]() |
AMR-Solver
1.0
Block-based Octree AMR grid flow solver
|
AMR grid stuff. More...
Classes | |
class | Block |
This class is a generic data block of a octree node in the block-based AMR mesh. More... | |
class | Field |
Template class for any scalar field variable in the domain. More... | |
class | Octree |
Class to store octree datastructure as nodes of the tree. More... | |
class | VecField |
Template class for any vector field variable in the domain. More... | |
Typedefs | |
typedef node_boundary_flags | NodeBc |
typedef field_boundary_flags | FieldBc |
typedef direction | Dir |
typedef position | Pos |
Enumerations | |
enum | node_boundary_flags { NONE, BOUNDARY, MPI_BOUNDARY } |
enum | field_boundary_flags { none, dirichlet, neumann, mpi_boundary } |
enum | direction { XDIR, YDIR, ZDIR } |
enum | position { RIGHT, LEFT } |
Functions | |
void | refine_nodes () |
void | coarsen_nodes () |
void | reset_refine_flags () |
void | reset_coarsen_flags () |
void | set_refine_flag_based_on_gradient () |
void | set_coarsen_flag_based_on_gradient () |
void | recheck_siblings_coarsen_flags () |
void | set_FieldBc_FieldBcVal (int number, std::string name, FieldBc **bc, double **bcval) |
void | set_VecFieldBc_VecFieldBcVal (int number, std::string name, FieldBc **xbc, FieldBc **ybc, FieldBc **zbc, double **xbcval, double **ybcval, double **zbcval) |
void | exchange_ghost_val (int level, std::string name) |
void | create_list_of_leaf_nodes () |
void | create_list_of_root_nodes () |
void | create_lists_of_level_nodes () |
void | create_node (int blocknumber, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, int level, NodeBc **bc) |
void | reassign_neighbours () |
void | set_root_neighbours () |
void | print_neighbour_information (std::list< Octree * > &nodes) |
void | exchange_ghost_values_of_level (int level) |
void | OctreeGrid () |
long int | get_point (int i, int j, int k, int Npx, int Npy) |
void | write_vtk (std::list< Octree * > &nodes) |
Variables | |
int | max_level |
int | pad = 2 |
std::vector< std::string > | scalar_fields |
std::vector< std::string > | vector_fields |
int | nx_block = 20 |
int | ny_block = 20 |
int | nz_block = 10 |
std::list< Octree * > | nodes |
std::list< Octree * > | leaf_nodes |
std::list< Octree * > | root_nodes |
std::list< Octree * > | level_nodes [20] |
AMR grid stuff.
Namespace containing things related to grid
typedef direction myOctree::Dir |
Definition at line 13 of file direction.h.
Definition at line 25 of file boundary.h.
typedef node_boundary_flags myOctree::NodeBc |
Definition at line 14 of file boundary.h.
typedef position myOctree::Pos |
Definition at line 21 of file direction.h.
enum myOctree::direction |
Enumerator | |
---|---|
XDIR | |
YDIR | |
ZDIR |
Definition at line 5 of file direction.h.
Enumerator | |
---|---|
none | |
dirichlet | |
neumann | |
mpi_boundary |
Definition at line 16 of file boundary.h.
Enumerator | |
---|---|
NONE | |
BOUNDARY | |
MPI_BOUNDARY |
Definition at line 7 of file boundary.h.
enum myOctree::position |
Enumerator | |
---|---|
RIGHT | |
LEFT |
Definition at line 15 of file direction.h.
void myOctree::coarsen_nodes | ( | ) |
void myOctree::create_list_of_leaf_nodes | ( | ) |
Creates a list of leaf nodes. Clears the old list before creating the new one.
Definition at line 21 of file octreegrid.cpp.
void myOctree::create_list_of_root_nodes | ( | ) |
Creates a new list of root nodes. Clears the old list before creating the new one.
Definition at line 32 of file octreegrid.cpp.
void myOctree::create_lists_of_level_nodes | ( | ) |
Creates a vector of lists of nodes on each level. Clears the old lists before creating the new one.
Definition at line 43 of file octreegrid.cpp.
void myOctree::create_node | ( | int | blocknumber, |
double | xmin, | ||
double | xmax, | ||
double | ymin, | ||
double | ymax, | ||
double | zmin, | ||
double | zmax, | ||
int | level, | ||
NodeBc ** | bc | ||
) |
Creates an octree node
Definition at line 60 of file octreegrid.cpp.
void myOctree::exchange_ghost_val | ( | int | level, |
std::string | name | ||
) |
void myOctree::exchange_ghost_values_of_level | ( | int | level | ) |
Exchanges ghost values of all the user defined Scalar and Vector fields at the given level
Definition at line 238 of file octreegrid.cpp.
long int myOctree::get_point | ( | int | i, |
int | j, | ||
int | k, | ||
int | Npx, | ||
int | Npy | ||
) |
void myOctree::OctreeGrid | ( | ) |
Sets up octree AMR grid
Definition at line 251 of file octreegrid.cpp.
void myOctree::print_neighbour_information | ( | std::list< Octree * > & | nodes | ) |
Prints the centre coordinates of the neighbours of the given list of nodes.
This can be used to test correctness in the assignment of neighbours.
Definition at line 215 of file octreegrid.cpp.
void myOctree::reassign_neighbours | ( | ) |
Reassigns neighbours after coarsening or refining the grid and after creating lists of level_nodes.
Neighbours are assigned during refinement but since coarsening and refinement is a sequential process, neighbours might not have been created and a NULL would have been assigned.
So this function is to be called after all refinement or coarsening is complete in every time step to ensure correct assignment of neighbours.
Definition at line 90 of file octreegrid.cpp.
void myOctree::recheck_siblings_coarsen_flags | ( | ) |
void myOctree::refine_nodes | ( | ) |
void myOctree::reset_coarsen_flags | ( | ) |
void myOctree::reset_refine_flags | ( | ) |
void myOctree::set_coarsen_flag_based_on_gradient | ( | ) |
void myOctree::set_FieldBc_FieldBcVal | ( | int | number, |
std::string | name, | ||
FieldBc ** | bc, | ||
double ** | bcval | ||
) |
Sets boundary conditions to blocks and boundary condition values to ghost cells in the blocks of the given scalar field.
Definition at line 9 of file boundary.cpp.
void myOctree::set_refine_flag_based_on_gradient | ( | ) |
void myOctree::set_root_neighbours | ( | ) |
Assigns neighours to root nodes
Definition at line 149 of file octreegrid.cpp.
void myOctree::set_VecFieldBc_VecFieldBcVal | ( | int | number, |
std::string | name, | ||
FieldBc ** | xbc, | ||
FieldBc ** | ybc, | ||
FieldBc ** | zbc, | ||
double ** | xbcval, | ||
double ** | ybcval, | ||
double ** | zbcval | ||
) |
Sets boundary conditions to blocks and boundary condition values to ghost cells in the blocks of the given vector field.
Definition at line 57 of file boundary.cpp.
void myOctree::write_vtk | ( | std::list< Octree * > & | nodes | ) |
std::list< Octree * > myOctree::leaf_nodes |
Definition at line 15 of file octreegrid.cpp.
std::list< Octree * > myOctree::level_nodes |
Definition at line 17 of file octreegrid.cpp.
std::list< Octree * > myOctree::nodes |
Definition at line 14 of file octreegrid.cpp.
std::list< Octree * > myOctree::root_nodes |
Definition at line 16 of file octreegrid.cpp.