24 Field* field = (*i)->get_block_data()->field;
25 VecField* location = (*i)->get_block_data()->mesh;
27 for(
int i=0;i<field->
Nx;i++) {
28 for(
int j=0;j<field->
Ny;j++) {
29 for(
int k=0;k<field->
Nz;k++) {
31 double x = location->
x[i][j][k];
32 double y = location->
y[i][j][k];
33 double z = location->
z[i][j][k];
35 ((x-1.0)*(x-1.0) + (y-1.0)*(y-1.0) >= 0.5625)?(field->
val[i][j][k] = 1.0):(field->
val[i][j][k] = 100.0);
40 if(x*x + y*y <= 1.0) {field->
val[i][j][k] = 0.1; }
41 if(x*x + y*y >= 3.0) {field->
val[i][j][k] = 100.0; }
54 Field* field = (*i)->get_block_data()->scalarfields[0];
55 VecField* location = (*i)->get_block_data()->mesh;
57 for(
int i=0;i<field->
Nx;i++) {
58 for(
int j=0;j<field->
Ny;j++) {
59 for(
int k=0;k<field->
Nz;k++) {
61 double x = location->
x[i][j][k];
62 double y = location->
y[i][j][k];
63 double z = location->
z[i][j][k];
65 ((x-1.0)*(x-1.0) + (y-1.0)*(y-1.0) >= 0.5625)?(field->
val[i][j][k] = 1.0):(field->
val[i][j][k] = 100.0);
123 int main(
int argc,
char **argv) {
147 cerr <<
"\n" <<
"Finishing" << endl;
void gauss_seidel(int level, std::string name)
void reset_refine_flags()
std::list< Octree * > leaf_nodes
void reset_coarsen_flags()
void recheck_siblings_coarsen_flags()
Standard input output stuff.
void set_refine_flag_based_on_gradient()
Template class for any vector field variable in the domain.
void set_coarsen_flag_based_on_gradient()
Template class for any scalar field variable in the domain.
void reassign_neighbours()
void create_list_of_leaf_nodes()
Class to store octree datastructure as nodes of the tree.
void create_lists_of_level_nodes()
int main(int argc, char **argv)
void write_vtk(std::list< Octree * > &nodes)