GCC Code Coverage Report


Directory: ./
File: Solver/linearProblemNSContinuation.hpp
Date: 2024-04-14 07:32:34
Exec Total Coverage
Lines: 0 4 0.0%
Branches: 0 0 -%

Line Branch Exec Source
1 // ______ ______ _ _ _____ ______
2 // | ____| ____| | (_)/ ____| | ____|
3 // | |__ | |__ | | _| (___ ___| |__
4 // | __| | __| | | | |\___ \ / __| __|
5 // | | | |____| |____| |____) | (__| |____
6 // |_| |______|______|_|_____/ \___|______|
7 // Finite Elements for Life Sciences and Engineering
8 //
9 // License: LGL2.1 License
10 // FELiScE default license: LICENSE in root folder
11 //
12 // Main authors: Julien Castelneau, Dominique Chapelle, Miguel Fernandez
13 //
14
15 #ifndef _LINEARPROBLEMFSICONTINUATION_HPP
16 #define _LINEARPROBLEMFSICONTINUATION_HPP
17
18 // System includes
19 #include <vector>
20
21 // External includes
22
23 // Project includes
24 #include "Solver/linearProblem.hpp"
25 #include "Core/felisceParam.hpp"
26 #include "FiniteElement/elementField.hpp"
27 #include "DegreeOfFreedom/dof.hpp"
28
29
30 /*!
31 \file linearProblemFSIContinuation.hpp
32 \date 22/04/2022
33 \brief Continuation method for NS
34 */
35
36 namespace felisce {
37 /*!
38 \class LinearProblemNSContinuation
39 \authors M. Nechita & M. Agbalessi
40 \date 22/04/2022
41 \brief Manage specific functions for unique continuation for Navier-Stikes equations.
42 */
43
44 class LinearProblemNSContinuation:
45 public LinearProblem {
46 public:
47 LinearProblemNSContinuation();
48 ~LinearProblemNSContinuation(){};
49
50 // usual methods
51 void initialize(std::vector<GeometricMeshRegion::Pointer>& mesh, FelisceTransient::Pointer fstransient, MPI_Comm& comm, bool doUseSNES) override;
52 void initPerElementType(ElementType eltType, FlagMatrixRHS flagMatrixRHS = FlagMatrixRHS::matrix_and_rhs) override; // set the current finite element
53 void computeElementArray(const std::vector<Point*>& elemPoint, const std::vector<felInt>& elemIdPoint, felInt& iel, FlagMatrixRHS flagMatrixRHS = FlagMatrixRHS::matrix_and_rhs) override; // compute the elementary arrays for the block system
54
55 // methods regarding the cip stabilization
56 void userChangePattern(int numProc, int rankProc) override;
57 void assembleCIPStabilization();
58 void addNewFaceOrientedContributor(felInt size, felInt idElt, std::vector<bool>& vec);
59 void updateFaceOrientedFEWithBd(CurrentFiniteElementWithBd* fe, std::vector<felInt>& idOfFaces, felInt numPoints, felInt idElt, felInt& idSup);
60
61 // method to read the data from a forward problem
62 virtual void readVelocityData(IO& io,double iteration);
63
64 // methods to use a feature previous velocity
65 virtual void setPreviousVelocity(PetscVector & previousVelocityCandidate, AO & aoPreviousVelocity, Dof & dofPreviousVelocity);
66 inline PetscVector & previousVelocity(){return *m_previousVelocity;}
67 inline AO & aoPreviousVelocity(){return *m_aoPreviousVelocity;}
68 inline Dof & dofPreviousVelocity(){return *m_dofPreviousVelocity;}
69
70
71 protected:
72 CurrentFiniteElement* m_feVel;
73 CurrentFiniteElement* m_fePres;
74 ElementField m_sourceTerm;
75 ElementField m_dataTerm;
76
77 Variable* m_velocity;
78 Variable* m_pressure;
79 felInt m_iVelocity;
80 felInt m_iPressure;
81 felInt m_iDisplacement;
82 felInt m_iVelocityDiv;
83 felInt m_iPotThorax;
84
85 double m_viscosity;
86 bool m_useSymmetricStress;
87
88 PetscVector m_velocityData;
89 std::vector<double> m_vectorVelocityData;
90 PetscVector m_oldVelocity;
91
92 //ALE
93 ElementField m_elemFieldAdv;
94 ElementField m_elemFieldVelMesh;
95 ElementField m_beta;
96 int numDofExtensionProblem;
97
98 std::vector<PetscInt> m_petscToGlobal1;
99 std::vector<PetscInt> m_petscToGlobal2;
100 std::vector<PetscScalar> m_auxvec;
101
102 // velocity in Rhs and convective terms
103 bool m_useDataPreviousVelocity ;
104 PetscVector * m_previousVelocity ;
105 AO * m_aoPreviousVelocity;
106 Dof * m_dofPreviousVelocity;
107
108 };
109 }
110
111 #endif
112