NeoPZ
pzblackoilanalysis.h
Go to the documentation of this file.
1 
6 #ifndef BLACKOILANALH
7 #define BLACKOILANALH
8 
9 #include "pzanalysis.h"
10 #include "pznonlinanalysis.h"
11 #include "pzcompel.h"
12 #include "pzfmatrix.h"
13 #include "pzvec.h"
14 #include <iostream>
15 
16 class TPZCompMesh;
17 class TPZFStructMatrix;
18 
19 #ifdef _AUTODIFF
20 
25 class TPZBlackOilAnalysis : public TPZNonLinearAnalysis {
26 
27 private:
29  TPZFMatrix<STATE> fLastState;
30 
31 public:
33  TPZBlackOilAnalysis(TPZCompMesh *mesh, double TimeStep, std::ostream &out = std::cout);
35  ~TPZBlackOilAnalysis();
36 
38  virtual void Assemble();
39 
41  virtual void AssembleResidual();
42 
44  virtual void Solve();
45 
46 // virtual void Run(std::ostream &out = std::cout, bool linesearch = true);
47  virtual void Run(std::ostream &out,bool linesearch);
48  virtual void Run(std::ostream &out = std::cout) {
49  TPZBlackOilAnalysis::Run(out,true);
50  }
51 
52  virtual void PostProcess(int resolution){ TPZAnalysis::PostProcess(resolution);}
53 
54  virtual void PostProcess(int resolution, int dimension);
55 
56  virtual void PostProcess(TPZVec<REAL> &loc, std::ostream &out = std::cout);
57 
59  void SetConvergence(int niter, REAL eps, bool ForceAllSteps = true);
60 
62  void SetSaveFrequency(int SaveFrequency, int resolution);
63 
65  void SetNewtonConvergence(int niter, REAL eps);
67  REAL &TimeStep();
68 
70  void SetInitialSolution(TPZFMatrix<STATE> & InitialSol);
72  void SetInitialSolutionAsZero();
73 
74 protected:
75 
77  REAL fTimeStep;
78 
80  REAL fSimulationTime;
81 
83  int fNIter;
84 
86  int fCurrentStep;
87 
89  REAL fSteadyTol;
90 
92  bool fForceAllSteps;
93 
95  int fSaveFrequency;
96 
98  int fDXResolution;
99 
101  int fNewtonMaxIter;
102 
104  REAL fNewtonTol;
105 
107  void SetLastState();
108 
110  void SetCurrentState();
111 
113  void SetAllMaterialsDeltaT();
114 
116  static double PressaoMedia(TPZBlackOilAnalysis &an, int matid);
118  static void Vazao(TPZBlackOilAnalysis &an, int matid, double & VazaoAguaSC, double & VazaoOleoSC, double & VazaoAguaFundo, double & VazaoOleoFundo);
119 };
120 
121 #endif
122 
123 #endif
Contains TPZAnalysis class which implements the sequence of actions to perform a finite element analy...
virtual void Solve()
Invert the stiffness matrix.
Definition: pzanalysis.cpp:352
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
Contains declaration of TPZCompEl class which defines the interface of a computational element...
Templated vector implementation.
virtual void Assemble()
Assemble the stiffness matrix and load vector.
Definition: pzanalysis.cpp:304
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual void PostProcess(int resolution)
Draw solution over mesh for all dimensions.
virtual void Run(std::ostream &out=std::cout)
Calls the appropriate sequence of methods to build a solution or a time stepping sequence.
Definition: pzanalysis.cpp:920
Implements Full Structural Matrices. Structural Matrix.
Definition: pzfstrmatrix.h:19
virtual void AssembleResidual()
Assemble the load vector.
Definition: pzanalysis.cpp:288
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
Derived class from TPZAnalysis implements non linear analysis (Newton&#39;s method). Analysis.
Contains TPZNonLinearAnalysis class which implements the non linear analysis.