75 fSymmetry(0.), fPenaltyType(
ENoPenalty), fPenaltyConstant(0.)
90 this->fSymmetry = -1.0;
95 this->fSymmetry = +1.0;
99 if (fSymmetry == -1.0)
return true;
100 if (fSymmetry == +1.0)
return false;
101 PZError << __PRETTY_FUNCTION__ <<
"\n Comparacao de numeros reais da errado\n";
152 for (
int i=0; i<
fDim; i++) {
154 fInvK(i,i) = 1./perm;
160 fPenaltyConstant = penalty;
165 fPermeabilityFunction = fp;
178 fTensorK.
Redim(dim,dim);
179 fInvK.
Redim(dim,dim);
180 for (
int i=0; i<dim; i++) {
187 virtual void Print(std::ostream & out)
override;
189 virtual std::string
Name()
override {
return "TPZMatLaplacian"; }
276 virtual int ClassId()
const override;
279 virtual void Write(
TPZStream &buf,
int withclassid)
const override;
Defines the interface which material objects need to implement for discontinuous Galerkin formulation...
virtual int VariableIndex(const std::string &name) override
virtual void Solution(TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) override
virtual int NFluxes() override
Returns the number of components which form the flux function.
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.
clarg::argBool bc("-bc", "binary checkpoints", false)
void GetParameters(STATE &diff, STATE &f) const
Return the values of constant diffusion and external flux.
STATE fXf
Forcing function value.
virtual void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
void SetBothPenalty()
Defines solution and flux penalty terms in ContributeInterface.
void InterfaceErrors(TPZVec< REAL > &, TPZVec< STATE > &leftu, TPZFMatrix< STATE > &leftdudx, TPZVec< STATE > &rightu, TPZFMatrix< STATE > &rightdudx, TPZVec< STATE > &, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &values, TPZVec< STATE > normal, STATE elsize)
void ErrorsHdiv(TPZMaterialData &data, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &values) override
void SetAllRequirements(bool set)
Set all flags at once.
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...
REAL fPenaltyConstant
Constant multiplier of penalty term, when required is set.
virtual TPZMaterial * NewMaterial() override
To create another material of the same type.
This class implements a simple vector storage scheme for a templated class T. Utility.
virtual void Solution(TPZVec< TPZMaterialData > &datavec, int var, TPZVec< STATE > &Solout) override
Returns the solution associated with the var index based on the finite element approximation.
virtual 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...
int fDim
Problem dimension.
virtual int ClassId() const override
Unique identifier for serialization purposes.
This abstract class defines the behaviour which each derived class needs to implement.
int Zero() override
Makes Zero all the elements.
virtual void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
void SetPermeabilityFunction(TPZAutoPointer< TPZFunction< STATE > > fp)
virtual void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
virtual REAL ComputeSquareResidual(TPZVec< REAL > &X, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol) override
Compute square of residual of the differential equation at one integration point. ...
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual int NEvalErrors() override
Returns the number of norm errors. Default is 3: energy, L2 and H1.
#define DebugStop()
Returns a message to user put a breakpoint in.
This class defines the boundary condition for TPZMaterial objects.
void SetSolutionPenalty()
Defines solution penalty terms in ContributeInterface.
void SetNonSymmetric()
Set material elliptic term as the Baumann's formulation, i.e. the non-symmetrical formulation...
EPenaltyType fPenaltyType
Penalty term definition.
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
virtual void FillDataRequirements(TPZMaterialData &data) override
Fill material data parameter with necessary requirements for the.
virtual std::string Name() override
Returns the name of the material.
void SetFluxPenalty()
Defines flux penalty terms in ContributeInterface.
void SetSymmetric()
Set material elliptic term as the global element method, i.e. the symmetrical formulation.
void SetValPenaltyConstant(REAL penalty)
virtual int IsInterfaceConservative() override
Dicontinuous galerkin materials implement contribution of discontinuous elements and interfaces...
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
void SetDimension(int dim)
virtual void Print(std::ostream &out) override
Prints out the data associated with the material.
virtual void BCInterfaceJump(TPZVec< REAL > &x, TPZSolVec &leftu, TPZBndCond &bc, TPZSolVec &jump) override
Computes interface jump from element to Dirichlet boundary condition.
TPZMatLaplacian(int matid)
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...
TPZMatLaplacian & operator=(const TPZMatLaplacian ©)
virtual ~TPZMatLaplacian()
TPZFNMatrix< 9, STATE > fInvK
STATE fK
Coeficient which multiplies the Laplacian operator.
virtual void Contribute(TPZVec< TPZMaterialData > &datavec, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
It computes a contribution to the stiffness matrix and load vector at one integration point to multip...
void SetNoPenalty()
Defines no penalty terms in ContributeInterface.
virtual 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...
virtual int NSolutionVariables(int var) override
Returns the number of variables associated with the variable indexed by var.
TPZAutoPointer< TPZFunction< STATE > > fPermeabilityFunction
Pointer to forcing function, it is the Permeability and its inverse.
virtual int Dimension() const override
Returns the integrable dimension of the material.
Defines the interface for saving and reading data. Persistency.
REAL fSymmetry
Symmetry coefficient of elliptic term.
virtual void FillBoundaryConditionDataRequirement(int type, TPZMaterialData &data) override
This method defines which parameters need to be initialized in order to compute the contribution of t...
EPenaltyType
Enumerate for penalty term definitions.
Contains the TPZDiscontinuousGalerkin class which implements the interface for discontinuous Galerkin...
virtual void ContributeHDiv(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
Compute the contribution at an integration point to the stiffness matrix of the HDiv formulation...
void SetParameters(STATE diff, STATE f)
Set a uniform diffusion constant and external flux.
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override=0
It computes a contribution to the stiffness matrix and load vector at one integration point...
virtual void ContributeBCHDiv(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)
void SetPermeability(REAL perm)
TPZFNMatrix< 9, STATE > fTensorK
Tensor de permeabilidade.
virtual void FillDataRequirementsInterface(TPZMaterialData &data) override
Fill material data parameter with necessary requirements for the ContributeInterface method...
#define PZError
Defines the output device to error messages and the DebugStop() function.
This class implements a reference counter mechanism to administer a dynamically allocated object...