25#if BITPIT_ENABLE_MPI==1
29#include "bitpit_PABLO.hpp"
32using namespace bitpit;
73 pablo5.setBalance(idx,
false);
76 pablo5.computeConnectivity();
77 pablo5.write(
"pablo00005_iter"+to_string(
static_cast<unsigned long long>(iter)));
80 for (iter=1; iter<3; iter++){
81 pablo5.adaptGlobalRefine();
82 pablo5.updateConnectivity();
83 pablo5.write(
"pablo00005_iter"+to_string(
static_cast<unsigned long long>(iter)));
86#if BITPIT_ENABLE_MPI==1
97 for (iter=3; iter<9; iter++){
98 uint32_t nocts = pablo5.getNumOctants();
99 for (
unsigned int i=0; i<nocts; i++){
101 vector<array<double,3> > nodes = pablo5.getNodes(i);
102 for (
int j=0; j<4; j++){
103 double x = nodes[j][0];
104 double y = nodes[j][1];
105 if ((
pow((x-xc),2.0)+
pow((y-yc),2.0) <=
pow(radius,2.0))){
106 pablo5.setMarker(i, 1);
114#if BITPIT_ENABLE_MPI==1
116 pablo5.loadBalance();
120 pablo5.updateConnectivity();
121 pablo5.write(
"pablo00005_iter"+to_string(
static_cast<unsigned long long>(iter)));
125 pablo5.adaptGlobalCoarse();
126 pablo5.updateConnectivity();
127 pablo5.write(
"pablo00005_iter"+to_string(
static_cast<unsigned long long>(iter)));
135 for (iter=10; iter<15; iter++){
136 uint32_t nocts = pablo5.getNumOctants();
137 for (
unsigned int i=0; i<nocts; i++){
139 vector<array<double,3> > nodes = pablo5.getNodes(i);
140 for (
int j=0; j<4; j++){
141 double x = nodes[j][0];
142 double y = nodes[j][1];
144 if ((
pow((x-xc),2.0)+
pow((y-yc),2.0) <=
pow(radius,2.0))){
145 pablo5.setMarker(i, -1);
152#if BITPIT_ENABLE_MPI==1
154 pablo5.loadBalance();
158 pablo5.updateConnectivity();
159 pablo5.write(
"pablo00005_iter"+to_string(
static_cast<unsigned long long>(iter)));
163 pablo5.adaptGlobalCoarse();
164 pablo5.updateConnectivity();
165 pablo5.write(
"pablo00005_iter"+to_string(
static_cast<unsigned long long>(iter)));
171int main(
int argc,
char *argv[])
173#if BITPIT_ENABLE_MPI==1
174 MPI_Init(&argc,&argv);
182#if BITPIT_ENABLE_MPI==1
183 MPI_Comm_size(MPI_COMM_WORLD, &nProcs);
184 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
198 }
catch (
const std::exception &exception) {
203#if BITPIT_ENABLE_MPI==1
void initialize(log::Mode mode, bool reset, int nProcesses, int rank)
std::array< T, d > pow(std::array< T, d > &x, double p)
#define BITPIT_UNUSED(variable)
Logger & cout(log::Level defaultSeverity, log::Visibility defaultVisibility)
LoggerManipulator< log::Level > fileVerbosity(const log::Level &threshold)
Logger & disableConsole(Logger &logger, const log::Level &level)
LoggerManager & manager()