133 int nref = datavec.
size();
136 for(
int iref = 0; iref<nref; iref++){
137 datavec[iref].fNeedsSol =
true;
152 int nref_left = datavec_left.
size();
153 for(
int iref = 0; iref<nref_left; iref++){
154 datavec_left[iref].SetAllRequirements(
false);
156 int nref_right = datavec_right.
size();
157 for(
int iref = 0; iref<nref_right; iref++){
158 datavec_right[iref].SetAllRequirements(
false);
165 virtual std::string
Name() {
return "no_name"; }
200 if(numloadcases <= 0)
202 std::cout << __PRETTY_FUNCTION__ <<
" numloadcases " << numloadcases <<
" cannot be less or equal to zero\n";
205 fNumLoadCases = numloadcases;
212 if (index < 0 || index >= fNumLoadCases)
217 fPostProcIndex = index;
221 virtual void Print(std::ostream &out = std::cout);
370 fForcingFunction = fp;
378 fForcingFunction = loc;
381 else fForcingFunction = NULL;
390 fForcingFunction = loc;
393 else fForcingFunction = NULL;
407 fForcingFunctionExact = fp;
421 fTimeDependentForcingFunction = fp;
435 fTimedependentFunctionExact = fp;
449 fBCForcingFunction = fp;
463 fTimedependentBCForcingFunction = fp;
500 Errors(data.
x, data.
sol[0], data.
dsol[0], data.
axes, flux, u_exact, du_exact, errors );
515 PZError << __PRETTY_FUNCTION__ << std::endl;
516 PZError <<
"Method not implemented! Error comparison not available. Please, implement it." << std::endl;
519 PZError << __PRETTY_FUNCTION__ << std::endl;
520 PZError <<
"Nao sei o q fazer." << std::endl;
530 virtual void SetData(std::istream &data);
533 virtual void Clone(std::map<int, TPZMaterial * > &matvec);
542 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" - Method not implemented\n";
552 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" - Method not implemented\n";
bool fLinearContext
Defines whether the equation context is linear solver or non linear.
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
Contains declaration of the TPZSavable class which defines the interface to save and restore objects ...
int fNumLoadCases
Defines the number of load cases generated by this material.
virtual void Errors(TPZMaterialData &data, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &errors)
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
TPZAutoPointer< TPZFunction< STATE > > & TimedependentBCForcingFunction()
Returns a procedure as time variable boundary condition.
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual int HasBCForcingFunction()
Directive that gives true if the material has a bc forcing function exact.
TPZAutoPointer< TPZFunction< STATE > > fBCForcingFunction
Pointer to bc forcing function, it is a variable boundary condition at differential equation...
virtual REAL ComputeSquareResidual(TPZVec< REAL > &X, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol)
Computes square of residual of the differential equation at one integration point.
virtual void ErrorsHdiv(TPZMaterialData &data, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &values)
virtual TPZMaterial * NewMaterial()
To create another material of the same type.
Contains declaration of TPZCompEl class which defines the interface of a computational element...
void SetForcingFunction(void(*fp)(const TPZVec< REAL > &loc, TPZVec< STATE > &result, TPZFMatrix< STATE > &gradu), int porder)
Templated vector implementation.
TPZMaterial & operator=(const TPZMaterial ©)
operator =
void SetBCForcingFunction(TPZAutoPointer< TPZFunction< STATE > > fp)
Sets a procedure as variable boundary condition.
virtual int VariableIndex(const std::string &name)
Returns the variable index associated with the name.
void SetAllRequirements(bool set)
Set all flags at once.
bool GetLinearContext() const
Returns fLinearContext attribute.
virtual int Dimension() const =0
Returns the integrable dimension of the material.
virtual int NStateVariables() const =0
Returns the number of state variables associated with the material.
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
Declarates the TPZBlock<REAL>class which implements block matrices.
virtual void Errors(TPZVec< REAL > &x, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux, TPZVec< STATE > &uexact, TPZFMatrix< STATE > &duexact, TPZVec< REAL > &val)
Computes the error due to the difference between the interpolated flux and the flux computed based o...
virtual int MinimumNumberofLoadCases()
returns the minimum number of load cases for this material
This class implements a simple vector storage scheme for a templated class T. Utility.
REAL val(STATE &number)
Returns value of the variable.
TPZMaterial()
Default constructor.
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)=0
It computes a contribution to the stiffness matrix and load vector at one integration point...
Abstract class defining integration rules. Numerical Integration.
virtual void Print(std::ostream &out=std::cout)
Prints out the data associated with the material.
int fPostProcIndex
indicates which solution should be used for post processing
This abstract class defines the behaviour which each derived class needs to implement.
virtual void ContributeBC(TPZVec< TPZMaterialData > &datavec, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc)
It computes a contribution to the stiffness matrix and load vector at one BC integration point to mul...
virtual int FluxType()
To return a numerical flux type to apply over the interfaces of the elements.
TPZAutoPointer< TPZFunction< STATE > > fTimedependentBCForcingFunction
Pointer to time dependent bc forcing function, it is a variable boundary condition at differential eq...
TPZAutoPointer< TPZFunction< STATE > > & ForcingFunction()
Returns a procedure as source function for the material.
int64_t size() const
Returns the number of elements of the vector.
void SetForcingFunctionExact(TPZAutoPointer< TPZFunction< STATE > > fp)
Sets a procedure as exact solution for the problem.
virtual void Flux(TPZVec< REAL > &x, TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux)
Computes the value of the flux function to be used by ZZ error estimator.
virtual int IntegrationRuleOrder(int elPMaxOrder) const
Gets the order of the integration rule necessary to integrate an element with polinomial order p...
virtual int NEvalErrors()
Returns the number of norm errors. Default is 3: energy, L2 and H1.
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
virtual int NFluxes()
Returns the number of components which form the flux function.
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual void Errors(TPZVec< TPZMaterialData > &data, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &errors)
virtual void FillDataRequirements(TPZMaterialData &data)
Fill material data parameter with necessary requirements for the.
#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.
virtual int PushMemItem(int sourceIndex=-1)
Pushes a new entry in the context of materials with memory, returning its index at the internal stora...
This class defines the boundary condition for TPZMaterial objects.
void SetTimeDependentForcingFunction(TPZAutoPointer< TPZFunction< STATE > > fp)
Sets a procedure as time dependent source function for the material.
virtual int HasForcingFunctionExact()
Directive that gives true if the material has a function exact.
virtual void FreeMemItem(int index)
Frees an entry in the material with memory internal history storage.
virtual int HasTimedependentFunctionExact()
Directive that gives true if the material has a time dependent function exact.
virtual void ContributeErrors(TPZMaterialData &data, REAL weight, TPZVec< REAL > &nk, int &errorid)
int64_t Rows() const
Returns number of rows.
virtual void FillBoundaryConditionDataRequirement(int type, TPZMaterialData &data)
This method defines which parameters need to be initialized in order to compute the contribution of t...
virtual int HasTimedependentForcingFunction()
Directive that gives true if the material has a time dependent forcing function.
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
Contains declaration of the TPZAutoPointer class which has Increment and Decrement actions are mutexe...
void SetNumLoadCases(int numloadcases)
changes the number of load cases for this material
Contains the TPZMaterialData class which implements an interface between TPZCompEl::CalcStiff and TPZ...
virtual void FillDataRequirementsInterface(TPZMaterialData &data, TPZVec< TPZMaterialData > &datavec_left, TPZVec< TPZMaterialData > &datavec_right)
This method defines which parameters need to be initialized in order to compute the contribution of i...
virtual int HasForcingFunction()
Directive that gives true if the material has a forcing function.
virtual ~TPZMaterial()
Default destructor.
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)=0
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
void SetTimedependentBCForcingFunction(TPZAutoPointer< TPZFunction< STATE > > fp)
Sets a procedure as time variable boundary condition.
TPZAutoPointer< TPZFunction< STATE > > & TimeDependentForcingFunction()
Returns a procedure as time dependent source function for the material.
static REAL gBigNumber
Big number to penalization method, used for Dirichlet conditions.
TPZAutoPointer< TPZFunction< STATE > > fTimedependentFunctionExact
Pointer to time dependent exact solution function, needed to calculate exact error.
Contains TPZMatrix<TVar>class, root matrix class.
TPZAutoPointer< TPZFunction< STATE > > & BCForcingFunction()
Returns a procedure as variable boundary condition.
virtual int HasTimedependentBCForcingFunction()
Directive that gives true if the material has a time dependent bc forcing function.
int ClassId() const override
Unique identifier for serialization purposes.
virtual void Contribute(TPZVec< TPZMaterialData > &datavec, REAL weight, TPZFMatrix< STATE > &ef)
It computes a contribution to the stiffness matrix and load vector at one integration point to multip...
virtual TPZBndCond * CreateBC(TPZMaterial *reference, int id, int typ, TPZFMatrix< STATE > &val1, TPZFMatrix< STATE > &val2)
Creates an object TPZBndCond derived of TPZMaterial.
virtual int NSolutionVariables(int var)
Returns the number of variables associated with the variable indexed by var.
void SetPostProcessIndex(int index)
indicates which variable should be post processed
void SetForcingFunction(TPZAutoPointer< TPZFunction< STATE > > fp)
Sets a procedure as source function for the material.
void SetPolynomialOrder(int porder)
void SetForcingFunction(void(*fp)(const TPZVec< REAL > &loc, TPZVec< STATE > &result), int porder)
virtual void FillBoundaryConditionDataRequirement(int type, TPZVec< TPZMaterialData > &datavec)
This method defines which parameters need to be initialized in order to compute the contribution of t...
virtual std::string Name()
Returns the name of the material.
virtual void FillDataRequirementsInterface(TPZMaterialData &data)
This method defines which parameters need to be initialized in order to compute the contribution of i...
virtual void Clone(std::map< int, TPZMaterial * > &matvec)
Creates a copy of the material object and put it in the vector which is passed on.
TPZAutoPointer< TPZFunction< STATE > > fForcingFunction
Pointer to forcing function, it is the right member at differential equation.
int NumLoadCases()
returns the number of load cases for this material object
void SetTimeDependentFunctionExact(TPZAutoPointer< TPZFunction< STATE > > fp)
Sets a procedure as time dependent exact solution for the problem.
TPZAutoPointer< TPZFunction< STATE > > & TimedependentFunctionExact()
Returns a procedure as time dependent exact solution for the problem.
Defines the interface for saving and reading data. Persistency.
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
void SetLinearContext(bool IsLinear)
Sets fLinearContext attribute.
clarg::argInt porder("-porder", "polinomial order", 1)
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Defines the interface of a computational element. Computational Element.
TPZSolVec sol
vector of the solutions at the integration point
TPZAutoPointer< TPZFunction< STATE > > & ForcingFunctionExact()
Returns a procedure as exact solution for the problem.
#define PZError
Defines the output device to error messages and the DebugStop() function.
virtual void SetData(std::istream &data)
Reads data of the material from a istream (file data)
TPZVec< void(*)(const TPZVec< REAL > &, TPZVec< STATE > &) > GFORCINGVEC
Extern variable - Vector of force values.
TPZAutoPointer< TPZFunction< STATE > > fTimeDependentForcingFunction
Pointer to time dependent forcing function, it is the right member at differential equation...
This class implements a reference counter mechanism to administer a dynamically allocated object...