Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
NavierStokes_decl.hpp
1#ifndef NAVIERSTOKES_decl_hpp
2#define NAVIERSTOKES_decl_hpp
3
4#include <Thyra_ProductVectorBase.hpp>
5#include <Thyra_PreconditionerBase.hpp>
6#include <Thyra_ModelEvaluatorBase_decl.hpp>
7
8#include "feddlib/problems/abstract/NonLinearProblem.hpp"
9
10
19
20namespace FEDD{
21template <class SC, class LO, class GO, class NO>
22class Matrix;
23template <class SC, class LO, class GO, class NO>
24class BCBuilder;
25
26template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
27class NavierStokes : public NonLinearProblem<SC,LO,GO,NO> {
28
29public:
31
32 typedef Problem<SC,LO,GO,NO> Problem_Type;
33 typedef Matrix<SC,LO,GO,NO> Matrix_Type;
34 typedef Teuchos::RCP<Matrix_Type> MatrixPtr_Type;
35 typedef Teuchos::RCP<const MatrixPtr_Type> MatrixConstPtr_Type;
36
37 typedef typename Problem_Type::MapConstPtr_Type MapConstPtr_Type;
38
39 typedef typename Problem_Type::BlockMatrix_Type BlockMatrix_Type;
40 typedef typename Problem_Type::BlockMatrixPtr_Type BlockMatrixPtr_Type;
41
42 typedef typename Problem_Type::MultiVector_Type MultiVector_Type;
43 typedef typename Problem_Type::MultiVectorPtr_Type MultiVectorPtr_Type;
44 typedef typename Problem_Type::MultiVectorConstPtr_Type MultiVectorConstPtr_Type;
45 typedef typename Problem_Type::BlockMultiVectorPtr_Type BlockMultiVectorPtr_Type;
46 typedef typename Problem_Type::BlockMultiVector_Type BlockMultiVector_Type;
47
48 typedef typename Problem_Type::Domain_Type Domain_Type;
49 typedef typename Problem_Type::DomainPtr_Type DomainPtr_Type;
50 typedef typename Problem_Type::DomainConstPtr_Type DomainConstPtr_Type;
51 typedef typename Problem_Type::CommConstPtr_Type CommConstPtr_Type;
52
53 typedef NonLinearProblem<SC,LO,GO,NO> NonLinearProblem_Type;
54 typedef typename NonLinearProblem_Type::BlockMultiVectorPtrArray_Type BlockMultiVectorPtrArray_Type;
55
56 typedef typename NonLinearProblem_Type::TpetraMatrix_Type TpetraMatrix_Type;
57
58 typedef typename NonLinearProblem_Type::ThyraVecSpace_Type ThyraVecSpace_Type;
59 typedef typename NonLinearProblem_Type::ThyraVec_Type ThyraVec_Type;
60 typedef typename NonLinearProblem_Type::ThyraOp_Type ThyraOp_Type;
61 typedef Thyra::BlockedLinearOpBase<SC> ThyraBlockOp_Type;
62
63 typedef BCBuilder<SC,LO,GO,NO> BC_Type;
64 typedef Teuchos::RCP<BC_Type> BCPtr_Type;
65 typedef Teuchos::RCP<const BC_Type> BCConstPtr_Type;
66
67 typedef typename NonLinearProblem_Type::TpetraOp_Type TpetraOp_Type;
69
71
72 NavierStokes( const DomainConstPtr_Type &domainVelocity, std::string FETypeVelocity, const DomainConstPtr_Type &domainPressure, std::string FETypePressure, ParameterListPtr_Type parameterList );
74
75 virtual void info();
76
77 virtual void assemble( std::string type = "" ) const;
78
79 void assembleConstantMatrices() const;
80
81 void assembleDivAndStab() const;
82
84
85 void reAssemble( std::string type ) const;
86
87 void reAssemble( BlockMultiVectorPtr_Type previousSolution ) const override{}
88
89 void reAssembleFSI(std::string type, MultiVectorPtr_Type u_minus_w, MatrixPtr_Type P) const;
90
91 virtual void reAssemble(MatrixPtr_Type& massmatrix, std::string type ) const;
92
93 virtual void reAssembleExtrapolation(BlockMultiVectorPtrArray_Type previousSolutions);
94
95 virtual void calculateNonLinResidualVec(std::string type="standard", double time=0.) const; //standard or reverse
96
97 void calculateNonLinResidualVecWithMeshVelo(std::string type, double time, MultiVectorPtr_Type u_minus_w, MatrixPtr_Type P) const;
98 // virtual int ComputeDragLift(vec_dbl_ptr_Type &values);
99
100 void getValuesOfInterest( vec_dbl_Type& values ) override {}
101
102 void computeValuesOfInterestAndExport() override {}
103
104
105// virtual void assembleExternal( std::string type ){}
106 /*####################*/
107
108 mutable MatrixPtr_Type A_;
109 mutable MatrixPtr_Type NNZ_A_;
110 vec_int_ptr_Type pressureIDsLoc;
111 MultiVectorPtr_Type u_rep_;
112
113 BCPtr_Type bcFactoryPCD_;
114 mutable MatrixPtr_Type Mp_;
115 mutable MatrixPtr_Type BT_Mp_;
116 mutable MatrixPtr_Type BT_Mp_B_;
117 mutable MatrixPtr_Type Ap_;
118
119 bool augmentedLagrange_=false;
120
121private:
122
123 void establishNNZPattern() const;
124
125};
126}
127#endif
This class is responsible for setting the boundary conditions into the system and rhs.
Definition BCBuilder_decl.hpp:45
Definition Matrix_decl.hpp:30
virtual void assemble(std::string type="") const
assemble of type exectuted by the derived specific non-linear problem classes
Definition NavierStokes_def.hpp:165
void updateConvectionDiffusionOperator() const
Definition NavierStokes_def.hpp:413
void getValuesOfInterest(vec_dbl_Type &values) override
Virtual class to extract values of interest that are computed during the solve.
Definition NavierStokes_decl.hpp:100
virtual void calculateNonLinResidualVec(std::string type="standard", double time=0.) const
Virtual function which is implemented in the specific non-linear problem classes to calculate the non...
Definition NavierStokes_def.hpp:740
NonLinearProblem(CommConstPtr_Type comm)
Definition NonLinearProblem_def.hpp:23
Definition Problem_decl.hpp:42
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:36