ParMooN
 All Classes Functions Variables Friends Pages
SystemTNSE2D_ALE.h
1 
10 #ifndef __SYSTEMTNSE2D_ALE__
11 #define __SYSTEMTNSE2D_ALE__
12 
13 #include <SystemTNSE2D.h>
14 
17 {
18  protected:
20  int N_GridDOFs, N_GridActive, *GridKCol, *GridRowPtr;
21 
23  double *MeshVelo, *gridpos, *gridpos_old, *gridpos_ref, *griddisp, *GridRhs, *Entries[4];
24 
27 
29  BoundValueFunct2D *GridBoundValue[1];
30 
32  TFEVectFunct2D *GridPos, *RefGridPos;
33 
36 
38  TDiscreteForm2D *DiscreteFormMARhs, *DiscreteFormGrid;
39 
40 // /** M - mass/system mat for TNSE velocity component */
41 // TSquareMatrix2D *OldSqmatrixM11, *OldSqmatrixM12, *OldSqmatrixM21, *OldSqmatrixM22;
42 
43 
45  TSquareMatrix2D *SqmatrixG11, *SqmatrixG12, *SqmatrixG21, *SqmatrixG22, *SQMATRICES_GRID[4];
46 
49 
51  TAuxParam2D *Aux_ALE, *Meshaux;
52 
54  BoundCondFunct2D *GridBoundaryConditions[1];
55  BoundValueFunct2D *GridBoundValues[1];
56 
58  ModifyMeshCoords *ModifyCoord;
59 
61  ModifyBoundCoords *ModifyBoudary;
62 
64  bool SolveLinearElastic, CONSERVATIVEALE, NeedInterMassMat;
65 
66  public:
67 
69  TSystemTNSE2D_ALE(TFESpace2D *velocity_fespace, TFESpace2D *presssure_fespace, TFEVectFunct2D *Velocity,
70  TFEFunction2D *p, double *sol, double *rhs, int disctype, int nsetype, int solver,
71 #ifdef __PRIVATE__
72  TFESpace2D *Projection_space, TFESpace2D *Stress_FeSpace, TFESpace2D *Deformation_FeSpace,
73 #endif
74  TFESpace2D *gridFESpace, TFEVectFunct2D *MeshVelocity, bool conservativeale);
75 //
76 // /** destrcutor */
77 // ~TSystemTNSE2D_ALE();
78 //
81  void Init(CoeffFct2D *lincoeffs, BoundCondFunct2D *BoundCond, BoundValueFunct2D *U1BoundValue, BoundValueFunct2D *U2BoundValue,
82  CoeffFct2D *GridBilinearCoeffs, BoundCondFunct2D *GridBoundCond, BoundValueFunct2D *gridBoundValue, TAuxParam2D *aux, TAuxParam2D *nseaux_error);
83 
84 
85  void AddMeshModifyFunction(ModifyMeshCoords *modifyCoord)
86  { ModifyCoord = modifyCoord; SolveLinearElastic = FALSE; }
87 
88  void AddBoundModifyFunction(ModifyBoundCoords *modifyboudary)
89  { ModifyBoudary = modifyboudary; SolveLinearElastic = TRUE; }
90 
92  void Assemble(double *sol, double *rhs);
93 
94 // /** store M mat for next time step */
95 // void StoreMmat();
96 
97 // /** move mesh */
98 // void MoveMesh(int N_MovVert, TVertex **MovBoundVert, TIsoBoundEdge **Free_Joint,
99 // double * Iso_refX, double Currtime);
100 //
101 // /** move mesh */
102 // void MoveMesh(double Currtime);
103 
105  void GetMeshVeloAndMove(int N_MovVert, TVertex **MovBoundVert, TIsoBoundEdge **Free_Joint,
106  double * Iso_refX, double Currtime, double tau);
107 
109  void GetMeshVeloAndMove(double Currtime, double tau);
110 
112  void AssembleMeshMat();
113 
115  void AssembleSystMat(double scale, double *oldrhs, double *rhs, double *sol);
116 
119 
121  void RestoreMassMat();
122 
124  void AssembleANonLinear(double *sol, double *rhs);
125 
127  void Solve(double *sol);
128 
130  void GetTNSEResidual(double *sol, double *res);
131 
132 // /** measure the error in the NSE */
133 // void MeasureTNSEErrors(DoubleFunct2D *ExactU1, DoubleFunct2D *ExactU2, DoubleFunct2D *ExactP, double *AllErrors);
134 //
135 // void GridMovingScheme(TFESpace2D *GridFESpace);
136 };
137 
138 #endif
int N_GridDOFs
Definition: SystemTNSE2D_ALE.h:20
TDiscreteForm2D * DiscreteFormMARhs
Definition: SystemTNSE2D_ALE.h:38
stores the information of a 2D TNSE system matrix
Definition: SystemTNSE2D_ALE.h:16
void AssembleANonLinear(double *sol, double *rhs)
Definition: SystemTNSE2D_ALE.C:759
TFEVectFunct2D * GridPos
Definition: SystemTNSE2D_ALE.h:32
TSquareMatrix2D * SqmatrixG11
Definition: SystemTNSE2D_ALE.h:45
Definition: SquareMatrix2D.h:20
void GetMeshVeloAndMove(int N_MovVert, TVertex **MovBoundVert, TIsoBoundEdge **Free_Joint, double *Iso_refX, double Currtime, double tau)
Definition: SystemTNSE2D_ALE.C:495
BoundValueFunct2D * GridBoundValue[1]
Definition: SystemTNSE2D_ALE.h:29
Definition: IsoBoundEdge.h:18
TFEFunction2D * MeshVeloFct[2]
Definition: SystemTNSE2D_ALE.h:35
Definition: AuxParam2D.h:22
TAuxParam2D * Aux_ALE
Definition: SystemTNSE2D_ALE.h:51
Definition: FESpace2D.h:28
void GetTNSEResidual(double *sol, double *res)
Definition: SystemTNSE2D_ALE.C:963
void AssembleSystMat(double scale, double *oldrhs, double *rhs, double *sol)
Definition: SystemTNSE2D_ALE.C:585
BoundCondFunct2D * GridBoundaryConditions[1]
Definition: SystemTNSE2D_ALE.h:54
stores the information of a 2D TNSE system matrix
Definition: SystemTNSE2D.h:16
void RestoreMassMat()
Definition: SystemTNSE2D_ALE.C:721
TSquareStructure2D * SquareStructureG
Definition: SystemTNSE2D_ALE.h:48
double * MeshVelo
Definition: SystemTNSE2D_ALE.h:23
void Init(CoeffFct2D *lincoeffs, BoundCondFunct2D *BoundCond, BoundValueFunct2D *U1BoundValue, BoundValueFunct2D *U2BoundValue, CoeffFct2D *GridBilinearCoeffs, BoundCondFunct2D *GridBoundCond, BoundValueFunct2D *gridBoundValue, TAuxParam2D *aux, TAuxParam2D *nseaux_error)
Definition: SystemTNSE2D_ALE.C:120
Definition: FEVectFunct2D.h:23
Definition: DiscreteForm2D.h:21
TFESpace2D * GridFESpace
Definition: SystemTNSE2D_ALE.h:26
void AssembleSystMatNonLinear()
Definition: SystemTNSE2D_ALE.C:686
void AssembleMeshMat()
Definition: SystemTNSE2D_ALE.C:556
Definition: Vertex.h:19
TSystemTNSE2D_ALE(TFESpace2D *velocity_fespace, TFESpace2D *presssure_fespace, TFEVectFunct2D *Velocity, TFEFunction2D *p, double *sol, double *rhs, int disctype, int nsetype, int solver,#ifdef __PRIVATE__ TFESpace2D *Projection_space, TFESpace2D *Stress_FeSpace, TFESpace2D *Deformation_FeSpace,#endif TFESpace2D *gridFESpace, TFEVectFunct2D *MeshVelocity, bool conservativeale)
source file for TSystemTNSE2D_ALE
Definition: SystemTNSE2D_ALE.C:30
Definition: SquareStructure2D.h:20
ModifyBoundCoords * ModifyBoudary
Definition: SystemTNSE2D_ALE.h:61
ModifyMeshCoords * ModifyCoord
Definition: SystemTNSE2D_ALE.h:58
void Solve(double *sol)
Definition: SystemTNSE2D_ALE.C:909
void Assemble(double *sol, double *rhs)
Definition: SystemTNSE2D_ALE.C:238
Definition: FEFunction2D.h:24