[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
parameters_hyper_reduction.cpp
1 #include "parameters/parameters_hyper_reduction.h"
2 namespace PHiLiP {
3 namespace Parameters {
4 
5 void HyperReductionParam::declare_parameters (dealii::ParameterHandler &prm)
6 {
7  prm.enter_subsection("hyperreduction");
8  {
9  prm.declare_entry("NNLS_tol", "1E-6",
10  dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
11  "Tolerance for the NNLS solver");
12  prm.declare_entry("NNLS_max_iter", "5000",
13  dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
14  "Maximum number of iterations for the NNLS solver");
15  prm.declare_entry("training_data", "jacobian",
16  dealii::Patterns::Selection(
17  " jacobian | "
18  " residual "
19  ),
20  "Training Data to be used for ECSW Weights"
21  "Choices are "
22  " <jacobian | "
23  " residual>.");
24  prm.declare_entry("num_training_snaps", "0",
25  dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
26  "Number of snapshots used for training");
27  prm.declare_entry("adapt_sampling_bool","true",
28  dealii::Patterns::Bool(),
29  "Set as true by default (i.e. runs adaptive sampling procedure before hyperreduction). ");
30  prm.declare_entry("ROM_error_tol", "0",
31  dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
32  "Minimum Error for ROM sampling point to be included in post-sampling HROM analysis");
33  }
34  prm.leave_subsection();
35 }
36 
37 void HyperReductionParam::parse_parameters (dealii::ParameterHandler &prm)
38 {
39  prm.enter_subsection("hyperreduction");
40  {
41  NNLS_tol = prm.get_double("NNLS_tol");
42  NNLS_max_iter = prm.get_integer("NNLS_max_iter");
43  training_data = prm.get("training_data");
44  num_training_snaps = prm.get_integer("num_training_snaps");
45  adapt_sampling_bool = prm.get_bool("adapt_sampling_bool");
46  ROM_error_tol = prm.get_double("ROM_error_tol");
47  }
48  prm.leave_subsection();
49 }
50 
51 } // Parameters namespace
52 } // PHiLiP namespace
Files for the baseline physics.
Definition: ADTypes.hpp:10
int num_training_snaps
Maximum number of snapshots in the ECSW training.
int NNLS_max_iter
Maximum number of iterations for NNLS Solver.
static void declare_parameters(dealii::ParameterHandler &prm)
Declares the possible variables and sets the defaults.
double NNLS_tol
Tolerance for NNLS Solver.
bool adapt_sampling_bool
Run Adapative Sampling (Online POD) or use Snapshots in path_to_search in Reduced Order Params...
double ROM_error_tol
Minimum Error for ROM sampling point to be included in post-sampling HROM analysis.
std::string training_data
Training data (Residual-based vs Jacobian-based)
void parse_parameters(dealii::ParameterHandler &prm)
Parses input file and sets the variables.