NeoPZ
pzmatorthotropic.h
Go to the documentation of this file.
1 
6 #ifndef ORTHOTROPICHPP
7 #define ORTHOTROPICHPP
8 
9 #include <iostream>
10 #include "TPZMaterial.h"
11 #include "pzfmatrix.h"
12 #include "pzvec.h"
13 
19 
20 
26 
27  public :
28 
29  TPZMatOrthotropic(int nummat,TPZFMatrix<STATE> naxes,STATE eppx,STATE eppy,
30  STATE eppz,STATE vxy,STATE vyz,STATE vzx,
31  STATE gxy,STATE gyz,STATE gzx);
32 
33  virtual ~TPZMatOrthotropic();
34 
36  fXf = xkin;
37  }
38 
39 // int Dimension() { return 3;}
40 
41  virtual int NStateVariables() const override;
42 
43  virtual void Print(std::ostream & out) override;
44 
45  virtual std::string Name() override { return "TPZMatOrthotropic"; }
46 
47  virtual void Contribute(TPZMaterialData &data,
48  REAL weight,
50  TPZFMatrix<STATE> &ef) override;
51 
52  virtual void ContributeBC(TPZMaterialData &data,
53  REAL weight,
56  TPZBndCond &bc) override;
57 
58  virtual void Contribute(TPZMaterialData &data,
59  REAL weight,
60  TPZFMatrix<STATE> &ef) override
61  {
62  TPZMaterial::Contribute(data,weight,ef);
63  }
64  virtual void ContributeBC(TPZMaterialData &data,
65  REAL weight,
67  TPZBndCond &bc) override
68  {
69  TPZMaterial::ContributeBC(data,weight,ef,bc);
70  }
71 
72  virtual int VariableIndex(const std::string &name) override;
73 
74  virtual int NSolutionVariables(int var) override;
75 
76  virtual int NFluxes() override { return 3;}
77 protected:
78  virtual void Solution(TPZVec<STATE> &Sol,TPZFMatrix<STATE> &DSol,TPZFMatrix<REAL> &axes,int var,TPZVec<STATE> &Solout) override;
79 public:
80  virtual void Solution(TPZMaterialData &data,int var,TPZVec<STATE> &Solout) override
81  {
82  int numbersol = data.sol.size();
83  if (numbersol != 1) {
84  DebugStop();
85  }
86  Solution(data.sol[0],data.dsol[0],data.axes,var,Solout);
87  }
88 
90  virtual void Flux(TPZVec<REAL> &x, TPZVec<STATE> &Sol, TPZFMatrix<STATE> &DSol, TPZFMatrix<REAL> &axes, TPZVec<STATE> &flux) override;
91 
94  TPZVec<STATE> &u_exact,TPZFMatrix<STATE> &du_exact,TPZVec<REAL> &values) override;//Cedric
95 
98  void Normalize(TPZFMatrix<STATE> &naxes);
99 };
100 
101 #endif
102 
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
TPZFMatrix< STATE > fKYZ
virtual void Print(std::ostream &out) override
Prints out the data associated with the material.
virtual std::string Name() override
Returns the name of the material.
clarg::argBool bc("-bc", "binary checkpoints", false)
void Normalize(TPZFMatrix< STATE > &naxes)
Verifies the consistency of the axles.
virtual int NSolutionVariables(int var) override
Returns the number of variables associated with the variable indexed by var.
Templated vector implementation.
TPZMatOrthotropic(int nummat, TPZFMatrix< STATE > naxes, STATE eppx, STATE eppy, STATE eppz, STATE vxy, STATE vyz, STATE vzx, STATE gxy, STATE gyz, STATE gzx)
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef) override
It computes a contribution to the residual vector at one integration point.
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout) override
Returns the solution associated with the var index based on the finite element approximation.
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
TPZFMatrix< STATE > fLocAxs
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)=0
It computes a contribution to the stiffness matrix and load vector at one integration point...
TPZFMatrix< STATE > fKZZ
TPZFMatrix< STATE > fKXY
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
TPZFMatrix< STATE > fKYY
Implements a orthotropic material.
int64_t size() const
Returns the number of elements of the vector.
Definition: pzvec.h:196
virtual ~TPZMatOrthotropic()
TPZFMatrix< STATE > fKZX
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
TPZFMatrix< STATE > fKYX
TPZFMatrix< STATE > fKZY
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)=0
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
virtual int VariableIndex(const std::string &name) override
virtual 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...
virtual void Flux(TPZVec< REAL > &x, TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux) override
Computes the value of the flux function to be used by ZZ error estimator.
void SetMaterial(TPZFMatrix< STATE > &xkin)
def values
Definition: rdt.py:119
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
It computes a contribution to the stiffness matrix and load vector at one integration point...
TPZFMatrix< STATE > fXf
virtual int NFluxes() override
Returns the number of components which form the flux function.
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
TPZSolVec sol
vector of the solutions at the integration point
TPZFMatrix< STATE > fKXZ
TPZFMatrix< STATE > fKXX
void Errors(TPZVec< REAL > &x, TPZVec< STATE > &u, TPZFMatrix< STATE > &dudx, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &values) override
Computes the error due to the difference between the interpolated flux and the flux computed based o...
virtual void Solution(TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) override