28 return x<=x_max && x>=
x_min && y<=y_max && y>=
y_min && z<=z_max && z>=
z_min;
113 for(
int m=0;m<3;m++) {
114 for(
int n=0;n<2;n++) {
162 for(
int m=0;m<3;m++) {
163 for(
int n=0;n<2;n++) {
185 double xmin, xmax, ymin, ymax, zmin, zmax;
186 double lev = this->
level + 1;
222 Octree child(xmin, xmax, ymin, ymax, zmin, zmax, lev);
359 for (
int m=0; m<3; m++) {
360 for (
int n=0; n<2; n++) {
364 this->get_block_data()->scalarfields[l]->bc[m][n];
379 for (
int m=0; m<3; m++) {
380 for (
int n=0; n<2; n++) {
384 this->get_block_data()->vectorfields[l]->xbc[m][n];
386 this->get_block_data()->vectorfields[l]->ybc[m][n];
388 this->get_block_data()->vectorfields[l]->zbc[m][n];
433 for(
int i=0; i<2; i++) {
434 for(
int j=0; j<2; j++) {
435 for(
int k=0; k<2; k++)
455 for(
int m=0;m<3;m++) {
456 for(
int n=0;n<2;n++) {
469 for(
int m=0;m<3;m++) {
470 for(
int n=0;n<2;n++) {
471 bc[m][n] = obj.
bc[m][n];
476 nodes.push_back(
this);
480 Octree::Octree(
double x1,
double x2,
double y1,
double y2,
double z1,
double z2,
int l ) : x_min(x1), x_max(x2), y_min(y1), y_max(y2), z_min(z1), z_max(z2), level(l) {
483 for(
int i=0; i<2; i++) {
484 for(
int j=0; j<2; j++) {
485 for(
int k=0; k<2; k++)
502 for(
int m=0;m<3;m++) {
503 for(
int n=0;n<2;n++) {
516 for(
int m=0;m<3;m++) {
517 for(
int n=0;n<2;n++) {
533 nodes.push_back(
this);
540 for(
int i=0; i<2; i++) {
541 for(
int j=0; j<2; j++) {
542 for(
int k=0; k<2; k++)
559 for(
int m=0;m<3;m++) {
560 for(
int n=0;n<2;n++) {
586 for(
int m=0;m<3;m++) {
587 for(
int n=0;n<2;n++) {
598 nodes.push_back(
this);
This class is a generic data block of a octree node in the block-based AMR mesh.
std::vector< std::string > scalar_fields
void set_child_null_at(int, int, int)
Octree * children[2][2][2]
bool contains(double x, double y, double z)
Octree * get_child_at(int, int, int)
void set_to_coarsen_with_nesting()
void set_to_refine_with_nesting()
std::vector< std::string > vector_fields
Class to store octree datastructure as nodes of the tree.
std::list< Octree * > nodes