13 static LoggerPtr logger(Logger::getLogger(
"pz.material.bndcond"));
17 return Hash(
"TPZBndCond::TPZ_BCDefine");
47 refmaterial->
Clone(matvec);
48 refmatid = refmaterial->
Id();
49 newrefmaterial = matvec[refmatid];
51 std::map<int, TPZMaterial * >::iterator matit;
52 matit = matvec.find(matid);
53 if(matit == matvec.end())
56 matvec[matid] = newmat;
83 PZError << __PRETTY_FUNCTION__ <<
" - Huge problem. Both leftu and rightu contain elements. Wich one is the actual element neighbour to the Dirichlet boundary ?" << std::endl;
113 std::cout <<
" reading a boundary condition without material object!!\n";
115 LOGPZ_FATAL(logger,
"reading a boundary condition without material object!!");
133 for(
int i=0; i<3; i++) data.
normal[i] *= -1.;
183 for (
int i=0; i<3; i++) data.
normal[i] *= -1.;
198 int nel = dataleft.
size();
201 if(dataleft[0].phi.Rows() == 0){
204 for (
int i=0; i<3; i++) data.
normal[i] *= -1.;
221 for(
int i=0; i<3; i++) data.
normal[i] *= -1.;
262 this->
fBCVal2(i,0) = result[i];
266 int nbc =
fBCs.size();
267 for (
int ibc=0; ibc<nbc; ibc++) {
270 fBCs[ibc].fForcingFunction->Execute(x,result);
273 fBCs[ibc].fBCVal2(i,0) = result[i];
283 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" method is not implementedl!\n";
291 PZError <<
"\nUnable to call TPZBndCond::fMaterial::FillDataRequirements - fMaterial pointer is null!\n";
303 PZError <<
"\nUnable to call TPZBndCond::fMaterial::FillDataRequirements - fMaterial pointer is null!\n";
307 int nref = datavec.
size();
310 for(
int iref=0; iref<nref; iref++){
311 datavec[iref].fNeedsSol =
true;
318 int nref_left = datavec_left.
size();
319 for(
int iref = 0; iref<nref_left; iref++){
320 datavec_left[iref].SetAllRequirements(
false);
321 datavec_left[iref].fNeedsSol =
true;
322 datavec_left[iref].fNeedsNormal =
true;
324 int nref_right = datavec_right.
size();
325 for(
int iref = 0; iref<nref_right; iref++){
326 datavec_right[iref].SetAllRequirements(
false);
327 datavec_right[iref].fNeedsSol =
true;
328 datavec_right[iref].fNeedsNormal =
true;
void ContributeInterfaceErrors(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZVec< STATE > &nkL, TPZVec< STATE > &nkR, int &errorid) override
Defines the interface which material objects need to implement for discontinuous Galerkin formulation...
bool fLinearContext
Defines whether the equation context is linear solver or non linear.
virtual void Execute(const TPZVec< REAL > &x, TPZVec< TVar > &f, TPZFMatrix< TVar > &df)
Performs function computation.
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
int ClassId() const override
Unique identifier for serialization purposes.
TPZManVector< REAL, 3 > normal
normal to the element at the integration point
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
TPZAutoPointer< TPZFunction< STATE > > fBCForcingFunction
Pointer to bc forcing function, it is a variable boundary condition at differential equation...
clarg::argBool bc("-bc", "binary checkpoints", false)
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
TPZVec< TPZ_BCDefine > fBCs
TPZAutoPointer< TPZFunction< STATE > > fTimeDependentForcingFunction
Pointer to time dependent forcing function, it is the right member at differential equation...
virtual int ClassId() const override
Returns the unique identifier for reading/writing objects to streams.
virtual void ContributeInterfaceBCErrors(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZVec< STATE > &nk, TPZBndCond &bc, int &errorid)
Declarates the TPZBlock<REAL>class which implements block matrices.
TPZAutoPointer< TPZFunction< STATE > > fForcingFunctionExact
Pointer to exact solution function, needed to calculate exact error.
static TPZSavable * GetInstance(const int64_t &objId)
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
#define LOGPZ_FATAL(A, B)
Define log for fatal errors (cout)
This abstract class defines the behaviour which each derived class needs to implement.
static TPZAutoPointer< TPZSavable > GetAutoPointer(const int64_t &objId)
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
TPZAutoPointer< TPZFunction< STATE > > fTimedependentFunctionExact
Pointer to time dependent exact solution function, needed to calculate exact error.
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 size() const
Returns the number of elements of the vector.
virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
It computes a contribution to stiffness matrix and load vector at one integration point...
virtual void BCInterfaceJump(TPZVec< REAL > &x, TPZSolVec &leftu, TPZBndCond &bc, TPZSolVec &jump)
Computes interface jump from element to Dirichlet boundary condition. It has to reimplemented.
void Read(TPZStream &buf, void *context) override
read objects from the stream
void UpdateBCValues(TPZManVector< REAL, 3 > &x)
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...
virtual void Write(const bool val)
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
int ClassId() const override
Define the class id associated with the class.
TPZFNMatrix< 9, STATE > fBCVal1
first value of boundary condition
TPZBndCond()
Default constructor.
#define DebugStop()
Returns a message to user put a breakpoint in.
TPZAutoPointer< TPZFunction< STATE > > fTimedependentBCForcingFunction
Pointer to time dependent bc forcing function, it is a variable boundary condition at differential eq...
This class defines the boundary condition for TPZMaterial objects.
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 void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to stiffness matrix and load vector at one BC integration point...
virtual void InterfaceJump(TPZVec< REAL > &x, TPZSolVec &leftu, TPZSolVec &rightu, TPZSolVec &jump) override
Compute interface jumps.
void(* fValFunction)(TPZVec< REAL > &loc, TPZFMatrix< STATE > &Val1, TPZVec< STATE > &Val2, int &BCType)
Function to allow fBCVal1 to be variable.
TPZMaterial * fMaterial
pointer to material which created bc
virtual void ContributeBCInterface(TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)=0
It computes a contribution to stiffness matrix and load vector at one BC integration point...
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...
virtual void FillDataRequirementsInterface(TPZMaterialData &data, TPZVec< TPZMaterialData > &datavec_left, TPZVec< TPZMaterialData > &datavec_right) override
This method defines which parameters need to be initialized in order to compute the contribution of i...
int fType
boundary condition type
virtual void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
Contains declaration of TPZCompMesh class which is a repository for computational elements...
virtual void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
int32_t Hash(std::string str)
TPZAutoPointer< TPZFunction< STATE > > fForcingFunction
Pointer to forcing function, it is the right member at differential equation.
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
TPZFNMatrix< 6, STATE > fBCVal2
second value of boundary condition
virtual void FillDataRequirements(TPZMaterialData &data) override
Calls the aggregate material correspondent function.
int Dimension() const override
Returns the integrable dimension of the material.
void Read(TPZStream &buf, void *context) override
read objects from the stream
virtual void Clone(std::map< int, TPZMaterial * > &matvec) override
Creates a copy of the material object and put it in the vector which is passed on.
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.
Defines the interface for saving and reading data. Persistency.
int64_t NElements() const
Returns the number of elements of the vector.
TPZSolVec sol
vector of the solutions at the integration point
static void WritePointer(const TPZSavable *obj, TPZStream *stream)
Implements an interface to register a class id and a restore function. Persistence.
#define PZError
Defines the output device to error messages and the DebugStop() function.
TPZMaterial * Material() const
virtual void Read(bool &val)