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