25#if BITPIT_ENABLE_MPI==1
29#include "bitpit_PABLO.hpp"
32using namespace bitpit;
76 pablo2.setBalance(idx,
true);
79 pablo2.computeConnectivity();
80 pablo2.write(
"pablo00002_iter"+to_string(
static_cast<unsigned long long>(iter)));
83 for (iter=1; iter<3; iter++){
84 pablo2.adaptGlobalRefine();
85 pablo2.updateConnectivity();
86 pablo2.write(
"pablo00002_iter"+to_string(
static_cast<unsigned long long>(iter)));
95 for (iter=3; iter<9; iter++){
96 uint32_t nocts = pablo2.getNumOctants();
97 for (
unsigned int i=0; i<nocts; i++){
99 vector<array<double,3> > nodes = pablo2.getNodes(i);
100 for (
int j=0; j<4; j++){
101 double x = nodes[j][0];
102 double y = nodes[j][1];
103 if ((
pow((x-xc),2.0)+
pow((y-yc),2.0) <=
pow(radius,2.0))){
104 pablo2.setMarker(i, 1);
112 pablo2.updateConnectivity();
113 pablo2.write(
"pablo00002_iter"+to_string(
static_cast<unsigned long long>(iter)));
117 pablo2.adaptGlobalCoarse();
118 pablo2.updateConnectivity();
119 pablo2.write(
"pablo00002_iter"+to_string(
static_cast<unsigned long long>(iter)));
127 for (iter=10; iter<15; iter++){
128 uint32_t nocts = pablo2.getNumOctants();
129 for (
unsigned int i=0; i<nocts; i++){
131 vector<array<double,3> > nodes = pablo2.getNodes(i);
132 for (
int j=0; j<4; j++){
133 double x = nodes[j][0];
134 double y = nodes[j][1];
136 if ((
pow((x-xc),2.0)+
pow((y-yc),2.0) <=
pow(radius,2.0))){
137 pablo2.setMarker(i, -1);
143 pablo2.updateConnectivity();
144 pablo2.write(
"pablo00002_iter"+to_string(
static_cast<unsigned long long>(iter)));
151int main(
int argc,
char *argv[])
153#if BITPIT_ENABLE_MPI==1
154 MPI_Init(&argc,&argv);
162#if BITPIT_ENABLE_MPI==1
163 MPI_Comm_size(MPI_COMM_WORLD, &nProcs);
164 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
178 }
catch (
const std::exception &exception) {
183#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()