NeoPZ
TPZTracerFlow.h
Go to the documentation of this file.
1 //
2 // TPZTracerFlow.h
3 
4 
5 #ifndef TPZTracerFlow_h
6 #define TPZTracerFlow_h
7 
8 #include <stdio.h>
9 #include "pzdiscgal.h"
10 #include "pzbndcond.h"
11 
13 
14 private:
15  // TODO:: Candidate for deletion
18 
20  int m_mat_id;
21 
24 
26  REAL m_dt;
27 
29  REAL m_phi;
30 
32 
33 public:
34 
36  TPZTracerFlow();
37 
39  TPZTracerFlow(int matid, int dimension);
40 
42  TPZTracerFlow(const TPZTracerFlow &other);
43 
45  TPZTracerFlow &operator=(const TPZTracerFlow &other);
46 
49 
51  virtual void FillDataRequirements(TPZVec<TPZMaterialData> &datavec) override ;
52 
54  virtual void FillBoundaryConditionDataRequirement(int type, TPZVec<TPZMaterialData> &datavec) override;
55 
56  virtual void FillDataRequirementsInterface(TPZMaterialData &data) override;
57 
58  virtual void FillDataRequirementsInterface(TPZMaterialData &data, TPZVec<TPZMaterialData > &datavec_left, TPZVec<TPZMaterialData > &datavec_right) override;
59 
61  virtual std::string Name() override{
62  return "TPZTracerFlow";
63  }
64 
66  int Dimension() const override {return m_dimension;}
67 
69  void SetDimension(int dim) { m_dimension = dim; }
70 
72  int NStateVariables() const override {return 1;} // Deprecated, must to be removed
73 
75  virtual TPZMaterial *NewMaterial() override
76  {
77  return new TPZTracerFlow(*this);
78  }
79 
81  void Print(std::ostream &out = std::cout) override;
82 
84  int VariableIndex(const std::string &name) override;
85 
87  int NSolutionVariables(int var) override;
88 
90  void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix<STATE> &ek, TPZFMatrix<STATE> &ef) override { DebugStop();}
91  void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix<STATE> &ek, TPZFMatrix<STATE> &ef, TPZBndCond &bc) override{DebugStop();}
92  void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix<STATE> &ek, TPZFMatrix<STATE> &ef) override{DebugStop();}
93  void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix<STATE> &ef,TPZBndCond &bc) override {DebugStop();}
95  void ContributeBC(TPZVec<TPZMaterialData> &datavec, REAL weight, TPZFMatrix<STATE> &ek, TPZFMatrix<STATE> &ef, TPZBndCond &bc) override {DebugStop();}
96 
97 
98  // Contribute Methods being used
99 
101  void Solution(TPZVec<TPZMaterialData> &datavec, int var, TPZVec<REAL> &Solout) override;
102 
103  void Contribute(TPZVec<TPZMaterialData> &datavec, REAL weight, TPZFMatrix<STATE> &ek, TPZFMatrix<STATE> &ef) override;
104 
105  void Contribute(TPZVec<TPZMaterialData> &datavec, REAL weight, TPZFMatrix<STATE> &ef) override;
106 
107  void ContributeInterface(TPZMaterialData &data, TPZVec<TPZMaterialData> &datavecleft, TPZVec<TPZMaterialData> &datavecright, REAL weight, TPZFMatrix<STATE> &ek,TPZFMatrix<STATE> &ef) override;
108 
109  void ContributeInterface(TPZMaterialData &data, TPZVec<TPZMaterialData> &datavecleft, TPZVec<TPZMaterialData> &datavecright, REAL weight, TPZFMatrix<STATE> &ef) override;
110 
111  void ContributeBCInterface(TPZMaterialData &data, TPZVec<TPZMaterialData> &datavecleft, REAL weight, TPZFMatrix<STATE> &ek, TPZFMatrix<STATE> &ef, TPZBndCond &bc) override;
112 
113  void ContributeBCInterface(TPZMaterialData &data, TPZVec<TPZMaterialData> &datavecleft, REAL weight, TPZFMatrix<STATE> &ef, TPZBndCond &bc);
114 
115 
119  int ClassId() const override;
120 
124  void Write(TPZStream &buf, int withclassid);
125 
129  void Read(TPZStream &buf, void *context) override;
130 
132  void SetMassMatrixAssembly(bool mass_matrix_Q){
133  m_mass_matrix_Q = mass_matrix_Q;
134  }
135 
138  return m_mass_matrix_Q;
139  }
140 
142  void SetTimeStep(REAL dt){
143  m_dt = dt;
144  }
145 
147  REAL GetTimeStep(){
148  return m_dt;
149  }
150 
152  void SetPorosity(REAL phi){
153  m_phi = phi;
154  }
155 
157  REAL GetPorosity(){
158  return m_phi;
159  }
160 
162  void SetFractureCrossLength(REAL fracture_epsilon){
163  m_fracture_epsilon = fracture_epsilon;
164  }
165 
168  return m_fracture_epsilon;
169  }
170 
171  REAL FractureFactor(TPZMaterialData & data);
172 
173 };
174 
175 #endif /* defined(TPZTracerFlow) */
Defines the interface which material objects need to implement for discontinuous Galerkin formulation...
Definition: pzdiscgal.h:20
void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
It computes a contribution to stiffness matrix and load vector at one integration point...
Definition: TPZTracerFlow.h:92
REAL m_dt
Regular time step size.
Definition: TPZTracerFlow.h:26
int ClassId() const override
void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to residual vector at one BC integration point.
Definition: TPZTracerFlow.h:93
virtual void FillDataRequirementsInterface(TPZMaterialData &data) override
Fill material data parameter with necessary requirements for the ContributeInterface method...
clarg::argBool bc("-bc", "binary checkpoints", false)
REAL m_phi
Porosity.
Definition: TPZTracerFlow.h:29
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
void SetTimeStep(REAL dt)
Set regular time step size.
int m_mat_id
material dimension
Definition: TPZTracerFlow.h:20
int NSolutionVariables(int var) override
Returns the number of variables associated with varindex.
int VariableIndex(const std::string &name) override
Returns the variable index associated with the name.
virtual void FillBoundaryConditionDataRequirement(int type, TPZVec< TPZMaterialData > &datavec) override
Set the required data at each integration point.
This class implements a simple vector storage scheme for a templated class T. Utility.
Definition: pzgeopoint.h:19
virtual void FillDataRequirements(TPZVec< TPZMaterialData > &datavec) override
Set the required data at each integration point.
bool m_mass_matrix_Q
Directive that stands for Mass matrix assembly.
Definition: TPZTracerFlow.h:23
void Print(std::ostream &out=std::cout) override
Print out the data associated with the material.
void Write(TPZStream &buf, int withclassid)
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
REAL m_fracture_epsilon
Definition: TPZTracerFlow.h:31
void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to stiffness matrix and load vector at one BC integration point...
Definition: TPZTracerFlow.h:94
int m_dimension
material dimension
Definition: TPZTracerFlow.h:17
int Dimension() const override
Returns the integrable dimension of the material.
Definition: TPZTracerFlow.h:66
TPZTracerFlow & operator=(const TPZTracerFlow &other)
Assignment operator.
~TPZTracerFlow()
Default destructor.
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
virtual std::string Name() override
Returns the name of the material.
Definition: TPZTracerFlow.h:61
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
REAL GetFractureCrossLength()
Get fracture cross length.
void SetPorosity(REAL phi)
Set porosity.
void SetDimension(int dim)
Sets material dimension.
Definition: TPZTracerFlow.h:69
void SetFractureCrossLength(REAL fracture_epsilon)
Set fracture cross length.
void Read(TPZStream &buf, void *context) override
REAL GetPorosity()
Get porosity.
void Solution(TPZVec< TPZMaterialData > &datavec, int var, TPZVec< REAL > &Solout) override
Returns the solution associated with the var index.
bool GetMassMatrixAssembly()
Set directive that stands for Mass matrix assembly.
int NStateVariables() const override
Returns the number of state variables associated with the material.
Definition: TPZTracerFlow.h:72
REAL GetTimeStep()
Get regular time step size.
void SetMassMatrixAssembly(bool mass_matrix_Q)
Set directive that stands for Mass matrix assembly.
void ContributeBC(TPZVec< TPZMaterialData > &datavec, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to the stiffness matrix and load vector at one BC integration point to mul...
Definition: TPZTracerFlow.h:95
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
Contains the TPZDiscontinuousGalerkin class which implements the interface for discontinuous Galerkin...
void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
Definition: TPZTracerFlow.h:91
TPZTracerFlow()
Default constructor.
REAL FractureFactor(TPZMaterialData &data)
virtual TPZMaterial * NewMaterial() override
Returns material copied form this object.
Definition: TPZTracerFlow.h:75
void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Not used contribute methods.
Definition: TPZTracerFlow.h:90