19 static LoggerPtr logger(Logger::getLogger(
"pz.specialmaps.quadraticline"));
36 phi(0,0) = -qsi*(1.-qsi)/2.;
37 phi(1,0) = +qsi*(1.+qsi)/2.;
38 phi(2,0) = (1.-qsi)*(1.+qsi);
51 for(
int i = 0; i < 3; i++){
53 for(
int j = 0; j < NNodes; j++) result[i] += phi(j,0)*coord.
GetVal(i,j);
62 int nrow = nodes.
Rows();
63 int ncol = nodes.
Cols();
65 if(nrow != 3 || ncol != 3){
66 std::cout <<
"Objects of incompatible lengths, gradient cannot be computed." << std::endl;
67 std::cout <<
"nodes matrix must be 3x3." << std::endl;
75 for(
int i = 0; i < NNodes; i++)
77 for(
int j = 0; j < 3; j++)
79 gradx(j,0) += nodes.
GetVal(j,i)*dphi(0,i);
167 for (
int i=0; i<3; i++) {
168 scale[i] = size[i]/3.;
169 shift[i] = 1./2.+lowercorner[i];
172 for (
int i=0; i<NCornerNodes; i++) {
173 ParametricDomainNodeCoord(i,
co);
175 for (j=0; j<
co.size(); j++) {
176 co[j] = shift[j]+scale[j]*
co[j]+(rand()*0.2/RAND_MAX)-0.1;
180 co[j] = shift[j]+(rand()*0.2/RAND_MAX)-0.1;
183 gmesh.
NodeVec()[nodeindexes[i]].Initialize(
co, gmesh);
188 int nsides = gel->
NSides();
189 for (
int is = 0; is<nsides; is++) {
195 for (
int i=0; i<3; i++) {
196 co[i] = lowercorner[i]+size[i]/2.;
204 int TPZQuadraticLine::ClassId()
const{
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
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.
Contains the TPZQuadraticLine class which defines a linear geometric element with quadratic map...
Implements ... Geometry Topology.
int32_t Hash(std::string str)
virtual void SetSideDefined(int side)=0
Flags the side as defined, this means no neighbouring element was found.
Implements a geometric node in the pz environment. Geometry.
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 the implementation of the TPZGeoElRefPattern methods.
Groups all classes which model the geometry.
Contains TPZShapeQuad class which implements the shape functions of a quadrilateral element...
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.