POD leave-1-out error map computation using voloctree. This example uses the leave-1-out cross-validation method to compute the reconstruction error map starting from a database of simulations defined on the same mesh. It evaluates also the bounding box containing all those cells whose error is equal or greater than an assigned threshold. To run: ./POD_example_00003
.
POD leave-1-out error map computation using voloctree. This example uses the leave-1-out cross-validation method to compute the reconstruction error map starting from a database of simulations defined on the same mesh. It evaluates also the bounding box containing all those cells whose error is equal or greater than an assigned threshold. To run: ./POD_example_00003
#include <array>
#if BITPIT_ENABLE_MPI
#include <mpi.h>
#endif
#include "pod.hpp"
using namespace bitpit;
void run()
{
for (int i=0; i<10; i++)
pod.addSnapshot(
"./data",
"test."+std::to_string(i));
pod.setName(
"pod.test.solver");
for (int i=0; i<5; i++)
pod.removeLeave1outSnapshot(
"./data",
"test."+std::to_string(2*i));
std::vector<std::string> namesf {"rho","rho_e"};
std::vector<std::array<std::string,3>> namevf {};
pod.setTargetErrorFields(namesf,namevf);
pod.setErrorThreshold(0.001);
pod.evalErrorBoundingBox();
}
int main(int argc, char *argv[])
{
#if BITPIT_ENABLE_MPI
MPI_Init(&argc,&argv);
#endif
try {
run();
} catch (const std::exception &exception) {
exit(1);
}
#if BITPIT_ENABLE_MPI
MPI_Finalize();
#endif
}
The POD (Proper Orthogonal Decomposition) class provides an interface for defining POD object.
Logger & cout(log::Level defaultSeverity, log::Visibility defaultVisibility)
The namespace 'pod' contains structures for working with the POD class.