39 out <<
"\n" << this->
Name() <<
"\n";
40 out <<
"fXf = " <<
fXf <<
"\n";
41 out <<
"fBetaZero = " <<
fBetaZero <<
"\n";
54 const int nshape = phi.
Rows();
73 for(
int in = 0; in < nshape; in++ ) {
74 ef(in, 0) += weight * Fval * phi(in,0);
75 for(
int jn = 0; jn < nshape; jn++ ) {
79 for(
int k =0; k<
mydim; k++){
80 temp += dphi(k,in) * dphi(k,jn);
82 ek(in,jn) += weight*temp;
100 const int nshape = phi.
Rows();
102 valBC = bc.
Val2()(0,0);
112 for(
int i = 0; i < nshape; i++){
113 ef(i,0) += weight *
gBigNumber * phi(i,0) * valBC;
114 for (
int j = 0; j < nshape; j++){
115 ek(i,j) += weight *
gBigNumber * phi(i,0) * phi(j,0);
127 for(
int i = 0; i < nshape; i++) {
128 ef(i,0) += weight*phi(i,0)*valBC;
148 const REAL faceSize = data.
HSize;
149 const REAL beta = this->
Beta(data.
p,faceSize);
151 const int nshapeL = phiL.
Rows();
152 const int nshapeR = phiR.
Rows();
158 const REAL theta = +1;
165 for(
int il = 0; il < nshapeL; il++){
166 for(
int jl = 0; jl < nshapeL; jl++){
170 for(
int k=0; k<
mydim; k++){
171 temp += dphiL(k,jl)*normal[k];
173 ek(il,jl) += weight * (-1.)* temp * phiL(il,0);
178 for(
int il = 0; il < nshapeL; il++){
179 for(
int jl = 0; jl < nshapeL; jl++){
183 for(
int k=0; k<
mydim; k++){
184 temp += dphiL(k,il)*normal[k];
186 ek(il,jl) += weight * theta * (-1.)* temp * phiL(jl,0);
191 for(
int il = 0; il < nshapeL; il++){
192 for(
int jr = 0; jr < nshapeR; jr++){
196 for(
int k=0; k<
mydim; k++){
197 temp += dphiL(k,il)*normal[k];
199 ek(il,nshapeL+jr) += weight * theta * (+1.)* temp * phiR(jr,0);
204 for(
int il = 0; il < nshapeL; il++){
205 for(
int jl = 0; jl < nshapeL; jl++){
206 ek(il,jl) += weight * beta * phiL(il,0) * phiL(jl,0);
211 for(
int il = 0; il < nshapeL; il++){
212 for(
int jr = 0; jr < nshapeR; jr++){
213 ek(il,nshapeL+jr) += weight * (-1.) * beta * phiL(il,0) * phiR(jr,0);
218 for(
int ir = 0; ir < nshapeR; ir++){
219 for(
int jl = 0; jl < nshapeL; jl++){
224 for(
int k=0; k<
mydim; k++){
225 temp += dphiL(k,jl)*normal[k];
227 ek(nshapeL+ir,jl) += weight * temp * phiR(ir,0);
228 ek(nshapeL+ir,jl) += weight * (-beta) * phiL(jl,0) * phiR(ir,0);
234 for(
int i = 0; i < nshapeR; i++ ) {
235 for(
int j = 0; j < nshapeR; j++ ) {
236 ek(i+nshapeL,j+nshapeL) += weight * (beta) * phiR(i,0) * phiR(j,0);
254 if(!strcmp(
"Solution",name.c_str()))
return 1;
255 if(!strcmp(
"ExactSolution",name.c_str()))
return 2;
256 if(!strcmp(
"Grad",name.c_str()))
return 3;
257 if(!strcmp(
"ExactGrad",name.c_str()))
return 4;
262 if(var == 1 || var==99 || var==2)
return 1;
263 if(var == 3 || var==4)
return Dimension();
271 Solout[0] = data.
sol[0][0];
287 Solout[0] = solExata[0];
296 Solout[id] = dsoldx(
id,0);
304 for(
id=0 ;
id<
mydim;
id++) {
305 Solout[id] = flux(
id,0);
320 if (dudx.Rows() <
mydim) {
325 values[1] = (u[0] - u_exact[0])*(u[0] - u_exact[0]);
328 for(
int i = 0; i <
mydim; i++){
329 values[2] += (dudx(i,0) - du_exact(i,0))*(dudx(i,0) - du_exact(i,0));
332 values[0] = values[1]+values[2];
Defines the interface which material objects need to implement for discontinuous Galerkin formulation...
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
virtual void Execute(const TPZVec< REAL > &x, TPZVec< TVar > &f, TPZFMatrix< TVar > &df)
Performs function computation.
Contains the TPZMatLaplacian class.
int ClassId() const override
Unique identifier for serialization purposes.
TPZManVector< REAL, 3 > normal
normal to the element at the integration point
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
Implements a vector class which allows to use external storage provided by the user. Utility.
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual int Dimension() const override
Returns the integrable dimension of the material.
REAL fXf
Forcing function value.
virtual int VariableIndex(const std::string &name)
Returns the variable index associated with the name.
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
virtual int VariableIndex(const std::string &name) override
Returns the variable index associated with the name.
TPZFMatrix< STATE > & Val2(int loadcase=0)
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
int p
maximum polinomial order of the shape functions
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
virtual void Print(std::ostream &out=std::cout)
Prints out the data associated with the material.
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.
virtual int ClassId() const override
Unique identifier for serialization purposes.
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
TPZAutoPointer< TPZFunction< STATE > > & ForcingFunction()
Returns a procedure as source function for the material.
REAL Beta(int p, REAL size) const
virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
void
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
void
#define DebugStop()
Returns a message to user put a breakpoint in.
TPZAutoPointer< TPZFunction< STATE > > fForcingFunctionExact
Pointer to exact solution function, needed to calculate exact error.
This class defines the boundary condition for TPZMaterial objects.
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...
int64_t Rows() const
Returns number of rows.
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...
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
REAL HSize
measure of the size of the element
virtual int HasForcingFunction()
Directive that gives true if the material has a forcing function.
static REAL gBigNumber
Big number to penalization method, used for Dirichlet conditions.
int32_t Hash(std::string str)
virtual int NSolutionVariables(int var) override
Returns the number of variables associated with the variable indexed by var.
virtual ~TPZMatDualHybridPoisson() override
virtual void Print(std::ostream &out) override
Prints out the data associated with the material.
virtual int NSolutionVariables(int var)
Returns the number of variables associated with the variable indexed by var.
TPZAutoPointer< TPZFunction< STATE > > fForcingFunction
Pointer to forcing function, it is the right member at differential equation.
void Fill(const T ©, const int64_t from=0, const int64_t numelem=-1)
Will fill the elements of the vector with a copy object.
int64_t Cols() const
Returns number of cols.
TPZMatDualHybridPoisson()
virtual void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
void
TPZSolVec sol
vector of the solutions at the integration point
virtual std::string Name() override
Returns the name of the material.
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...