Loading...
Searching...
No Matches
ReducedProblem.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ██╗████████╗██╗ ██╗ █████╗ ██████╗ █████╗ ███████╗██╗ ██╗
3 ██║╚══██╔══╝██║ ██║██╔══██╗██╔════╝██╔══██╗ ██╔════╝██║ ██║
4 ██║ ██║ ███████║███████║██║ ███████║█████╗█████╗ ██║ ██║
5 ██║ ██║ ██╔══██║██╔══██║██║ ██╔══██║╚════╝██╔══╝ ╚██╗ ██╔╝
6 ██║ ██║ ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ╚████╔╝
7 ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═══╝
8
9 * In real Time Highly Advanced Computational Applications for Finite Volumes
10 * Copyright (C) 2017 by the ITHACA-FV authors
11-------------------------------------------------------------------------------
12License
13 This file is part of ITHACA-FV
14 ITHACA-FV is free software: you can redistribute it and/or modify
15 it under the terms of the GNU Lesser General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18 ITHACA-FV is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU Lesser General Public License for more details.
22 You should have received a copy of the GNU Lesser General Public License
23 along with ITHACA-FV. If not, see <http://www.gnu.org/licenses/>.
24Class
25 reducedProblem
26Description
27 A general reduced problem class is implemented
28SourceFiles
29 reducedProblem.C
30\*---------------------------------------------------------------------------*/
31
38
39#ifndef reducedProblem_H
40#define reducedProblem_H
41
42#include "fvCFD.H"
43#include "IOmanip.H"
44#include "reductionProblem.H"
45#include <Eigen/Eigen>
46#include "newton_argument.H"
47#include "Foam2Eigen.H"
48
49
50/*---------------------------------------------------------------------------*\
51 Class reducedProblem Declaration
52\*---------------------------------------------------------------------------*/
55{
56 public:
57 // Constructors
60 virtual ~reducedProblem() {};
61
67
68 // Variables
70 scalar nu;
71
74
75 // Functions
77 virtual void solveOnline();
78
93 static Eigen::MatrixXd solveLinearSys(List<Eigen::MatrixXd> LinSys,
94 Eigen::MatrixXd x,
95 Eigen::VectorXd& residual, const Eigen::MatrixXd& bc = Eigen::MatrixXd::Zero(0,
96 0), const std::string solverType = "fullPivLu");
110 static Eigen::MatrixXd solveLinearSys(List<Eigen::MatrixXd> LinSys,
111 Eigen::MatrixXd x,
112 Eigen::VectorXd& residual, const std::string solverType);
113};
114
115
118{
119 public:
120 // Constructors
122 onlineInterp();
123 virtual ~onlineInterp() {};
124
127
128 //--------------------------------------------------------------------------
135 Eigen::MatrixXd getInterpCoeffRBF(std::vector<SPLINTER::RBFSpline> rbfVec,
136 Eigen::MatrixXd mu_interp);
137
138 //--------------------------------------------------------------------------
145 Eigen::MatrixXd getInterpCoeffSPL(std::vector<SPLINTER::BSpline> splVec,
146 Eigen::MatrixXd mu_interp);
147};
148
149
150// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151
152#endif
153
Header file of the Foam2Eigen class.
scalar residual
Class for the online evaluation of the coefficient manifold for PODI.
int Nmu_samples
Number of parameters in the mu_samples matrix in the FOM.
Eigen::MatrixXd getInterpCoeffRBF(std::vector< SPLINTER::RBFSpline > rbfVec, Eigen::MatrixXd mu_interp)
Get interpolated coefficients evaluated at points from matrix "mu_interp" using the constructed param...
onlineInterp()
Construct Null.
virtual ~onlineInterp()
Eigen::MatrixXd getInterpCoeffSPL(std::vector< SPLINTER::BSpline > splVec, Eigen::MatrixXd mu_interp)
Get interpolated coefficients evaluated at points from matrix "mu_interp" using the constructed param...
Base class for the implementation of a reduced problem.
virtual void solveOnline()
Virtual Method to perform and online Solve.
reductionProblem * problem
Pointer to FOAM problem.
static Eigen::MatrixXd solveLinearSys(List< Eigen::MatrixXd > LinSys, Eigen::MatrixXd x, Eigen::VectorXd &residual, const Eigen::MatrixXd &bc=Eigen::MatrixXd::Zero(0, 0), const std::string solverType="fullPivLu")
Linear system solver for the online problem.
scalar nu
Viscosity.
virtual ~reducedProblem()
reducedProblem()
Construct Null.
A general class for the implementation of a full order parametrized problem.
Header file for the implementation of the newton_argument class, a simple general object for the reso...
Header file of the reductionProblem class.