18 static LoggerPtr logdata(Logger::getLogger(
"pz.mixedpoisson.data"));
19 static LoggerPtr logerror(Logger::getLogger(
"pz.mixedpoisson.error"));
46 out <<
"name of material : " <<
Name() <<
"\n";
48 out <<
"rho = " <<
fRho << std::endl;
55 int nref = datavec.
size();
57 std::cout <<
" Erro. The size of the datavec is different from 2 \n";
73 STATE pressureN = datavec[1].sol[0][0];
85 for(
int id=0;
id<
fDim;
id++){
86 for(
int jd=0; jd<
fDim; jd++){
88 PermTensor(
id,jd) = resultMat(
id,jd);
89 InvPermTensor(
id,jd) = resultMat(
id+fDim,jd);
103 phrq = datavec[0].fVecShapeIndex.
NElements();
106 if(phrp+phrq != ek.
Rows())
112 for(
int iq=0; iq<phrq; iq++)
115 int ivecind = datavec[0].fVecShapeIndex[iq].first;
116 int ishapeind = datavec[0].fVecShapeIndex[iq].second;
118 for(
int id=0;
id<3;
id++){
119 ivec(
id,0) = datavec[0].fNormalVec(
id,ivecind);
127 for (
int jq=0; jq<phrq; jq++)
130 int jvecind = datavec[0].fVecShapeIndex[jq].first;
131 int jshapeind = datavec[0].fVecShapeIndex[jq].second;
133 for(
int id=0;
id<3;
id++){
134 jvec(
id,0) = datavec[0].fNormalVec(
id,jvecind);
139 for(
int id=0;
id<3;
id++){
140 for(
int jd=0; jd<3; jd++){
141 jvecZ(
id,0) += InvPermTensor(
id,jd)*jvec(jd,0);
145 REAL prod1 = ivec(0,0)*jvecZ(0,0) + ivec(1,0)*jvecZ(1,0) + ivec(2,0)*jvecZ(2,0);
146 ek(iq,jq) +=
fvisc*weight*phiQ(ishapeind,0)*phiQ(jshapeind,0)*prod1;
152 for(
int iq=0; iq<phrq; iq++)
154 int ivecind = datavec[0].fVecShapeIndex[iq].first;
155 int ishapeind = datavec[0].fVecShapeIndex[iq].second;
158 for(
int id=0;
id<3;
id++){
159 ivec(
id,0) = datavec[0].fNormalVec(
id,ivecind);
162 datavec[0].axes.Multiply(ivec,axesvec);
165 for(
int iloc=0; iloc<
fDim; iloc++)
167 divwq += axesvec(iloc,0)*dphiQ(iloc,ishapeind);
169 for (
int jp=0; jp<phrp; jp++) {
171 REAL fact = (-1.)*weight*phip(jp,0)*divwq;
173 ek(iq, phrq+jp) += fact;
176 ek(phrq+jp,iq) += fact;
181 for (
int ip=0; ip<phrp; ip++) {
182 for (
int jp=0; jp < phrp; jp++) {
183 ek(phrq+ip,phrq+jp) += (-1.)*weight*phip(ip,0)*phip(jp,0)*
fRho/
fDeltaT;
188 for(
int ip=0; ip<phrp; ip++){
189 ef(phrq+ip,0) += (-1.)*weight*
fRho*pressureN/
fDeltaT*phip(ip,0);
199 int nref = datavec.
size();
201 std::cout <<
" Erro. The size of the datavec is different from 2 \n";
213 phrq = datavec[0].fVecShapeIndex.
NElements();
215 STATE pressureN = datavec[1].sol[0][0];
218 for(
int ip=0; ip<phrp; ip++){
219 ef(phrq+ip,0) += (-1.)*weight*
fRho*pressureN/
fDeltaT*phip(ip,0);
227 int nref = datavec.
size();
229 std::cout <<
" Erro.!! datavec tem que ser de tamanho 2 \n";
232 if (bc.
Type() > 2 ) {
233 std::cout <<
" Erro.!! Neste material utiliza-se apenas condicoes de Neumann e Dirichlet\n";
239 int phrq = phiQ.
Rows();
256 for(
int iq=0; iq<phrq; iq++)
259 ef(iq,0) += (-1.)*v2*phiQ(iq,0)*weight;
265 for(
int iq=0; iq<phrq; iq++)
268 for (
int jq=0; jq<phrq; jq++) {
270 ek(iq,jq)+=
gBigNumber*phiQ(iq,0)*phiQ(jq,0)*weight;
276 for(
int iq = 0; iq < phrq; iq++) {
278 ef(iq,0) += v2*phiQ(iq,0)*weight;
279 for (
int jq = 0; jq < phrq; jq++) {
280 ek(iq,jq) += weight*bc.
Val1()(0,0)*phiQ(iq,0)*phiQ(jq,0);
292 int nref = datavec.
size();
293 for(
int i = 0; i<nref; i++ )
295 datavec[i].SetAllRequirements(
false);
296 datavec[i].fNeedsNeighborSol =
false;
297 datavec[i].fNeedsNeighborCenter =
false;
298 datavec[i].fNeedsNormal =
false;
299 datavec[i].fNeedsHSize =
false;
301 datavec[1].fNeedsSol =
true;
virtual void Execute(const TPZVec< REAL > &x, TPZVec< TVar > &f, TPZFMatrix< TVar > &df)
Performs function computation.
TPZFNMatrix< 9, REAL > fInvK
inverse of the permeability tensor.
REAL fvisc
fluid viscosity
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.
Implements a vector class which allows to use external storage provided by the user. Utility.
virtual void ContributeBC(TPZVec< TPZMaterialData > &datavec, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)
It computes a contribution to the stiffness matrix and load vector at one BC integration point to mul...
virtual std::string Name()
Returns the name of the material.
clarg::argBool bc("-bc", "binary checkpoints", false)
int Dimension() const override
Returns the integrable dimension of the material.
virtual ~TPZMixedPoissonParabolic()
This class implements a simple vector storage scheme for a templated class T. Utility.
virtual void Print(std::ostream &out)
Prints out the data associated with the material.
TPZFMatrix< STATE > & Val2(int loadcase=0)
TPZMixedPoissonParabolic()
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
TPZAutoPointer< TPZFunction< STATE > > & ForcingFunction()
Returns a procedure as source function for the material.
int Zero() override
Makes Zero all the elements.
int64_t size() const
Returns the number of elements of the vector.
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
This class defines the boundary condition for TPZMaterial objects.
int64_t Rows() const
Returns number of rows.
void FillDataRequirements(TPZVec< TPZMaterialData > &datavec)
Fill material data parameter with necessary requirements for the Contribute method. Here, in base class, all requirements are considered as necessary. Each derived class may optimize performance by selecting only the necessary data.
TPZFMatrix< STATE > & Val1()
REAL ff
Forcing function value.
virtual int HasForcingFunction()
Directive that gives true if the material has a forcing function.
static REAL gBigNumber
Big number to penalization method, used for Dirichlet conditions.
Material to solve a mixed poisson problem 2d by multiphysics simulation.
virtual void Contribute(TPZVec< TPZMaterialData > &datavec, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
It computes a contribution to the stiffness matrix and load vector at one integration point to multip...
TPZFNMatrix< 9, REAL > fTensorK
permeability tensor. Coeficient which multiplies the gradient operator
TPZAutoPointer< TPZFunction< STATE > > fPermeabilityFunction
post-processing procedure for error estimation as Ainsworth
TPZAutoPointer< TPZFunction< STATE > > fForcingFunction
Pointer to forcing function, it is the right member at differential equation.
int fDim
Problem dimension.
int64_t NElements() const
Returns the number of elements of the vector.
virtual void Print(std::ostream &out) override
Prints out the data associated with the material.
Material to solve a mixed time dependent poisson problem 2d by multiphysics simulation.
bool fIsStabilized
Choose Stabilized method.
TPZMixedPoissonParabolic & operator=(const TPZMixedPoissonParabolic ©)
TPZMixedPoisson & operator=(const TPZMixedPoisson ©)