[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
assemble_ECSW_residual.h
1 #ifndef __ASSEMBLE_PROBLEM_ECSW__
2 #define __ASSEMBLE_PROBLEM_ECSW__
3 
4 #include <eigen/Eigen/Dense>
5 #include <Epetra_CrsMatrix.h>
6 #include <Epetra_Map.h>
7 #include <Epetra_Vector.h>
8 #include <EpetraExt_MatrixMatrix.h>
9 #include "dg/dg_base.hpp"
10 #include "pod_basis_base.h"
11 #include "parameters/all_parameters.h"
12 #include "assemble_ECSW_training_data_base.h"
13 
14 namespace PHiLiP {
15 namespace HyperReduction {
16 using Eigen::MatrixXd;
17 using Eigen::RowVectorXd;
18 using Eigen::VectorXd;
19 
23 
24 /*
25 Reference for the ECSW training data assembly, find details in section 4.1 and Equation (17):
26 "Mesh sampling and weighting for the hyperreduction of nonlinear Petrov–Galerkin reduced-order models with local reduced-order bases"
27 Sebastian Grimberg, Charbel Farhat, Radek Tezaur, Charbel Bou-Mosleh
28 International Journal for Numerical Methods in Engineering, 2020
29 https://onlinelibrary.wiley.com/doi/10.1002/nme.6603
30 NOTE: The above presents the approach for training with the residual data
31 */
32 
33 template <int dim, int nstate>
34 class AssembleECSWRes: public AssembleECSWBase<dim,nstate>
35 {
36 public:
39  const PHiLiP::Parameters::AllParameters *const parameters_input,
40  const dealii::ParameterHandler &parameter_handler_input,
41  std::shared_ptr<DGBase<dim,double>> &dg_input,
43  MatrixXd snapshot_parameters_input,
45  Epetra_MpiComm &Comm);
46 
49 
51  void build_problem() override;
52 };
53 
54 } // HyperReduction namespace
55 } // PHiLiP namespace
56 
57 #endif
Files for the baseline physics.
Definition: ADTypes.hpp:10
Main parameter class that contains the various other sub-parameter classes.
std::shared_ptr< ProperOrthogonalDecomposition::PODBase< dim > > pod
POD.
Parameters::ODESolverParam::ODESolverEnum ode_solver_type
ODE Solve Type/ Projection Type (galerkin or petrov-galerkin)
DGBase is independent of the number of state variables.
Definition: dg_base.hpp:82
void build_problem() override
Fill entries of A and b.
AssembleECSWRes(const PHiLiP::Parameters::AllParameters *const parameters_input, const dealii::ParameterHandler &parameter_handler_input, std::shared_ptr< DGBase< dim, double >> &dg_input, std::shared_ptr< ProperOrthogonalDecomposition::PODBase< dim >> pod, MatrixXd snapshot_parameters_input, Parameters::ODESolverParam::ODESolverEnum ode_solver_type, Epetra_MpiComm &Comm)
Constructor.