NeoPZ
pzhybridpoisson.cpp
Go to the documentation of this file.
1 //
2 // mixedpoisson.cpp
3 // PZ
4 //
5 // Created by Agnaldo Farias on 5/28/12.
6 // Copyright (c) 2012 LabMec-Unicamp. All rights reserved.
7 //
8 
9 #include "pzhybridpoisson.h"
10 #include "pzlog.h"
11 #include "pzbndcond.h"
12 #include "pzfmatrix.h"
13 #include "pzaxestools.h"
14 
15 
16 #include <iostream>
17 
18 #ifdef LOG4CXX
19 static LoggerPtr logdata(Logger::getLogger("pz.hybridpoisson"));
20 #endif
21 
23 }
24 
25 TPZHybridPoisson::TPZHybridPoisson(int matid, int dim): TPZMatPoisson3d(matid,dim){
26 
27 }
28 
30 }
31 
32 
33 void TPZHybridPoisson::Print(std::ostream &out) {
34  out << "name of material : " << Name() << "\n";
35  out << "Base Class properties :";
36  TPZMaterial::Print(out);
37  out << "\n";
38 }
39 
51 {
53  DebugStop();
54  }
55  // loop over the flux functions
56  int nvec = dataleft.fVecShapeIndex.size();
57  int npressure = dataleft.numberdualfunctions;
58  int nlagrange = dataright.phi.Rows();
59  for (int ivec=0; ivec<nvec; ivec++) {
60  int vec = dataleft.fVecShapeIndex[ivec].first;
61  int ish = dataleft.fVecShapeIndex[ivec].second;
62  REAL normal = 0.;
63  for (int in=0; in<3; in++) {
64  normal += data.normal[in]*dataleft.fNormalVec(in,vec);
65  }
66  REAL normalishape = normal * dataleft.phi(ish,0);
67  for (int jlagr=0; jlagr < nlagrange; jlagr++) {
68  ek(ivec,nvec+npressure+jlagr) += weight*normalishape*dataright.phi(jlagr,0);
69  ek(nvec+npressure+jlagr,ivec) += weight*normalishape*dataright.phi(jlagr,0);
70  }
71  }
72  // compute their normal component
73  // loop over the pressure functions
74  // contribute the Langrange multiplier
75 
76 }
77 
88 {
90  DebugStop();
91  }
92  DebugStop();
93 
94 }
95 
96 
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.
virtual std::string Name()
Returns the name of the material.
MShapeFunctionType fShapeType
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
virtual void Print(std::ostream &out=std::cout)
Prints out the data associated with the material.
virtual void Print(std::ostream &out)
Prints out the data associated with the material.
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
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)
It computes a contribution to stiffness matrix and load vector at one integration point...
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
TPZFNMatrix< 180 > fNormalVec
list of normal vectors
int64_t Rows() const
Returns number of rows.
Definition: pzmatrix.h:803
int numberdualfunctions
number of dual function (e.g. pressure in HDiv approximations)
DESCRIBE PLEASE.
Definition: pzpoisson3d.h:26
Contains declaration of the TPZAxesTools class which implements verifications over axes...
virtual ~TPZHybridPoisson()
TPZManVector< std::pair< int, int64_t > > fVecShapeIndex
correspondence between normal vector index and index of the shape functions