NeoPZ
Public Member Functions | Static Public Member Functions | List of all members
TPZGenSpecialGrid Class Reference

Implements the generation of a polygonal mesh approximating a geometric element from another simple polygonal mesh. Getting Data. More...

#include <TPZGenSpecialGrid.h>

Public Member Functions

 ~TPZGenSpecialGrid ()
 

Static Public Member Functions

static TPZGeoMeshGeneratePolygonalSphereFromOctahedron (TPZVec< REAL > &center, REAL radius, int nUniformRefs)
 Static function to generate a polygonal mesh approximating a sphere from a octahedron mesh (polygonal) More...
 
static TPZGeoMeshGeneratePolygonalSphereFromOctahedron (TPZVec< REAL > &center, REAL radius, REAL tol)
 Static function to generate a polygonal mesh approximating a sphere from a octahedron mesh (polygonal) More...
 
static void UniformRefinement (const int nUniformRefs, TPZGeoMesh *gmesh, const int dimelfordivision, bool allmaterial=true, const int matidtodivided=0)
 Make uniform refinement of the geometric mesh. This method finishs making the new connectivities for the elements (ResetConnectivities() and BuildConnectivity()) More...
 

Detailed Description

Implements the generation of a polygonal mesh approximating a geometric element from another simple polygonal mesh. Getting Data.

Definition at line 18 of file TPZGenSpecialGrid.h.

Constructor & Destructor Documentation

◆ ~TPZGenSpecialGrid()

TPZGenSpecialGrid::~TPZGenSpecialGrid ( )
inline

Simple destructor

Definition at line 22 of file TPZGenSpecialGrid.h.

References GeneratePolygonalSphereFromOctahedron(), pzgeom::tol, and UniformRefinement().

Member Function Documentation

◆ GeneratePolygonalSphereFromOctahedron() [1/2]

TPZGeoMesh * TPZGenSpecialGrid::GeneratePolygonalSphereFromOctahedron ( TPZVec< REAL > &  center,
REAL  radius,
int  nUniformRefs 
)
static

Static function to generate a polygonal mesh approximating a sphere from a octahedron mesh (polygonal)

Parameters
centerCenter of the sphere
radiusRadius of the sphere polygonalized
nUniformRefsNumber of uniform refinements to make.

Function to generate a polygonal mesh approximating a sphere from a octahedron mesh (polygonal) based on number of uniform refinements

Definition at line 17 of file TPZGenSpecialGrid.cpp.

References TPZAdmChunkVector< T, EXP >::AllocateNewElement(), TPZGeoMesh::BuildConnectivity(), TPZGeoMesh::CreateGeoElement(), TPZGeoMesh::DeleteElement(), TPZGeoMesh::ElementVec(), ETriangle, TPZGeoNode::GetCoordinates(), TPZGeoEl::HasSubElement(), TPZGeoMesh::NElements(), TPZGeoMesh::NNodes(), TPZGeoMesh::NodeVec(), nodind, TPZGeoMesh::ResetConnectivities(), TPZGeoEl::ResetSubElements(), TPZGeoNode::SetCoord(), TPZGeoEl::SetFatherIndex(), sqrt, and UniformRefinement().

Referenced by ~TPZGenSpecialGrid().

◆ GeneratePolygonalSphereFromOctahedron() [2/2]

TPZGeoMesh * TPZGenSpecialGrid::GeneratePolygonalSphereFromOctahedron ( TPZVec< REAL > &  center,
REAL  radius,
REAL  tol 
)
static

Static function to generate a polygonal mesh approximating a sphere from a octahedron mesh (polygonal)

Parameters
centerCenter of the sphere
radiusRadius of the sphere polygonalized
tolTolerance of approximation. It is the distance of the barycenter of any triangular element of the mesh until the sphere.
Note
tol is the stop criterion.

Function to generate a polygonal mesh approximating a sphere from a octahedron mesh (polygonal)

Definition at line 98 of file TPZGenSpecialGrid.cpp.

References TPZAdmChunkVector< T, EXP >::AllocateNewElement(), TPZGeoMesh::BuildConnectivity(), TPZGeoEl::CenterPoint(), TPZGeoMesh::CreateGeoElement(), TPZGeoMesh::DeleteElement(), dist(), TPZGeoMesh::ElementVec(), ETriangle, TPZGeoNode::GetCoordinates(), TPZGeoEl::HasSubElement(), TPZGeoMesh::NElements(), TPZGeoMesh::NNodes(), TPZGeoMesh::NodeVec(), nodind, TPZGeoMesh::ResetConnectivities(), TPZGeoEl::ResetSubElements(), TPZGeoNode::SetCoord(), TPZGeoEl::SetFatherIndex(), sqrt, UniformRefinement(), and TPZGeoEl::X().

◆ UniformRefinement()

void TPZGenSpecialGrid::UniformRefinement ( const int  nUniformRefs,
TPZGeoMesh gmesh,
const int  dimelfordivision,
bool  allmaterial = true,
const int  matidtodivided = 0 
)
static

Make uniform refinement of the geometric mesh. This method finishs making the new connectivities for the elements (ResetConnectivities() and BuildConnectivity())

Parameters
nUniformRefsNumber of divisions of all elements wished
gmeshGeometric mesh contained the elements
dimelfordivisionDimension of the geometric elements will be divided. If dimelfordivision is negative subdivide all elements (for any dimensions)
allmaterialIf true divides all geometric element, if false check the material match with allmaterial to divide the element
matidtodividedTo divide only elements with this material id

Make uniform refinement of the geometric mesh. This method finishs making the new connectivities for the elements (ResetConnectivities() and BuildConnectivity())

Definition at line 195 of file TPZGenSpecialGrid.cpp.

References TPZGeoMesh::BuildConnectivity(), TPZGeoEl::Dimension(), TPZGeoEl::Divide(), TPZGeoMesh::ElementVec(), TPZGeoEl::HasSubElement(), TPZGeoEl::MaterialId(), TPZGeoMesh::NElements(), and TPZGeoMesh::ResetConnectivities().

Referenced by GeneratePolygonalSphereFromOctahedron(), and ~TPZGenSpecialGrid().


The documentation for this class was generated from the following files: