POD basis computation using voloctree. This example computes the POD basis starting from a database of simulations defined on the same mesh and evaluate the reconstruction of a snapshot included in the database. To run: ./POD_example_00001
.
POD basis computation using voloctree. This example computes the POD basis starting from a database of simulations defined on the same mesh and evaluate the reconstruction of a snapshot included in the database. To run: ./POD_example_00001
#include <array>
#if BITPIT_ENABLE_MPI
#include <mpi.h>
#endif
#include "pod.hpp"
using namespace bitpit;
void run()
{
for (int i=0; i<6; i++)
pod.
addSnapshot(
"./data",
"test_set2."+std::to_string(i));
}
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 setMeshType(MeshType type)
void setStaticMesh(bool flag)
void setMemoryMode(MemoryMode mode)
void setDirectory(const std::string &directory)
void addReconstructionSnapshot(const std::string &directory, const std::string &name)
void setWriteMode(WriteMode mode)
void setEnergyLevel(double energy)
void setName(const std::string &name)
void setErrorMode(ErrorMode mode)
void addSnapshot(const std::string &directory, const std::string &name)
---
layout: doxygen_footer
---