18 static LoggerPtr logger(Logger::getLogger(
"pz.specialmaps.quadraticprism"));
32 T qsi = par[0], eta = par[1], zeta = par[2];
34 phi(0,0) = -0.5*(-1. + eta + qsi)*(-1. + zeta)*(2.*(eta + qsi) + zeta);
35 phi(1,0) = 0.5*qsi*(-1. + zeta)*(2. - 2.*qsi + zeta);
36 phi(2,0) = 0.5*eta*(-1. + zeta)*(2. - 2.*eta + zeta);
37 phi(3,0) = -0.5*(-1. + eta + qsi)*(1. + zeta)*(-2.*(eta + qsi) + zeta);
38 phi(4,0) = 0.5*qsi*(1. + zeta)*(-2. + 2.*qsi + zeta);
39 phi(5,0) = 0.5*eta*(1. + zeta)*(-2. + 2.*eta + zeta);
40 phi(6,0) = 2.*qsi*(-1. + eta + qsi)*(-1. + zeta);
41 phi(7,0) = -2.*eta*qsi*(-1. + zeta);
42 phi(8,0) = 2.*eta*(-1. + eta + qsi)*(-1. + zeta);
43 phi(9,0) = (-1. + eta + qsi)*(-1. + zeta*zeta);
44 phi(10,0) = qsi - qsi*zeta*zeta;
45 phi(11,0) = eta - eta*zeta*zeta;
46 phi(12,0) = -2.*qsi*(-1. + eta + qsi)*(1. + zeta);
47 phi(13,0) = 2.*eta*qsi*(1. + zeta);
48 phi(14,0) = -2.*eta*(-1. + eta + qsi)*(1. + zeta);
50 dphi(0,0) = (1. - 2.*eta - 2.*qsi - 0.5*zeta)*(-1. + zeta);
51 dphi(1,0) = (1. - 2.*eta - 2.*qsi - 0.5*zeta)*(-1. + zeta);
52 dphi(2,0) = (-1. + eta + qsi)*(0.5 - eta - qsi - zeta);
54 dphi(0,1) = -1. + qsi*(2. - 2.*zeta) + 0.5*zeta + 0.5*zeta*zeta;
56 dphi(2,1) = qsi*(0.5 - 1.*qsi + 1.*zeta);
59 dphi(1,2) = -1. + eta*(2. - 2.*zeta) + 0.5*zeta + 0.5*zeta*zeta;
60 dphi(2,2) = eta*(0.5 - eta + zeta);
62 dphi(0,3) = (-1. + 2.*eta + 2.*qsi - 0.5*zeta)*(1. + zeta);
63 dphi(1,3) = (-1. + 2.*eta + 2.*qsi - 0.5*zeta)*(1. + zeta);
64 dphi(2,3) = (-1. + eta + qsi)*(-0.5 + eta + qsi - zeta);
66 dphi(0,4) = (-1. + 2.*qsi + 0.5*zeta)*(1. + zeta);
68 dphi(2,4) = qsi*(-0.5 + qsi + zeta);
71 dphi(1,5) = -1. - 0.5*zeta + 0.5*zeta*zeta + eta*(2. + 2.*zeta);
72 dphi(2,5) = eta*(-0.5 + eta + zeta);
74 dphi(0,6) = (-2. + 2.*eta + 4.*qsi)*(-1. + zeta);
75 dphi(1,6) = 2.*qsi*(-1. + zeta);
76 dphi(2,6) = 2.*qsi*(-1. + eta + qsi);
78 dphi(0,7) = -2.*eta*(-1. + zeta);
79 dphi(1,7) = -2.*qsi*(-1. + zeta);
80 dphi(2,7) = -2.*eta*qsi;
82 dphi(0,8) = 2.*eta*(-1. + zeta);
83 dphi(1,8) = (-2. + 4.*eta + 2.*qsi)*(-1. + zeta);
84 dphi(2,8) = 2.*eta*(-1. + eta + qsi);
86 dphi(0,9) = -1. + zeta*zeta;
87 dphi(1,9) = -1. + zeta*zeta;
88 dphi(2,9) = 2.*(-1. + eta + qsi)*zeta;
90 dphi(0,10) = 1. - zeta*zeta;
92 dphi(2,10) = -2.*qsi*zeta;
95 dphi(1,11) = 1. - zeta*zeta;
96 dphi(2,11) = -2.*eta*zeta;
98 dphi(0,12) = (2. - 2.*eta - 4.*qsi)*(1. + zeta);
99 dphi(1,12) = -2.*qsi*(1. + zeta);
100 dphi(2,12) = -2.*qsi*(-1. + eta + qsi);
102 dphi(0,13) = 2.*eta*(1. + zeta);
103 dphi(1,13) = 2.*qsi*(1. + zeta);
104 dphi(2,13) = 2.*eta*qsi;
106 dphi(0,14) = -2.*eta*(1. + zeta);
107 dphi(1,14) = (2. - 4.*eta - 2.*qsi)*(1. + zeta);
108 dphi(2,14) = -2.*eta*(-1. + eta + qsi);
116 TShape(loc,phi,dphi);
117 int space = nodes.
Rows();
119 for(
int i = 0; i < space; i++) {
121 for(
int j = 0; j < NNodes; j++) {
122 x[i] += phi(j,0)*nodes.
GetVal(i,j);
133 int nrow = nodes.
Rows();
134 int ncol = nodes.
Cols();
136 if(nrow != 3 || ncol != 15){
137 std::cout <<
"Objects of incompatible lengths, gradient cannot be computed." << std::endl;
138 std::cout <<
"nodes matrix must be 3x15." << std::endl;
145 TShape(loc,phi,dphi);
146 for(
int i = 0; i < NNodes; i++)
148 for(
int j = 0; j < 3; j++)
150 gradx(j,0) += nodes.
GetVal(j,i)*dphi(0,i);
151 gradx(j,1) += nodes.
GetVal(j,i)*dphi(1,i);
152 gradx(j,2) += nodes.
GetVal(j,i)*dphi(2,i);
206 for (
int i=0; i<3; i++) {
207 scale[i] = size[i]/3.;
208 shift[i] = size[i]/2.+lowercorner[i];
211 for (
int i=0; i<NCornerNodes; i++) {
212 ParametricDomainNodeCoord(i,
co);
214 for (
int j=0; j<3; j++) {
215 co[j] = shift[j]+scale[j]*
co[j]+(rand()*0.2/RAND_MAX)-0.1;
218 gmesh.
NodeVec()[nodeindexes[i]].Initialize(
co, gmesh);
223 int nsides = gel->
NSides();
224 for (
int is=0; is<nsides; is++) {
231 for (
int i=0; i<3; i++) {
232 co[i] += (0.2*rand())/RAND_MAX - 0.1;
361 int TPZQuadraticPrism::ClassId()
const{
Contains the TPZQuadraticPrism class which defines a prism geometric element with quadratic map...
int AllocateNewElement()
Makes more room for new elements.
void SetCoord(const TPZVec< REAL > &x)
Sets all coordinates into the current node. It gets the dim values from x.
TPZGeoNode * NodePtr(int i) const
Returns a pointer to the ith node of the element.
Contains the TPZChangeEl class. It is a special map.
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 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
virtual int NCornerNodes() const =0
Returns the number of corner nodes of the element.
This class implements a simple vector storage scheme for a templated class T. Utility.
virtual int NSides() const =0
Returns the number of connectivities of the element.
Contains declaration of TPZGeoElMapped class which implements a geometric element using its ancestral...
int Zero() override
Makes Zero all the elements.
Groups all classes defining the structure of the master element.
static TPZGeoEl * ChangeToQuadratic(TPZGeoMesh *Mesh, int64_t ElemIndex)
Turns an linear geoelement to quadratic.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Contains the TPZGeoBlend class which implements a blending map from curved boundaries to the interior...
TPZGeoEl * Element(int64_t iel)
#define DebugStop()
Returns a message to user put a breakpoint in.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
int64_t Rows() const
Returns number of rows.
REAL co[8][3]
Coordinates of the eight nodes.
Implements ... Geometry Topology.
int32_t Hash(std::string str)
virtual int NNodes() const =0
Returns the number of nodes of the element.
virtual void SetSideDefined(int side)=0
Flags the side as defined, this means no neighbouring element was found.
This class implements a geometric mesh for the pz environment. Geometry.
Contains the implementation of the TPZNodeRep methods.
int64_t Cols() const
Returns number of cols.
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
Contains TPZShapePiram class which implements the shape functions of a pyramid element.
Contains the implementation of the TPZGeoElRefPattern methods.
void GetCoordinates(TPZVec< REAL > &co)
Fill the coordinates of the node.
Groups all classes which model the geometry.
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.
Implements an interface to register a class id and a restore function. Persistence.
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...