NeoPZ
pzcoupledtransportdarcyBC.cpp
Go to the documentation of this file.
1 
7 #include "pzadmchunk.h"
8 #include "pzcmesh.h"
9 
12  this->SetId(id);
13  this->fMaterial = material;
14  this->fMaterials[0] = NULL;
15  this->fMaterials[1] = NULL;
16 }
17 
19 
21  REAL weight,
23  TPZFMatrix<STATE> &ef){
24 
25 
26  TPZBndCond * bc = this->GetCurrentMaterial();
27  if (!bc) return;
28  int numbersol = data.dsol.size();
29  if (numbersol != 1) {
30  DebugStop();
31  }
32  UpdateConvectionDir(data.dsol[0]);
33  bc->Contribute(data, weight, ek, ef);
34 }
35 
36 
38  REAL weight,
39  TPZFMatrix<STATE> &ef) {
40 
41  int numbersol = dataleft.dsol.size();
42  if (numbersol != 1) {
43  DebugStop();
44  }
45 
46 
47  TPZBndCond * bc = this->GetCurrentMaterial();
48  if (!bc) return;
49  this->UpdateConvectionDirInterface(dataleft.dsol[0], dataright.dsol[0], dataleft.phi, dataright.phi);
50  bc->ContributeInterface(data,dataleft, dataright, weight, ef);
51 }
52 
55  REAL weight,
57  TPZFMatrix<STATE> &ef){
58 
59  int numbersol = dataleft.dsol.size();
60  if (numbersol != 1) {
61  DebugStop();
62  }
63 
64  // TPZFMatrix<REAL> &dphi = data.dphix;
65  // TPZFMatrix<REAL> &dphiL = data.dphixl;
66  // TPZFMatrix<REAL> &dphiR = data.dphixr;
67  // TPZFMatrix<REAL> &phi = data.phi;
68  TPZFMatrix<REAL> &phiL = dataleft.phi;
69  TPZFMatrix<REAL> &phiR = dataright.phi;
70  // TPZManVector<REAL,3> &normal = data.normal;
71  // TPZManVector<REAL,3> &x = data.x;
72  // int &POrder=data.p;
73  // int &LeftPOrder=data.leftp;
74  // int &RightPOrder=data.rightp;
75  // TPZVec<REAL> &sol=data.sol;
76  // TPZVec<REAL> &solL=data.soll;
77  // TPZVec<REAL> &solR=data.solr;
78  // TPZFMatrix<REAL> &dsol=data.dsol;
79  TPZFMatrix<STATE> &dsolL=dataleft.dsol[0];
80  TPZFMatrix<STATE> &dsolR=dataright.dsol[0];
81  // REAL &faceSize=data.HSize;
82  // TPZFMatrix<REAL> &daxesdksi=data.daxesdksi;
83  // TPZFMatrix<REAL> &axes=data.axes;
84 
85 
86  TPZBndCond * bc = this->GetCurrentMaterial();
87  if (!bc) return;
88  this->UpdateConvectionDirInterface(dsolL, dsolR, phiL, phiR);
89  bc->ContributeInterface(data, dataleft, dataright, weight, ek, ef);
90 }
91 
93  TPZCoupledTransportDarcy * mat = dynamic_cast<TPZCoupledTransportDarcy*>(this->Material());
94  if (!mat){
95  PZError << __PRETTY_FUNCTION__ << " FATAL ERROR" << std::endl;
96  exit(-1);
97  }
98  mat->UpdateConvectionDir(dsol);
99 }
100 
102  TPZFMatrix<REAL> &phiL, TPZFMatrix<REAL> &phiR){
103  TPZCoupledTransportDarcy * mat = dynamic_cast<TPZCoupledTransportDarcy*>(this->Material());
104  if (!mat){
105  PZError << __PRETTY_FUNCTION__ << " FATAL ERROR" << std::endl;
106  exit(-1);
107  }
108  if (phiL.Rows()) mat->UpdateConvectionDir(dsolL);
109  if (phiR.Rows()) mat->UpdateConvectionDir(dsolR);
110 }
111 
113  return Hash("TPZCoupledTransportDarcyBC") ^ TPZBndCond::ClassId() << 1;
114 }
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...
Contains the TPZCoupledTransportDarcyBC class.
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual int ClassId() const override
Returns the unique identifier for reading/writing objects to streams.
Definition: pzbndcond.cpp:88
void UpdateConvectionDir(TPZFMatrix< STATE > &dsol)
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
Declarates the TPZBlock<REAL>class which implements block matrices.
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...
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
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...
Definition: pzbndcond.cpp:142
int64_t size() const
Returns the number of elements of the vector.
Definition: pzvec.h:196
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...
Definition: pzbndcond.cpp:174
virtual int ClassId() const override
Returns the unique identifier for reading/writing objects to streams.
void UpdateConvectionDir(TPZFMatrix< STATE > &dsol)
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
int64_t Rows() const
Returns number of rows.
Definition: pzmatrix.h:803
TPZMaterial * fMaterial
pointer to material which created bc
Definition: pzbndcond.h:104
Contains declaration of TPZCompMesh class which is a repository for computational elements...
void UpdateConvectionDirInterface(TPZFMatrix< STATE > &dsolL, TPZFMatrix< STATE > &dsolR, TPZFMatrix< REAL > &phiL, TPZFMatrix< REAL > &phiR)
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
Implements two equations where the second one requires the solution of the first. ...
TPZCoupledTransportDarcyBC(TPZCoupledTransportDarcy *material, int id)
void SetId(int id)
Definition: TPZMaterial.h:171
#define PZError
Defines the output device to error messages and the DebugStop() function.
Definition: pzerror.h:15
TPZMaterial * Material() const
Definition: pzbndcond.h:263