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++)
for (int i=0; i<5; i++)
std::vector<std::string> namesf {"rho","rho_e"};
std::vector<std::array<std::string,3>> namevf {};
}
int main(int argc, char *argv[])
{
#if BITPIT_ENABLE_MPI
MPI_Init(&argc,&argv);
#endif
try {
run();
} catch (const std::exception &exception) {
log::cout() << exception.what();
exit(1);
}
#if BITPIT_ENABLE_MPI
MPI_Finalize();
#endif
}
The POD (Proper Orthogonal Decomposition) class provides an interface for defining POD object.
void setErrorThreshold(double threshold)
void setTargetErrorFields(std::vector< std::string > &namesf, std::vector< std::array< std::string, 3 > > &namevf)
void setMeshType(MeshType type)
void setStaticMesh(bool flag)
void setMemoryMode(MemoryMode mode)
void setDirectory(const std::string &directory)
void evalErrorBoundingBox()
void setUseMean(bool flag)
void removeLeave1outSnapshot(const std::string &directory, const std::string &name)
void setWriteMode(WriteMode mode)
void setEnergyLevel(double energy)
void setName(const std::string &name)
void addSnapshot(const std::string &directory, const std::string &name)
---
layout: doxygen_footer
---