28 out <<
"name of material : " <<
Name() <<
"\n";
29 out <<
"properties : \n";
30 out <<
"Material id = " <<
fNumMat << endl;
48 for(
int in = 0; in < phr; in++ ) {
49 ef(in, 0) += weight *
fXf(0,0) * phi(in, 0) ;
50 for(
int jn = 0; jn < phr; jn++ ) {
51 ek(in,jn) += weight * (dphi(0,in) * dphi(0,jn) + dphi(1,in) * dphi(1,jn));
64 PZError <<
"TPZMat1dLin.apply_bc warning : this material didn't create the boundary condition!\n";
68 PZError <<
"TPZMat1dLin.aplybc, unknown boundary condition type :" <<
69 bc.
Type() <<
" boundary condition ignored\n";
74 int numnod = ek.
Rows()/numdof;
81 for(in=0 ; in<numnod ; ++in){
82 for(idf = 0;idf<r;idf++) {
85 for(jn=0 ; jn<numnod ; ++jn) {
86 for(idf = 0;idf<r;idf++) {
87 ek(in*r+idf,jn*r+idf) +=
gBigNumber*phi(in,0)*phi(jn,0)*weight;
94 for(in=0 ; in<numnod ; ++in){
95 for(idf = 0;idf<r;idf++) {
96 (ef)(in*r+idf,0) += phi(in,0)*bc.
Val2()(
idf,0)*weight;
102 for(in=0 ; in<numnod ; ++in){
103 for(idf = 0;idf<r;idf++) {
104 (ef)(in*r+idf,0) += phi(in,0)*bc.
Val2()(
idf,0)*weight;
106 for(jn=0 ; jn<numnod ; ++jn) {
107 for(idf = 0;idf<r;idf++) {
108 for(jdf = 0;jdf<r;jdf++) {
109 ek(in*r+idf,jn*r+jdf) += bc.
Val1()(
idf,jdf)*phi(in,0)*phi(jn,0)*weight;
119 if(!strcmp(
"Displacement6",name.c_str()))
return 0;
120 if(!strcmp(
"Solution",name.c_str()))
return 1;
121 if(!strcmp(
"Derivate",name.c_str()))
return 2;
122 if(!strcmp(
"POrder",name.c_str()))
return 99;
129 if(var == 0 || var == 1 || var == 2)
return 1;
135 if(var == 0 || var == 1) {
140 Solout[0] = DSol(0,0);
141 Solout[1] = DSol(1,0);
148 if(
fabs(axes(2,0)) >= 1.e-6 ||
fabs(axes(2,1)) >= 1.e-6) {
149 cout <<
"TPZMaterialTest::Flux only serves for xy configuration\n";
161 for (
int i = 0; i < 3; i++)
164 values[0] = (dsol[0] - du_exact(0,0))*(dsol[0] - du_exact(0,0));
165 values[0] += (dsol[1] - du_exact(1,0))*(dsol[1] - du_exact(1,0));
167 values[1] = (dsol[0])*(dsol[0]);
168 values[1] += (dsol[1])*(dsol[1]);
170 values[2] = (du_exact(0,0))*(du_exact(0,0));
171 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.
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 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...
virtual int VariableIndex(const std::string &name)
Returns the variable index associated with the name.
virtual void Print(std::ostream &out) override
Prints out the data associated with the material.
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
TPZFMatrix< STATE > & Val2(int loadcase=0)
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
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).
This class defines the boundary condition for TPZMaterial objects.
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...
int64_t Rows() const
Returns number of rows.
virtual void Solution(TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) 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...
TPZFMatrix< STATE > & Val1()
static REAL gBigNumber
Big number to penalization method, used for Dirichlet conditions.
virtual std::string Name() override
Returns the name of the material.
virtual ~TPZMaterialTest()
virtual void Flux(TPZVec< REAL > &x, TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux) override
Compute the value of the flux function to be used by ZZ error estimator.
virtual int NSolutionVariables(int var)
Returns the number of variables associated with the variable indexed by var.
Contains the TPZMaterialTest class. Test.
TPZAutoPointer< TPZFunction< STATE > > fForcingFunction
Pointer to forcing function, it is the right member at differential equation.
TPZMaterialTest(int nummat, STATE alfa, STATE x0)
virtual void Print(std::ostream &out) const
virtual int VariableIndex(const std::string &name) override
#define PZError
Defines the output device to error messages and the DebugStop() function.
TPZMaterial * Material() const