1 #ifndef __ASSEMBLE_ECSW_BASE__ 2 #define __ASSEMBLE_ECSW_BASE__ 4 #include <eigen/Eigen/Dense> 5 #include <Epetra_MpiComm.h> 6 #include <Epetra_SerialComm.h> 7 #include <Epetra_CrsMatrix.h> 8 #include <Epetra_Map.h> 9 #include <Epetra_Vector.h> 10 #include <EpetraExt_MatrixMatrix.h> 11 #include "dg/dg_base.hpp" 12 #include "pod_basis_base.h" 13 #include "parameters/all_parameters.h" 14 #include "multi_core_helper_functions.h" 17 namespace HyperReduction {
18 using Eigen::MatrixXd;
19 using Eigen::RowVectorXd;
20 using Eigen::VectorXd;
34 template <
int dim,
int nstate>
41 const dealii::ParameterHandler ¶meter_handler_input,
44 MatrixXd snapshot_parameters_input,
46 Epetra_MpiComm &Comm);
57 std::shared_ptr<DGBase<dim,double>>
dg;
60 std::shared_ptr<ProperOrthogonalDecomposition::PODBase<dim>>
pod;
71 dealii::ConditionalOStream
pcout;
80 std::shared_ptr<dealii::TrilinosWrappers::SparseMatrix>
A_T;
83 dealii::LinearAlgebra::ReadWriteVector<double>
b;
86 mutable std::vector<dealii::LinearAlgebra::distributed::Vector<double>>
fom_locations;
89 std::shared_ptr<Epetra_CrsMatrix>
local_generate_test_basis(Epetra_CrsMatrix &system_matrix,
const Epetra_CrsMatrix &pod_basis);
95 void update_snapshots(dealii::LinearAlgebra::distributed::Vector<double> fom_solution);
const dealii::ParameterHandler & parameter_handler
Parameter handler for storing the .prm file being ran.
std::vector< dealii::LinearAlgebra::distributed::Vector< double > > fom_locations
Vector of parameter-ROMTestLocation pairs.
MatrixXd snapshot_parameters
Matrix of snapshot parameters.
std::shared_ptr< dealii::TrilinosWrappers::SparseMatrix > A_T
Matrix for the NNLS Problem.
void update_snapshots(dealii::LinearAlgebra::distributed::Vector< double > fom_solution)
Update POD and Snapshot Parameters.
Files for the baseline physics.
ODESolverEnum
Types of ODE solver.
virtual void build_problem()=0
Fill entries of A and b.
Main parameter class that contains the various other sub-parameter classes.
dealii::LinearAlgebra::ReadWriteVector< double > b
RHS Vector for the NNLS Problem.
const int mpi_rank
MPI rank.
std::shared_ptr< ProperOrthogonalDecomposition::PODBase< dim > > pod
POD.
Parameters::ODESolverParam::ODESolverEnum ode_solver_type
ODE Solve Type/ Projection Type (galerkin or petrov-galerkin)
Epetra_MpiComm Comm_
Epetra Communicator Object with MPI.
std::shared_ptr< Epetra_CrsMatrix > local_generate_test_basis(Epetra_CrsMatrix &system_matrix, const Epetra_CrsMatrix &pod_basis)
Generate Test Basis from the pod and snapshot info depending on the ode_solve_type (copied from the O...
AssembleECSWBase(const PHiLiP::Parameters::AllParameters *const parameters_input, const dealii::ParameterHandler ¶meter_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.
const Parameters::AllParameters *const all_parameters
Pointer to all parameters.
const MPI_Comm mpi_communicator
MPI communicator.
std::shared_ptr< DGBase< dim, double > > dg
dg
void update_POD_snaps(std::shared_ptr< ProperOrthogonalDecomposition::PODBase< dim >> pod_update, MatrixXd snapshot_parameters_update)
Update POD and Snapshot Parameters.
dealii::ConditionalOStream pcout
ConditionalOStream.
DGBase is independent of the number of state variables.
Parameters::AllParameters reinit_params(const RowVectorXd ¶meter) const
Reinitialize parameters.
virtual ~AssembleECSWBase()
Destructor.