1 #ifndef __POD_ADAPTIVE_SAMPLING__ 2 #define __POD_ADAPTIVE_SAMPLING__ 4 #include <deal.II/numerics/vector_tools.h> 5 #include "parameters/all_parameters.h" 6 #include "pod_basis_online.h" 7 #include "rom_test_location.h" 8 #include <eigen/Eigen/Dense> 9 #include "nearest_neighbors.h" 10 #include "adaptive_sampling_base.h" 14 using DealiiVector = dealii::LinearAlgebra::distributed::Vector<double>;
15 using Eigen::MatrixXd;
16 using Eigen::RowVectorXd;
17 using Eigen::VectorXd;
24 template <
int dim,
int nspecies,
int nstate>
30 const dealii::ParameterHandler ¶meter_handler_input);
54 std::unique_ptr<ProperOrthogonalDecomposition::ROMSolution<dim,nspecies,nstate>>
solveSnapshotROM(
const RowVectorXd& parameter)
const;
std::vector< double > rom_functional
Functional value predicted by the rom at each sammpling iteration at parameter location specified in ...
int run_sampling() const override
Run Sampling Procedure.
double solveSnapshotROMandFOM(const RowVectorXd ¶meter) const
Solve FOM and ROM, return error in functional between the models.
Files for the baseline physics.
Main parameter class that contains the various other sub-parameter classes.
AdaptiveSampling(const PHiLiP::Parameters::AllParameters *const parameters_input, const dealii::ParameterHandler ¶meter_handler_input)
Constructor.
void updateNearestExistingROMs(const RowVectorXd ¶meter) const
Updates nearest ROM points to snapshot if error discrepancy is above tolerance.
std::unique_ptr< ProperOrthogonalDecomposition::ROMSolution< dim, nspecies, nstate > > solveSnapshotROM(const RowVectorXd ¶meter) const
Solve reduced-order solution.
void trueErrorROM(const MatrixXd &rom_points) const
Compute true/actual error at all ROM points (error in functional between FOM and ROM solution) ...
~AdaptiveSampling()
Destructor.
bool placeROMLocations(const MatrixXd &rom_points) const
Placement of ROMs.
void solveFunctionalROM(const RowVectorXd ¶meter) const
Solve ROM and track functional.