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: J. Foulon & J-F. Gerbeau & V. Martin |
13 |
|
|
// |
14 |
|
|
|
15 |
|
|
#ifndef _LINEARPROBLEMSTOKESCONTINUATION_HPP |
16 |
|
|
#define _LINEARPROBLEMSTOKESCONTINUATION_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 |
|
|
|
28 |
|
|
/*! |
29 |
|
|
\file linearProblemStokesContinuation.hpp |
30 |
|
|
\date 17/03/2022 |
31 |
|
|
\brief Continuation method for Stokes' equation |
32 |
|
|
*/ |
33 |
|
|
|
34 |
|
|
namespace felisce { |
35 |
|
|
class LinearProblemStokesContinuation: |
36 |
|
|
public LinearProblem { |
37 |
|
|
public: |
38 |
|
|
LinearProblemStokesContinuation(); |
39 |
|
16 |
~LinearProblemStokesContinuation(){}; |
40 |
|
|
|
41 |
|
|
// usual methods |
42 |
|
|
void initialize(std::vector<GeometricMeshRegion::Pointer>& mesh, FelisceTransient::Pointer fstransient, MPI_Comm& comm, bool doUseSNES) override; |
43 |
|
|
void initPerElementType(ElementType eltType, FlagMatrixRHS flagMatrixRHS = FlagMatrixRHS::matrix_and_rhs) override; // set the current finite element |
44 |
|
|
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 |
45 |
|
|
|
46 |
|
|
// methods regarding the cip stabilization |
47 |
|
|
void userChangePattern(int numProc, int rankProc) override; |
48 |
|
|
void assembleCIPStabilization(); |
49 |
|
|
void addNewFaceOrientedContributor(felInt size, felInt idElt, std::vector<bool>& vec); |
50 |
|
|
void updateFaceOrientedFEWithBd(CurrentFiniteElementWithBd* fe, std::vector<felInt>& idOfFaces, felInt numPoints, felInt idElt, felInt& idSup); |
51 |
|
|
|
52 |
|
|
// reading the data from the forward problem |
53 |
|
|
void readData(IO& io,double iteration) override; |
54 |
|
|
protected: |
55 |
|
|
CurrentFiniteElement* m_feVel; |
56 |
|
|
CurrentFiniteElement* m_fePres; |
57 |
|
|
ElementField m_sourceTerm; |
58 |
|
|
ElementField m_dataTerm; |
59 |
|
|
Variable* m_velocity; |
60 |
|
|
Variable* m_pressure; |
61 |
|
|
felInt m_iVelocity; |
62 |
|
|
felInt m_iPressure; |
63 |
|
|
double m_viscosity; |
64 |
|
|
bool m_useSymmetricStress; |
65 |
|
|
PetscVector m_potData; |
66 |
|
|
}; |
67 |
|
|
} |
68 |
|
|
|
69 |
|
|
#endif |
70 |
|
|
|