Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
NavierStokesAssFE_decl.hpp
1#ifndef NAVIERSTOKESASSFE_decl_hpp
2#define NAVIERSTOKESASSFE_decl_hpp
3#include "feddlib/problems/abstract/NonLinearProblem.hpp"
4#include <Thyra_ProductVectorBase.hpp>
5#include <Thyra_PreconditionerBase.hpp>
6#include <Thyra_ModelEvaluatorBase_decl.hpp>
15
16namespace FEDD{
17
26
27template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
28class NavierStokesAssFE : public NonLinearProblem<SC,LO,GO,NO> {
29
30public:
32
33 typedef Problem<SC,LO,GO,NO> Problem_Type;
34 typedef typename Problem_Type::Matrix_Type Matrix_Type;
35 typedef typename Problem_Type::MatrixPtr_Type MatrixPtr_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::BlockMultiVector_Type BlockMultiVector_Type;
46 typedef typename Problem_Type::BlockMultiVectorPtr_Type BlockMultiVectorPtr_Type;
47
48 typedef typename Problem_Type::DomainConstPtr_Type DomainConstPtr_Type;
49 typedef typename Problem_Type::CommConstPtr_Type CommConstPtr_Type;
50
51 typedef NonLinearProblem<SC,LO,GO,NO> NonLinearProblem_Type;
52 typedef typename NonLinearProblem_Type::BlockMultiVectorPtrArray_Type BlockMultiVectorPtrArray_Type;
53
54 typedef typename NonLinearProblem_Type::TpetraMatrix_Type TpetraMatrix_Type;
55
56 typedef typename NonLinearProblem_Type::ThyraVecSpace_Type ThyraVecSpace_Type;
57 typedef typename NonLinearProblem_Type::ThyraVec_Type ThyraVec_Type;
58 typedef typename NonLinearProblem_Type::ThyraOp_Type ThyraOp_Type;
59 typedef Thyra::BlockedLinearOpBase<SC> ThyraBlockOp_Type;
60
61 typedef typename NonLinearProblem_Type::TpetraOp_Type TpetraOp_Type;
63
65
66 NavierStokesAssFE( 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 reAssemble( std::string type ) const;
78
79 virtual void reAssemble( BlockMultiVectorPtr_Type previousSolution ) const{}
80
81 //void reAssembleFSI(std::string type, MultiVectorPtr_Type u_minus_w, MatrixPtr_Type P) const;
82
83 virtual void reAssemble(MatrixPtr_Type& massmatrix, std::string type ) const;
84
85 virtual void reAssembleExtrapolation(BlockMultiVectorPtrArray_Type previousSolutions);
86
87 virtual void calculateNonLinResidualVec(std::string type="standard", double time=0.) const; //standard or reverse
88
89 void calculateNonLinResidualVecWithMeshVelo(std::string type, double time, MultiVectorPtr_Type u_minus_w, MatrixPtr_Type P) const;
90// virtual int ComputeDragLift(vec_dbl_ptr_Type &values);
91
92 virtual void getValuesOfInterest( vec_dbl_Type& values ){}
93
94 virtual void computeValuesOfInterestAndExport() {}
95
96// virtual void assembleExternal( std::string type ){}
97 /*####################*/
98
99 void computeSteadyPostprocessingViscosity_Solution(); // Compute the viscosity based on the current velocity solution and save it inside viscosity_element_
100
101
102 mutable MatrixPtr_Type A_;
103 vec_int_ptr_Type pressureIDsLoc;
104 MultiVectorPtr_Type u_rep_;
105 MultiVectorPtr_Type p_rep_;
106
107 MultiVectorPtr_Type viscosity_element_; //In case of a generalized-Newtonian fluid one can compute viscosity for visualization
108
109public:
110
111private:
112
113
114
115};
116}
117#endif
virtual void getValuesOfInterest(vec_dbl_Type &values)
Virtual class to extract values of interest that are computed during the solve.
Definition NavierStokesAssFE_decl.hpp:92
virtual void assemble(std::string type="") const
assemble of type exectuted by the derived specific non-linear problem classes
Definition NavierStokesAssFE_def.hpp:121
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 NavierStokesAssFE_def.hpp:300
NonLinearProblem(CommConstPtr_Type comm)
Definition NonLinearProblem_def.hpp:23
Definition Problem_decl.hpp:42
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:36