28 out <<
"name of material : " <<
Name() <<
"\n";
29 out <<
"properties : \n";
30 out <<
"Material id = " <<
fNumMat << endl;
70 for(k=0;k<3;k++) normal[k] = axes(0,k);
72 for(
int in = 0; in < phr; in++ ) {
73 ef(in, 0) += weight *
fXf(0,0) * phi(in, 0) ;
74 for(
int jn = 0; jn < phr; jn++ ) {
76 for(k=0;k<dim;k++) sum +=dphi(k,in) * dphi(k,jn);
77 ek(in,jn) += weight * sum;
110 PZError <<
"TPZMat1dLin.apply_bc warning : this material didn't create the boundary condition!\n";
114 PZError <<
"TPZMat1dLin.aplybc, unknown boundary condition type :" <<
115 bc.
Type() <<
" boundary condition ignored\n";
120 int numnod = ek.
Rows()/numdof;
127 for(in=0 ; in<numnod ; ++in){
128 for(idf = 0;idf<r;idf++) {
131 for(jn=0 ; jn<numnod ; ++jn) {
132 for(idf = 0;idf<r;idf++) {
133 ek(in*r+idf,jn*r+idf) +=
gBigNumber*phi(in,0)*phi(jn,0)*weight;
140 for(in=0 ; in<numnod ; ++in){
141 for(idf = 0;idf<r;idf++) {
142 (ef)(in*r+idf,0) += phi(in,0)*bc.
Val2()(
idf,0)*weight;
148 for(in=0 ; in<numnod ; ++in){
149 for(idf = 0;idf<r;idf++) {
150 (ef)(in*r+idf,0) += phi(in,0)*bc.
Val2()(
idf,0)*weight;
152 for(jn=0 ; jn<numnod ; ++jn) {
153 for(idf = 0;idf<r;idf++) {
154 for(jdf = 0;jdf<r;jdf++) {
155 ek(in*r+idf,jn*r+jdf) += bc.
Val1()(
idf,jdf)*phi(in,0)*phi(jn,0)*weight;
165 if(!strcmp(
"Pressao",name.c_str()))
return 0;
166 if(!strcmp(
"Solution",name.c_str()))
return 1;
173 if(var == 0 || var == 1 || var == 2)
return 1;
180 cout <<
"TPZMatHybrid::Solution implementar Pressao\n";
192 if(
fabs(axes(2,0)) >= 1.e-6 ||
fabs(axes(2,1)) >= 1.e-6) {
193 cout <<
"TPZMatHybrid::Flux only serves for xy configuration\n";
204 for (
int i = 0; i < 3; i++)
207 values[0] = (dsol[0] - du_exact(0,0))*(dsol[0] - du_exact(0,0));
208 values[0] += (dsol[1] - du_exact(1,0))*(dsol[1] - du_exact(1,0));
210 values[1] = (dsol[0])*(dsol[0]);
211 values[1] += (dsol[1])*(dsol[1]);
213 values[2] = (du_exact(0,0))*(du_exact(0,0));
214 values[2] += (du_exact(1,0))*(du_exact(1,0));
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.
virtual std::string Name() override
Returns the name of the material.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ fabs
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual int VariableIndex(const std::string &name)
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)
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.
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
virtual void Print(std::ostream &out) override
Prints out the data associated with the material.
This abstract class defines the behaviour which each derived class needs to implement.
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
virtual int NSolutionVariables(int var) override
Returns the number of variables associated with the variable indexed by var.
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
Contains the TPZMatHybrid class.
This class defines the boundary condition for TPZMaterial objects.
int64_t Rows() const
Returns number of rows.
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
TPZFMatrix< STATE > & Val1()
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...
static REAL gBigNumber
Big number to penalization method, used for Dirichlet conditions.
virtual int VariableIndex(const std::string &name) override
virtual int NSolutionVariables(int var)
Returns the number of variables associated with the variable indexed by var.
virtual void Solution(TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) override
TPZAutoPointer< TPZFunction< STATE > > fForcingFunction
Pointer to forcing function, it is the right member at differential equation.
int64_t Cols() const
Returns number of cols.
virtual void Print(std::ostream &out) const
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 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...
#define PZError
Defines the output device to error messages and the DebugStop() function.
TPZMaterial * Material() const