31 PZError <<
"TPZMat1dLin.contr, inconsistent input data : phi.Cols() = " 32 << phi.
Cols() <<
" dphi.Cols + " << dphi.
Cols() <<
33 " phi.Rows = " << phi.
Rows() <<
" dphi.Rows = " <<
41 fForcingFunction->Execute(x,xfloat);
43 for(i=0; i<fXf.Rows(); i++) fXf(i,0) = xfloat[i];
48 for(
int in=0 ; in < phi.
Rows() ; ++in)
50 STATE tmpef = (phi(in,0)*weight);
52 ef.
AddSub(in*r,0,tmpTPZFMatrix1);
54 for(
int jn=0 ; jn<phi.
Rows() ; ++jn)
56 STATE temp = (phi(in,0)*phi(jn,0)*weight);
58 STATE temp2 = (dphi(0,in)*dphi(0,jn)*weight);
60 STATE temp3 = (phi(in,0)*dphi(0,jn)*weight);
62 ek.
AddSub(in*r,jn*c,submat);
77 PZError <<
"TPZMat1dLin.apply_bc warning : this material didn't create the boundary condition!\n";
81 PZError <<
"TPZMat1dLin.aplybc, unknown boundary condition type :" <<
82 bc.
Type() <<
" boundary condition ignored\n";
84 int bcv1r,bcv1c,bcv2r,bcv2c;
86 int numnod = ek.
Rows()/r;
95 PZError <<
"TPZMat1dLin.aplybc, incompatible number of degrees of " <<
97 " val1.Rows =" << bc.
Val1().
Rows() <<
" xk.Rows = " << fXk.Rows() <<
"\n" 98 " val2.Cols() = " << bc.
Val2().
Cols() <<
" val2.Rows() = " << bc.
Val2().
Rows() <<
"\n" 99 " val1.Cols() = " << bc.
Val1().
Cols() <<
"\n";
106 for(in=0 ; in<numnod ; ++in){
107 for(idf = 0;idf<r;idf++) {
108 (ef)(in*r+idf,0) += (STATE)gBigNumber*(STATE)phi(in,0)*bc.
Val2()(
idf,0)*(STATE)weight;
110 for(jn=0 ; jn<numnod ; ++jn) {
111 for(idf = 0;idf<r;idf++) {
112 ek(in*r+idf,jn*r+idf) += gBigNumber*phi(in,0)*phi(jn,0)*weight;
119 for(in=0 ; in<numnod ; ++in){
120 for(idf = 0;idf<r;idf++) {
121 (ef)(in*r+idf,0) += (STATE)phi(in,0)*bc.
Val2()(
idf,0)*(STATE)weight;
127 for(in=0 ; in<numnod ; ++in){
128 for(idf = 0;idf<r;idf++) {
129 (ef)(in*r+idf,0) += (STATE)phi(in,0)*bc.
Val2()(
idf,0)*(STATE)weight;
131 for(jn=0 ; jn<numnod ; ++jn) {
132 for(idf = 0;idf<r;idf++) {
133 for(jdf = 0;jdf<r;jdf++) {
134 ek(in*r+idf,jn*r+jdf) += bc.
Val1()(
idf,jdf)*(STATE)phi(in,0)*(STATE)phi(jn,0)*(STATE)weight;
145 out <<
"Material type TPZMat1dLin -- number = " << Id() <<
"\n";
146 out <<
"Matrix xk -> "; fXk.Print(
"fXk",out);
147 out <<
"Matrix xc -> "; fXc.Print(
"fXc",out);
148 out <<
"Matrix xb -> "; fXb.Print(
"fXb",out);
149 out <<
"Matrix xf -> "; fXf.Print(
"fXf",out);
154 int row = NStateVariables();
155 for(
int i=0; i<row; i++){
157 for(
int j=0; j<row; j++) {
158 fl[i] += -fXk(i,j)*dudx(0,j);
168 for(i=0; i<nelem; i++) udif[i] -= u_exact[i];
171 int r = NStateVariables();
174 for(idf=0; idf<r; idf++) {
175 dudif(0,idf) -= du_exact(0,idf);
180 for (idf=0; idf<r; idf++) {
181 values[1] +=
fabs(udif[idf]*udif[idf]);
182 for (
short jdf=0; jdf<r; jdf++) {
183 values[0] +=
fabs(dudif(0,idf)*fXk(idf,jdf)*dudif(0,jdf) + udif[idf]*fXb(idf,jdf)*udif[jdf]);
184 flux_el[
idf] -= fXk(idf,jdf)*dudx(0,jdf);
188 for (idf=0; idf<r; idf++) {
189 STATE dif = flux[
idf]-flux_el[
idf];
190 if(
std::abs(fXk(idf,idf)) >= 1.e-10)
virtual int AddSub(const int64_t sRow, const int64_t sCol, const TPZFMatrix< TVar > &Source)
It adds Source matrix on current matrix from position (sRow, sCol)
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)
void Print(std::ostream &out) override
Prints out the data associated with the material.
Templated vector implementation.
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Computes contribution to the stiffness matrix and right hand side at the integration point of a bound...
virtual void Flux(TPZVec< REAL > &x, TPZVec< STATE > &u, TPZFMatrix< STATE > &dudx, TPZFMatrix< REAL > &axes, TPZVec< STATE > &fl) override
Computes the value of the flux function to be used by ZZ error estimator.
TinyFad< 8, T > abs(const TinyFad< 8, T > &in)
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...
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
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
This class defines the boundary condition for TPZMaterial objects.
Contains declaration of TPZConnect class which represents a set of shape functions associated with a ...
int64_t Rows() const
Returns number of rows.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
TPZFMatrix< STATE > & Val1()
virtual int ClassId() const override
Define the class id associated with the class.
int32_t Hash(std::string str)
int ClassId() const override
Unique identifier for serialization purposes.
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Computes contribution to the stiffness matrix and right hand side at an integration point...
Contains the TPZMat1dLin class which implements a one-dimensional linear problem. ...
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.
int64_t NElements() const
Returns the number of elements of the vector.
#define PZError
Defines the output device to error messages and the DebugStop() function.
TPZMaterial * Material() const