1 #include "preprocessor_defines.dat"
2 #include "Class_Global.hpp"
3 #include "Class_Para_Tree.hpp"
9 int main(
int argc,
char *argv[]) {
12 MPI::Init(argc, argv);
21 for (iter=1; iter<5; iter++){
32 vector<double> oct_data(nocts, 0.0);
35 for (
int i=0; i<nocts; i++){
37 vector<vector<double> > nodes = pablo4.
getNodes(i);
38 for (
int j=0; j<global2D.
nnodes; j++){
39 double x = nodes[j][0];
40 double y = nodes[j][1];
41 if ((pow((x-xc),2.0)+pow((y-yc),2.0) <= pow(radius,2.0))){
50 pablo4.
writeTest(
"Pablo4_iter"+to_string(static_cast<unsigned long long>(iter)), oct_data);
54 for (iter=start; iter<start+25; iter++){
55 vector<double> oct_data_smooth(nocts, 0.0);
56 vector<uint32_t> neigh, neigh_t;
57 vector<bool> isghost, isghost_t;
58 uint8_t iface, nfaces;
60 for (
int i=0; i<nocts; i++){
65 for (codim=1; codim<3; codim++){
72 for (iface=0; iface<nfaces; iface++){
74 neigh.insert(neigh.end(), neigh_t.begin(), neigh_t.end());
75 isghost.insert(isghost.end(), isghost_t.begin(), isghost_t.end());
80 oct_data_smooth[i] = oct_data[i]/(neigh.size()+1);
81 for (
int j=0; j<neigh.size(); j++){
86 oct_data_smooth[i] += oct_data[neigh[j]]/(neigh.size()+1);
93 pablo4.
writeTest(
"Pablo4_iter"+to_string(static_cast<unsigned long long>(iter)), oct_data_smooth);
95 oct_data = oct_data_smooth;
void writeTest(string filename, vector< double > data)
Parallel Octree Manager Class - 2D specialization.
void findNeighbours(uint32_t idx, uint8_t iface, uint8_t codim, u32vector &neighbours, vector< bool > &isghost)
void getNodes(Class_Octant< 2 > *oct, dvector2D &nodes)
uint32_t getNumOctants() const
void updateConnectivity()