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);
23 for (iter=1; iter<4; iter++){
34 vector<double> oct_data(nocts, 0.0);
37 for (
int i=0; i<nocts; i++){
39 vector<vector<double> > nodes = pablo104.
getNodes(i);
40 for (
int j=0; j<global3D.
nnodes; j++){
41 double x = nodes[j][0];
42 double y = nodes[j][1];
43 if ((pow((x-xc),2.0)+pow((y-yc),2.0) <= pow(radius,2.0))){
52 pablo104.
writeTest(
"Pablo104_iter"+to_string(static_cast<unsigned long long>(iter)), oct_data);
56 for (iter=start; iter<start+25; iter++){
57 vector<double> oct_data_smooth(nocts, 0.0);
58 vector<uint32_t> neigh, neigh_t;
59 vector<bool> isghost, isghost_t;
60 uint8_t iface, codim, nfaces;
61 for (
int i=0; i<nocts; i++){
65 for (codim=1; codim<dim+1; codim++){
75 for (iface=0; iface<nfaces; iface++){
77 neigh.insert(neigh.end(), neigh_t.begin(), neigh_t.end());
78 isghost.insert(isghost.end(), isghost_t.begin(), isghost_t.end());
83 oct_data_smooth[i] = oct_data[i]/(neigh.size()+1);
84 for (
int j=0; j<neigh.size(); j++){
89 oct_data_smooth[i] += oct_data[neigh[j]]/(neigh.size()+1);
96 pablo104.
writeTest(
"Pablo104_iter"+to_string(static_cast<unsigned long long>(iter)), oct_data_smooth);
98 oct_data = oct_data_smooth;
void findNeighbours(uint32_t idx, uint8_t iface, uint8_t codim, u32vector &neighbours, vector< bool > &isghost)
Parallel Octree Manager Class - 3D specialization.
void getNodes(Class_Octant< 3 > *oct, dvector2D &nodes)
uint32_t getNumOctants() const
void writeTest(string filename, vector< double > data)
void updateConnectivity()