25#if BITPIT_ENABLE_MPI==1
29#include "bitpit_PABLO.hpp"
31using namespace bitpit;
60 pablo11.setPeriodic(0);
61 pablo11.setPeriodic(2);
62 pablo11.setPeriodic(4);
65 pablo11.computeConnectivity();
66 pablo11.write(
"pablo000011.0");
69 pablo11.adaptGlobalRefine();
70 pablo11.updateConnectivity();
71 pablo11.write(
"pablo000011.1");
74 uint32_t nOct = pablo11.getNumOctants();
75 log::cout() <<
"Number of Octants : " << nOct << std::endl;
76 log::cout() <<
"Extracting the four face neighbours of each Octant " << std::endl;
77 for (uint32_t iOct = 0; iOct < nOct; ++iOct) {
78 std::vector<uint32_t> neigh;
79 std::vector<bool> isGhost;
80 log::cout() <<
". Octant index : " << iOct << std::endl;
81 for (uint8_t iFace=0; iFace<pablo11.getNfaces(); ++iFace) {
82 pablo11.findNeighbours(iOct, iFace, 1, neigh, isGhost);
83 log::cout() <<
" - For face " << (int)iFace <<
"; " << neigh.size() <<
" neighbours: [ ";
84 for (
auto iNeigh : neigh) {
92 log::cout() <<
"Extracting the four vertex neighbours of each Octant " << std::endl;
93 for (uint32_t iOct = 0; iOct < nOct; ++iOct) {
94 std::vector<uint32_t> neigh;
95 std::vector<bool> isGhost;
96 log::cout() <<
". Octant index : " << iOct << std::endl;
97 for (uint8_t iVertex=0; iVertex<pablo11.getNnodes(); ++iVertex) {
98 pablo11.findNeighbours(iOct, iVertex, 3, neigh, isGhost);
99 log::cout() <<
" - For vertex " << (int)iVertex <<
"; " << neigh.size() <<
" neighbours: [ ";
100 for (
auto iNeigh: neigh) {
108 log::cout() <<
"Extracting the four edge neighbours of each Octant " << std::endl;
109 for (uint32_t iOct=0; iOct < nOct; ++iOct) {
110 std::vector<uint32_t> neigh;
111 std::vector<bool> isGhost;
112 log::cout() <<
". Octant index : " << iOct << std::endl;
113 for (uint8_t iEdge = 0; iEdge<pablo11.getNedges(); ++iEdge) {
114 pablo11.findNeighbours(iOct, iEdge, 2, neigh, isGhost);
115 log::cout() <<
" - For edge " << (int)iEdge <<
"; " << neigh.size() <<
" neighbours: [ ";
116 for (
auto iNeigh: neigh) {
127int main(
int argc,
char *argv[])
129#if BITPIT_ENABLE_MPI==1
130 MPI_Init(&argc,&argv);
138#if BITPIT_ENABLE_MPI==1
139 MPI_Comm_size(MPI_COMM_WORLD, &nProcs);
140 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
154 }
catch (
const std::exception &exception) {
159#if BITPIT_ENABLE_MPI==1
void initialize(log::Mode mode, bool reset, int nProcesses, int rank)
#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()