Use volcartesian to create a 2D Cartesian patch.
Use volcartesian to create a 2D Cartesian patchThis example creates a 2D Cartesian patch on the square domain [-10,10]x[-10,10]. The domain is discretized with a cell size of 0.5 both in x and y directions.
To run: ./volcartesian_example_00001
#include <array>
#if BITPIT_ENABLE_MPI==1
#include <mpi.h>
#endif
#include "bitpit_volcartesian.hpp"
using namespace bitpit;
int main(int argc, char *argv[]) {
std::cout << "Creating a 2D Cartesian patch" << "\n";
#if BITPIT_ENABLE_MPI==1
MPI_Init(&argc,&argv);
#endif
std::array<double, 3> origin = {{0., 0., 0.}};
double length = 20;
double dh = 0.5;
try {
} catch (const std::exception &exception) {
log::cout() << exception.what();
exit(1);
}
#if BITPIT_ENABLE_MPI==1
MPI_Finalize();
#endif
}
std::vector< adaption::Info > update(bool trackAdaption=true, bool squeezeStorage=false)
VTKUnstructuredGrid & getVTK()
void write(VTKWriteMode mode=VTKWriteMode::DEFAULT)
void setName(const std::string &)
The VolCartesian defines a Cartesian patch.
---
layout: doxygen_footer
---