1 #include "preprocessor_defines.dat"
2 #include "Class_Global.hpp"
3 #include "Class_Para_Tree.hpp"
4 #include "User_Data_Comm.hpp"
5 #include "User_Data_LB.hpp"
11 int main(
int argc,
char *argv[]) {
14 MPI::Init(argc, argv);
28 for (iter=1; iter<6; iter++){
42 double omega = 2.0*3.14/0.001;
45 xc = 0.25*cos(omega* Dt) + 0.5 ;
46 yc = 0.25*sin(omega* Dt) + 0.5;
51 vector<double> oct_data(nocts, 0.0);
57 for (iter=itstart; iter<itend; iter++){
60 xc = 0.25*cos(omega* Dt* (
double) iter) + 0.5 ;
61 yc = 0.25*sin(omega* Dt* (
double) iter) + 0.5;
64 for (
int i=0; i<nocts; i++){
67 vector<vector<double> > nodes = pablo120.
getNodes(i);
69 vector<double> center = pablo120.
getCenter(i);
70 oct_data[i] = sqrt((pow((center[0]-xc),2.0)+pow((center[1]-yc),2.0)+pow((center[2]-zc),2.0)));
71 for (
int j=0; j<global3D.
nnodes; j++){
72 double x = nodes[j][0];
73 double y = nodes[j][1];
74 double z = nodes[j][2];
75 if (pow((x-xc),2.0)+pow((y-yc),2.0)+pow((z-zc),2.0) <= pow(radius,2.0)){
86 if (pablo120.
getLevel(i) > 5 && !inside){
93 bool adapt = pablo120.
adapt();
102 vector<double> oct_data_new(nocts, 0.0);
103 for (
int i=0; i<nocts; i++){
104 vector<double> center = pablo120.
getCenter(i);
105 oct_data_new[i] = sqrt((pow((center[0]-xc),2.0)+pow((center[1]-yc),2.0)+pow((center[2]-zc),2.0)));
108 oct_data.resize(nocts);
109 oct_data = oct_data_new;
110 oct_data_new.clear();
114 pablo120.
writeTest(
"Pablo120_iter"+to_string(static_cast<unsigned long long>(iter)), oct_data);
Parallel Octree Manager Class - 3D specialization.
uint8_t getLevel(Class_Octant< 3 > *oct)
void getCenter(Class_Octant< 3 > *oct, dvector ¢er)
void getNodes(Class_Octant< 3 > *oct, dvector2D &nodes)
uint32_t getNumOctants() const
void setMarker(Class_Octant< 3 > *oct, int8_t marker)
void writeTest(string filename, vector< double > data)
void updateConnectivity()
void setBalance(Class_Octant< 3 > *oct, bool balance)