23 static LoggerPtr logger(Logger::getLogger(
"pz.integral.pzquad"));
44 out <<
"Cubature rule (" << namerule <<
") " << np <<
" : Order ( ";
45 for(
int i=0;i<Dimension();i++) out << order[i] <<
" ";
46 out <<
") \nNumber of points " << NPoints() << std::endl;
50 for(ip=0; ip<np; ip++) {
52 out <<
"ip " << ip <<
" pos " << pos <<
" w " << w << std::endl;
59 if(fIntP->Type() == 1)
65 if(fIntKsi->Type() == 1 || fIntEta->Type() == 1)
71 if(fIntKsi->Type() == 1 || fIntEta->Type() == 1 || fIntZeta->Type() == 1)
92 fOrdKsi = fIntP->
Order();
96 if(fIntP)
return fIntP->NInt();
97 PZError <<
"Null Pointer passed to method TPZInt1d::TPZInt1d(TPZGaussRule *)\n";
102 if((fIntP) && ((ip >= 0) && (ip < NPoints()))){
103 pos[0] = fIntP->Loc(ip);
108 PZError <<
"Null Pointer passed to method " <<
"TPZInt1d::TPZInt1d(TPZGaussRule *)\n";
109 if((ip < 0) || (ip >= NPoints()))
110 PZError <<
"ip = " << ip <<
", Out of Range: 0 -> " << NPoints() << std::endl;
115 std::cout <<
"TPZINt1d::SetOrder: NULL number of integration points specified\n";
118 if(ord[0] > GetRealMaxOrder())
119 ord[0] = GetRealMaxOrder();
122 fOrdKsi = fIntP->
Order();
133 fOrdKsi = fIntKsi->
Order();
134 fOrdEta = fIntEta->Order();
141 fOrdKsi = fIntKsi->
Order();
142 fOrdEta = fIntEta->Order();
146 if (!fIntKsi || !fIntEta){
147 PZError <<
"Null Pointer passed to method TPZInt1d::TPZInt1d(TPZGaussRule *)\n";
150 return (fIntKsi->NInt() * fIntEta->NInt());
156 if(pos.
size() == 1 || pos.
size() > 3 )
161 if((fIntEta) && (fIntKsi) && ((ip >= 0) && (ip < NPoints()))){
163 ik = ip/fIntEta->NInt();
164 ie = ip - (ip/fIntEta->NInt())*(fIntEta->NInt());
165 pos[0] = fIntKsi->Loc(ik);
166 pos[1] = fIntEta->Loc(ie);
167 w = fIntKsi->W(ik)*fIntEta->W(ie);
170 if(!fIntKsi || !fIntEta)
171 PZError <<
"Null Pointer passed to method " <<
"TPZInt1d::TPZInt1d(TPZGaussRule *)\n";
172 if((ip < 0) || (ip >= NPoints()))
173 PZError <<
"ip = " << ip <<
", Out of Range: 0 -> " << NPoints() << std::endl;
177 int prevtype = fIntKsi->Type();
178 if (fOrdKsi != ord[0] || type != prevtype) {
183 prevtype = fIntEta->
Type();
184 if (fOrdEta != ord[1] || prevtype != type) {
199 fOrdKsi = fIntKsi->
Order();
205 PZError <<
"Null Pointer passed to method TPZIntTriang::NPoints()\n";
210 return fIntKsi->NInt();
214 if((fIntKsi) && ((ip >= 0) && (ip < NPoints()))){
215 fIntKsi->Loc(ip, pos);
220 PZError <<
"Null Pointer passed to method " <<
"TPZIntTriang::Point(..)\n";
221 if((ip < 0) || (ip >= NPoints()))
222 PZError <<
"ip = " << ip <<
", Out of Range: 0 -> " << NPoints() << std::endl;
232 if(ord[1] > ord[0]) fOrdKsi = ord[1];
237 LOGPZ_WARN(logger,
"Integration rule for triangle - Order is bigger than NRULESTRIANGLE_ORDER (Max)");
244 fOrdKsi = fIntKsi->
Order();
257 fOrdKsi = fIntKsi->
Order();
258 fOrdEta = fIntEta->Order();
259 fOrdZeta = fIntZeta->Order();
263 if (!fIntKsi || !fIntEta|| !fIntZeta){
264 PZError <<
"Null Pointer passed to method TPZIntCube3D::NPoints()\n";
267 return (fIntKsi->NInt() * fIntEta->NInt() * fIntZeta->NInt());
271 if((fIntZeta) && (fIntEta) && (fIntKsi) && ((ip >= 0) && (ip < NPoints()))){
273 ik = ip % fIntKsi->NInt();
274 ie = (ip % (fIntKsi->NInt()*fIntEta->NInt()))/fIntKsi->NInt();
275 iz = ip/(fIntKsi->NInt()*fIntEta->NInt());
277 pos[0] = fIntKsi->Loc(ik);
278 pos[1] = fIntEta->Loc(ie);
279 pos[2] = fIntZeta->Loc(iz);
280 w = fIntKsi->W(ik)*fIntEta->W(ie)*fIntZeta->W(iz);
283 if(!fIntKsi || !fIntEta || !fIntZeta)
284 PZError <<
"Null Pointer passed to method " <<
"TPZIntCube3D::Point(..)\n";
285 if((ip < 0) || (ip >= NPoints()))
286 PZError <<
"ip = " << ip <<
", Out of Range: 0 -> " << NPoints() << std::endl;
296 fOrdKsi = fIntKsi->
Order();
297 fOrdEta = fIntEta->Order();
298 fOrdZeta = fIntZeta->Order();
310 fOrdKsi = fIntKsi->
Order();
315 PZError <<
"Null Pointer passed to method TPZIntTetra3D::NPoints()\n";
318 return fIntKsi->NInt();
322 if((fIntKsi) && ((ip >= 0) && (ip < NPoints()))) {
323 fIntKsi->Loc(ip, pos);
328 PZError <<
"Null Pointer passed to method " <<
"TPZIntTetra3D::Point(..)\n";
329 if((ip < 0) || (ip >= NPoints()))
330 PZError <<
"ip = " << ip <<
", Out of Range: 0 -> " << NPoints() << std::endl;
334 fOrdKsi = (ord[1] > ord[0]) ? ord[1] : ord[0];
335 fOrdKsi = (fOrdKsi > ord[2]) ? fOrdKsi : ord[2];
339 if(logger->isWarnEnabled())
341 std::stringstream sout;
342 sout <<
"Integration rule for tetrahedra - Order is bigger than NRULESTETRAHEDRA_ORDER (Max)";
351 fOrdKsi = fIntKsi->
Order();
363 fOrdKsi = fIntKsi->
Order();
368 PZError <<
"Null Pointer passed to method TPZIntPyram3D::NPoints()\n";
371 return fIntKsi->NInt();
375 if((fIntKsi) && ((ip >= 0) && (ip < NPoints()))) {
376 fIntKsi->Loc(ip, pos);
381 PZError <<
"Null Pointer passed to method " <<
"TPZIntPyram3D::Point(..)\n";
382 if((ip < 0) || (ip >= NPoints()))
383 PZError <<
"ip = " << ip <<
", Out of Range: 0 -> " << NPoints() << std::endl;
387 fOrdKsi = (ord[1] > ord[0]) ? ord[1] : ord[0];
388 fOrdKsi = (fOrdKsi > ord[2]) ? fOrdKsi : ord[2];
392 LOGPZ_WARN(logger,
"Integration rule for pyramid - Order is bigger than NRULESPYRAMID_ORDER (Max)");
398 fOrdKsi = fIntKsi->
Order();
424 if((ip >= 0) && (ip <
NPoints())) {
428 pos[0] = ps[0]; pos[1] = ps[1];
434 if((ip < 0) || (ip >=
NPoints()))
435 PZError <<
"ip = " << ip <<
", Out of Range: 0 -> " <<
NPoints() << std::endl;
440 fOrdKti = (ord[1] > ord[2]) ? ord[1] : ord[2];
virtual void GetOrder(TPZVec< int > &ord) const
Gets the order of the integration rule for each dimension of the master element.
TPZIntTetra3D(int OrdK=2)
virtual void Point(int ip, TPZVec< REAL > &pos, REAL &w) const
Returns i-th point at master element and related weight.
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
TPZIntRuleP3D * GetRuleP3D(int order)
Returns a pointer to an integration rule for a pyramid.
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 SetOrder(TPZVec< int > &ord, int type=0)
Sets the order of the cubature rule.
Contains the TPZIntRuleT class which defines integration rule for triangles based on Linbo Zhang's pa...
TPZInt1d(int OrdK=0, int type=0)
virtual int GetMaxOrder() const
Returns the minimum order to integrate polinomials exactly for all implemented cubature rules...
virtual int NPoints() const
Returns number of points for the cubature rule related.
virtual void GetOrder(TPZVec< int > &ord) const
Gets the order of the integration rule for each dimension of the master element.
virtual void Point(int ip, TPZVec< REAL > &pos, REAL &w) const
Returns i-th point at master element and related weight.
TPZIntCube3D(int OrdK=2, int OrdE=2, int OrdZ=2)
Constructor with three one dimensional rules.
virtual void Point(int ip, TPZVec< REAL > &pos, REAL &w) const
Returns i-th point at master element and related weight.
#define LOGPZ_WARN(A, B)
Define log for warnings.
virtual void Print(std::ostream &out) const
Prints information of the cubature rule.
virtual int NPoints() const
Returns number of points for the cubature rule related.
virtual int GetMaxOrder() const
Returns the minimum order to integrate polinomials exactly for all implemented cubature rules...
virtual int NPoints() const
Returns number of points for the cubature rule related.
virtual void SetOrder(TPZVec< int > &ord, int type=0)
Sets the order of the cubature rule.
virtual int GetRealMaxOrder() const
TPZGaussRule * GetRule(int order, int type=0)
Returns a pointer to an gaussian integration rule with numint points. This method computes the number...
virtual void GetOrder(TPZVec< int > &ord) const
Gets the order of the integration rule for each dimension of the master element.
virtual void GetOrder(TPZVec< int > &ord) const
Gets the order of the integration rule for each dimension of the master element.
virtual int GetRealMaxOrder() const
TPZIntPrism3D(int OrdK=2, int OrdL=2)
Constructor with orders for a one dimensional rule and a cubature rule for triangle.
int64_t size() const
Returns the number of elements of the vector.
TPZIntPyram3D(int OrdK=2)
int NPoints() const
Returns number of points for the cubature rule related.
void SetOrder(TPZVec< int > &ord, int type=0)
Sets the order of the cubature rule.
#define DebugStop()
Returns a message to user put a breakpoint in.
int Order()
return the order of the polynomial order that can be integrated
virtual int NPoints() const
Returns number of points for the cubature rule related.
Free store vector implementation.
virtual int NPoints() const
Returns number of points for the cubature rule related.
virtual void GetOrder(TPZVec< int > &ord) const
Return the order of the integration rule.
virtual void Point(int ip, TPZVec< REAL > &pos, REAL &w) const
Returns i-th point at master element and related weight.
Contains the TPZIntRuleP3D class which defines the integration rule for pyramid.
static TPZIntRuleList gIntRuleList
Static variable with list of all integration rules.
void GetOrder(TPZVec< int > &ord) const
Gets the order of the integration rule for each dimension of the master element.
int Type()
Returns the gaussian quadrature type (Legendre, Lobatto, Jacobi)
void Point(int ip, TPZVec< REAL > &pos, REAL &w) const
Returns i-th point at master element and related weight.
virtual void GetOrder(TPZVec< int > &ord) const
Gets the order of the integration rule for each dimension of the master element.
virtual void SetOrder(TPZVec< int > &ord, int type=0)
Set the order and the type of integration rule :
Contains the TPZIntRuleList class which creates instances of all integration rules for rapid selectio...
virtual int GetMaxOrder() const
Returns the minimum order to integrate polinomials exactly for all implemented cubature rules...
virtual ~TPZIntPrism3D()
Destructor.
virtual int NPoints() const
Returns number of points for the cubature rule related.
virtual int GetMaxOrder() const
Returns the minimum order to integrate polinomials exactly for all implemented cubature rules...
int Order() const
Order associated with the integration rule.
virtual int GetRealMaxOrder() const
Contains the TPZIntRuleT3D class which defines integration rule for tetrahedra.
int64_t NElements() const
Returns the number of elements of the vector.
virtual void SetOrder(TPZVec< int > &ord, int type=0)
Sets the order of the cubature rule.
TPZIntQuad(int OrdK, int OrdE)
Constructor with two one dimensional rules.
virtual int GetMaxOrder() const
Returns the minimum order to integrate polinomials exactly for all implemented cubature rules...
TPZIntRuleT * GetRuleT(int order)
Returns a pointer to an integration rule for a triangle.
int Order()
return the order of the integration rule
virtual void SetOrder(TPZVec< int > &ord, int type=0)
Sets the order of the cubature rule.
virtual void Point(int ip, TPZVec< REAL > &pos, REAL &w) const
Returns i-th point at master element and related weight.
TPZIntRuleT3D * GetRuleT3D(int order)
Returns a pointer to an integration rule for a tetrahedra.
#define PZError
Defines the output device to error messages and the DebugStop() function.
virtual void SetOrder(TPZVec< int > &ord, int type=0)
Sets the order of the cubature rule.
virtual void Point(int ip, TPZVec< REAL > &pos, REAL &w) const
Returns i-th point at master element and related weight.