ParMooN
 All Classes Functions Variables Friends Pages
SystemTCD3D.h
1 
11 #ifndef __SYSTEMTCD3D__
12 #define __SYSTEMTCD3D__
13 
14 #include <SquareMatrix3D.h>
15 #include <SystemCD3D.h>
16 
18 class TSystemTCD3D : public TSystemCD3D
19 {
20  protected:
21 #ifdef _MPI
22  TParDirectSolver *TDS;
23 #endif
24 
26 
28  double *B;
29 
31  double *defect;
32 
34  double gamma;
35 
36  bool factorize;
37 
38 
41 
42 // /** Stiffness part of the SUPG matrix */
43 // TSquareMatrix3D *sqmatrixK;
44 //
45 // /** time-consistent part of the SUPG matrix */
46 // TSquareMatrix3D *sqmatrixS;
47 
49  TDiscreteForm3D *DiscreteFormMRhs, *DiscreteFormRhs;
50 
53 
54  public:
56  TSystemTCD3D(int N_levels, TFESpace3D **fespaces, double **sol, double **rhs, int disctype, int solver);
57 
59  ~TSystemTCD3D();
60 
62  void Init(CoeffFct3D *BilinearCoeffs, BoundCondFunct3D *BoundCond, BoundValueFunct3D *BoundValue, TAuxParam3D *aux);
63 
66  { return sqmatrixA; }
67 
69  void AssembleMRhs();
70 
72  void AssembleARhs();
73 
74 // /** M = M + (tau*THETA1)*A */
75 // /** B = (tau*THETA1)*rhs +(tau*THETA2)*oldrhs + [ M - (tau*THETA2)A]*oldsol */
76  void AssembleSystMat(double *oldrhs, double *oldsol, double *rhs, double *sol
77 #ifdef _MPI
78  , double **Rhs_array
79 #endif
80  );
81 
83  void RestoreMassMat();
84 
86  void Solve(double *sol);
87 
89  double GetResidual(double *sol);
90 
91  double value(double *sol,int N){
92  int i;
93  double sum=0.;
94  for(i=0;i<N;i++) sum+=sol[i];
95  return sum;
96  }
97 
98 };
99 
100 #endif
101 
stores the information of a timedependent part of a 3D scalar system matrix
Definition: SystemTCD3D.h:18
double * defect
Definition: SystemTCD3D.h:31
TSquareMatrix3D ** GetAMatrix()
Definition: SystemTCD3D.h:65
Definition: SquareMatrix3D.h:20
void RestoreMassMat()
Definition: SystemTCD3D.C:296
double GetResidual(double *sol)
Definition: SystemTCD3D.C:378
Definition: AuxParam3D.h:21
base class for assembling matrices
Definition: AssembleMat3D.h:27
bool SystMatAssembled
Definition: SystemTCD3D.h:52
Definition: FESpace3D.h:22
~TSystemTCD3D()
Definition: SystemTCD3D.C:58
TDiscreteForm3D * DiscreteFormMRhs
Definition: SystemTCD3D.h:49
TSquareMatrix3D ** sqmatrixA
Definition: SystemCD3D.h:80
void Init(CoeffFct3D *BilinearCoeffs, BoundCondFunct3D *BoundCond, BoundValueFunct3D *BoundValue, TAuxParam3D *aux)
Definition: SystemTCD3D.C:89
void Solve(double *sol)
Definition: SystemTCD3D.C:317
void AssembleSystMat(double *oldrhs, double *oldsol, double *rhs, double *sol#ifdef _MPI, double **Rhs_array#endif)
Definition: SystemTCD3D.C:228
double gamma
Definition: SystemTCD3D.h:34
TAssembleMat3D ** MMatRhsAssemble
Definition: SystemTCD3D.h:40
Definition: DiscreteForm3D.h:21
void AssembleARhs()
Definition: SystemTCD3D.C:204
double * B
Definition: SystemTCD3D.h:28
TSystemTCD3D(int N_levels, TFESpace3D **fespaces, double **sol, double **rhs, int disctype, int solver)
source file for TSystemTCD3D
Definition: SystemTCD3D.C:22
stores the information of a 3D scalar system matrix
Definition: SystemCD3D.h:31
void AssembleMRhs()
Definition: SystemTCD3D.C:176
Definition: ParDirectSolver.h:23
TSquareMatrix3D ** sqmatrixM
Definition: SystemTCD3D.h:25