19 static log4cxx::LoggerPtr logger(Logger::getLogger(
"pz.geom.pzgeotriangle"));
32 int spacedim = coord.
Rows();
37 Shape(param,phi,dphi);
39 for(
int i = 0; i < 3; i++) {
40 for(
int j = 0; j < spacedim; j++) {
41 VecMatrix(j,0) += coord.
GetVal(j,i)*dphi(0,i);
42 VecMatrix(j,1) += coord.
GetVal(j,i)*dphi(1,i);
47 detjac = jacobian(0,0)*jacobian(1,1)-jacobian(1,0)*jacobian(0,1);
49 for (
int i=0; i<2; i++) {
50 for (
int j=0; j<2; j++) {
51 maxjac =
Max(maxjac,
fabs(jacobian(i,j)));
57 std::stringstream sout;
58 sout <<
"Singular Jacobian " << detjac;
64 jacinv(0,0) = jacobian(1,1)/detjac;
65 jacinv(1,1) = jacobian(0,0)/detjac;
66 jacinv(0,1) = -jacobian(0,1)/detjac;
67 jacinv(1,0) = -jacobian(1,0)/detjac;
74 cout <<
" o tamanho do vetores eh diferente de 3"<< endl;
76 REAL x1=v1[0], y1=v1[1],z1=v1[2];
77 REAL x2=v2[0], y2=v2[1],z2=v2[2];
79 result[0]=y1*z2-z1*y2;
80 result[1]=z1*x2-x1*z2;
81 result[2]=x1*y2-y1*x2;
94 VectorialProduct(v1,v2,normal);
95 VectorialProduct(v1,normal,result);
156 for (
int i=0; i<3; i++) {
157 scale[i] = size[i]/3.;
158 shift[i] = 1./2.+lowercorner[i];
161 for (
int i=0; i<NCornerNodes; i++) {
162 ParametricDomainNodeCoord(i,
co);
163 for (
int j=0; j<
co.size(); j++) {
164 co[j] = shift[j]+scale[j]*
co[j]+(rand()*0.2/RAND_MAX)-0.1;
167 gmesh.
NodeVec()[nodeindexes[i]].Initialize(
co, gmesh);
173 int TPZGeoTriangle::ClassId()
const{
177 void TPZGeoTriangle::Read(
TPZStream& buf,
void* context) {
181 void TPZGeoTriangle::Write(
TPZStream& buf,
int withclassid)
const {
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ fabs
int AllocateNewElement()
Makes more room for new elements.
bool IsZero(long double a)
Returns if the value a is close Zero as the allowable tolerance.
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.
void GramSchmidt(TPZFMatrix< TVar > &Orthog, TPZFMatrix< TVar > &TransfToOrthog)
This method implements a Gram Schimidt method. this = Orthog.TransfToOrthog.
virtual TPZGeoEl * CreateGeoElement(MElementType type, TPZVec< int64_t > &cornerindexes, int matid, int64_t &index, int reftype=1)
Generic method for creating a geometric element. Putting this method centrally facilitates the modifi...
groups all classes dedicated to the computation of shape functions
int Zero() override
Makes Zero all the elements.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
Contains declaration of TPZMesh class which defines a geometrical mesh and contains a corresponding l...
const T & Max(const T &a, const T &b)
Returns the maximum value between a and b.
Contains TPZMatrixclass which implements full matrix (using column major representation).
const double pzgeom_TPZNodeRep_tol
Initializing tolerance to TPZNodeRep.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
int64_t Rows() const
Returns number of rows.
void Shape(TPZVec< REAL > &pt, TPZVec< int > orders, TPZVec< TPZTransform< REAL > > &transvec, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Contains declaration of TPZGeoElRefPattern class which implements a generic geometric element which i...
REAL co[8][3]
Coordinates of the eight nodes.
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
Implements ... Geometry Topology.
int32_t Hash(std::string str)
This class implements a geometric mesh for the pz environment. Geometry.
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
Defines the interface for saving and reading data. Persistency.
int64_t NElements() const
Returns the number of elements of the vector.
Groups all classes which model the geometry.
REAL ZeroTolerance()
Returns the tolerance to Zero value. Actually: .
const TVar & GetVal(const int64_t row, const int64_t col) const override
Get values without bounds checking This method is faster than "Get" if DEBUG is defined.
void Transpose(TPZMatrix< TVar > *const T) const override
It makes *T the transpose of current matrix.
Contains TPZShapeTriang class which implements the shape functions of a triangular element...
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...