proteus
1.8.1
C/C++/Fortran libraries
|
Go to the documentation of this file.
135 mesh.
nx=mesh.
ny=mesh.
nz=0;
136 mesh.
px=mesh.
py=mesh.
pz=0;
205 mesh.
nx=mesh.
ny=mesh.
nz=0;
206 mesh.
px=mesh.
py=mesh.
pz=0;
277 for(
int i=0;i<multilevelMesh.
nLevels;i++)
304 int * elementTagArray);
306 int * elementTagArray);
308 int * elementTagArray);
310 int * elementTagArray);
323 int regularMeshNodes(
const int& nx,
const int& ny,
const int& nz,
const double& Lx,
const double& Ly,
const double& Lz,
Mesh& mesh);
374 const int& nSpace_global);
377 struct triangulateio;
387 int read3DM(
Mesh& mesh,
const char* filebase,
int indexBase);
388 int read2DM(
Mesh& mesh,
const char* filebase,
int indexBase);
389 int readHex(
Mesh& mesh,
const char* filebase,
int indexBase);
390 int readBC(
Mesh& mesh,
const char* filebase,
int indexBase);
394 Mesh& mesh,
int base);
406 for(
int i=0;i<nNodes;i++)
410 for(
int j=0;j<nNodes;j++)
411 if(nodesIn[i] > nodesIn[j])
413 nodes[position]=nodesIn[i];
422 for(
int i=0;i<nNodes;i++)
435 for (
int i=0;i<nNodes;i++)
455 midpoint.x = 0.5*(left[0]+right[0]);
456 midpoint.y = 0.5*(left[1]+right[1]);
457 midpoint.z = 0.5*(left[2]+right[2]);
462 return sqrt( (right.
x - left.
x)*(right.
x - left.
x) +
463 (right.
y - left.
y)*(right.
y - left.
y) +
464 (right.
z - left.
z)*(right.
z - left.
z) );
469 return sqrt( (nodeArray[right*3+0] - nodeArray[left*3+0])*(nodeArray[right*3+0] - nodeArray[left*3+0]) +
470 (nodeArray[right*3+1] - nodeArray[left*3+1])*(nodeArray[right*3+1] - nodeArray[left*3+1]) +
471 (nodeArray[right*3+2] - nodeArray[left*3+2])*(nodeArray[right*3+2] - nodeArray[left*3+2]) );
478 else if (left.
x > right.
x)
480 else if (left.
y < right.
y)
482 else if (left.
y > right.
y)
484 else if (left.
z < right.
z)
486 else if (left.
z > left.
z)
499 inline int newEdge(
int eN,
int* nodes,
int n0,
int n1)
535 inline int newHexahedron(
int eN,
int* nodes,
int n0,
int n1,
int n2,
int n3,
int n4,
int n5,
int n6,
int n7)
551 int& nElements_global,
553 std::vector<double>& nodeArray,
554 std::vector<int>& elementNodesArray,
555 std::vector<int>& elementNeighborsArray,
557 std::vector<int>& elementParentsArray,
558 std::vector<int>& bases,
559 std::vector<bool>& refined);
564 std::vector<bool>& refined,
565 std::vector<int>& edgeMidNodesArray,
566 const int* elementNodesArray,
567 const int* elementBoundariesArray,
568 const int* elementNeighborsArray,
569 const double * nodeArray);
572 int ebN_neig,
int eN_neig,
574 std::vector<bool>& refined,
575 std::vector<int>& edgeMidNodesArray,
576 const int* elementNodesArray,
577 const int* elementBoundariesArray,
578 const int* elementNeighborsArray,
579 const double * nodeArray);
582 const int* elementNodesArray,
583 const double * nodeArray);
587 int* elementParentsArray,
588 int* elementChildrenOffsets,
589 int* elementChildrenArray,
590 int* elementNodesArray_child,
591 const std::vector<int>& edgeMidNodesArray,
592 const std::vector<bool>& refined,
593 const int* elementNodesArray_parent,
594 const int* elementBoundariesArray_parent,
595 const double* nodeArray_parent);
int readTriangleElementBoundaryMaterialTypes(Mesh &mesh, const char *filebase, int base)
int newHexahedron(int eN, int *nodes, int n0, int n1, int n2, int n3, int n4, int n5, int n6, int n7)
bool add4TnodesForConformity2d(int eN, int ebN_longest, int ebN_neig, int eN_neig, int &nNodes_global, std::vector< bool > &refined, std::vector< int > &edgeMidNodesArray, const int *elementNodesArray, const int *elementBoundariesArray, const int *elementNeighborsArray, const double *nodeArray)
double * nodeDiametersArray
int regularHexahedralMeshElements(const int &nx, const int &ny, const int &nz, const int &px, const int &py, const int &pz, Mesh &mesh)
int computeGeometricInfo_edge(Mesh &mesh)
int * elementBoundaryOffsets_subdomain_owned
int * interiorElementBoundariesArray
int * elementBoundaryNodesArray
int write3dmMesh(Mesh &mesh, const char *filebase, int base)
int readBC(Mesh &mesh, const char *filebase, int indexBase)
int regularRectangularToTriangularElementBoundaryMaterials(const double &Lx, const double &Ly, Mesh &mesh)
int regularMeshNodes2D(const int &nx, const int &ny, const double &Lx, const double &Ly, Mesh &mesh)
int constructElementBoundaryElementsArrayWithGivenElementBoundaryAndEdgeNumbers_tetrahedron(Mesh &mesh)
int constructElementBoundaryElementsArray_triangle(Mesh &mesh)
int locallyRefineEdgeMesh(MultilevelMesh &multilevelMesh, int *elementTagArray)
int copyElementBoundaryMaterialTypesFromTriangle(triangulateio *trimesh, Mesh &mesh, int base)
bool subdivideTriangle4T(int eN_parent, int &eN_new, int *elementParentsArray, int *elementChildrenOffsets, int *elementChildrenArray, int *elementNodesArray_child, const std::vector< int > &edgeMidNodesArray, const std::vector< bool > &refined, const int *elementNodesArray_parent, const int *elementBoundariesArray_parent, const double *nodeArray_parent)
bool operator<(const NodeTuple< nNodes > &left, const NodeTuple< nNodes > &right)
int constructElementBoundaryElementsArrayWithGivenElementBoundaryAndEdgeNumbers_triangle(Mesh &mesh)
int newTetrahedron(int eN, int *nodes, int n0, int n1, int n2, int n3)
int constructElementBoundaryElementsArrayWithGivenElementBoundaryNumbers_quadrilateral(Mesh &mesh)
void initializeMultilevelMesh(MultilevelMesh &multilevelMesh)
int * exteriorElementBoundariesArray
int ** elementChildrenArray
NodeTuple(const NodeTuple< nNodes > &nt)
int locallyRefineTriangleMesh_4T(MultilevelMesh &multilevelMesh, int *elementTagArray)
int regularHexahedralToTetrahedralElementBoundaryMaterials(const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
int allocateGeometricInfo_hexahedron(Mesh &mesh)
int nNodes_elementBoundary
int setNewestNodeBasesToLongestEdge(MultilevelMesh &multilevelMesh)
int nElementBoundaries_global
int allocateNodeAndElementNodeDataStructures(Mesh &mesh, int nElements_global, int nNodes_global, int nNodes_element)
int locallyRefineTriangleMesh(MultilevelMesh &multilevelMesh, int *elementTagArray)
int computeGeometricInfo_quadrilateral(Mesh &mesh)
void deleteMesh(Mesh &mesh)
double edgeLength(const Node &left, const Node &right)
int newTriangle(int eN, int *nodes, int n0, int n1, int n2)
int nInteriorElementBoundaries_global
int * nodeOffsets_subdomain_owned
void deleteMultilevelMesh(MultilevelMesh &multilevelMesh)
int findLocalLongestEdge2d(int eN, const int *elementNodesArray, const double *nodeArray)
void midpoint(const double *left, const double *right, Node &midpoint)
int assignElementBoundaryMaterialTypesFromParent(Mesh &parentMesh, Mesh &childMesh, const int *levelElementParentsArray, const int &nSpace_global)
int allocateGeometricInfo_NURBS(Mesh &mesh)
int constructElementBoundaryElementsArrayWithGivenElementBoundaryNumbers_edge(Mesh &mesh)
int constructElementBoundaryElementsArrayWithGivenElementBoundaryNumbers_tetrahedron(Mesh &mesh)
int globallyRefineQuadrilateralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags=false)
int regularHexahedralToTetrahedralMeshElements(const int &nx, const int &ny, const int &nz, Mesh &mesh)
int locallyRefineTriangleMesh_redGreen(MultilevelMesh &multilevelMesh, int *elementTagArray)
ElementNeighbors(int leftIn, int left_ebN_elementIn)
int readTetgenMesh(Mesh &mesh, const char *filebase, int base)
int globallyRefineHexahedralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags=false)
int regularHexahedralMeshElementBoundaryMaterials(const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
int constructElementBoundaryElementsArrayWithGivenElementBoundaryAndEdgeNumbers_quadrilateral(Mesh &mesh)
int * elementBoundaryLocalElementBoundariesArray
int readElements(std::istream &meshFile, Mesh &mesh)
int * elementBoundaryMaterialTypes
int * edgeNumbering_subdomain2global
int regularRectangularToTriangularMeshNodes(const int &nx, const int &ny, const double &Lx, const double &Ly, Mesh &mesh)
double * elementInnerDiametersArray
int writeTriangleMesh(Mesh &mesh, const char *filebase, int base)
bool newestNodeBisect(int eN, int &nElements_global, int &nNodes_global, std::vector< double > &nodeArray, std::vector< int > &elementNodesArray, std::vector< int > &elementNeighborsArray, std::vector< std::list< int > > &childrenList, std::vector< int > &elementParentsArray, std::vector< int > &bases, std::vector< bool > &refined)
int writeNodes(std::ostream &meshFile, const Mesh &mesh)
int globallyRefineEdgeMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags=false)
int constructElementBoundaryElementsArray_NURBS(Mesh &mesh)
int edgeMeshElements(const int &nx, Mesh &mesh)
int * edgeOffsets_subdomain_owned
int regularQuadrilateralMeshElementBoundaryMaterials(const double &Lx, const double &Ly, Mesh &mesh)
int newQuadrilateral(int eN, int *nodes, int n0, int n1, int n2, int n3)
int readTriangleMesh(Mesh &mesh, const char *filebase, int base)
int regularQuadrilateralMeshElements(const int &nx, const int &ny, Mesh &mesh)
int readTetgenElementBoundaryMaterialTypes(Mesh &mesh, const char *filebase, int base)
int computeGeometricInfo_tetrahedron(Mesh &mesh)
int constructElementBoundaryElementsArray_tetrahedron(Mesh &mesh)
int regularMeshNodes(const int &nx, const int &ny, const int &nz, const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
bool add4TnodesForRefinement2d(int eN, int &nNodes_global, std::vector< bool > &refined, std::vector< int > &edgeMidNodesArray, const int *elementNodesArray, const int *elementBoundariesArray, const int *elementNeighborsArray, const double *nodeArray)
int constructElementBoundaryElementsArray_quadrilateral(Mesh &mesh)
int constructElementBoundaryElementsArray_edge(Mesh &mesh)
double * elementBoundaryBarycentersArray
int * elementBoundariesArray
double * elementBarycentersArray
int constructElementBoundaryElementsArrayWithGivenElementBoundaryAndEdgeNumbers_NURBS(Mesh &mesh)
int regularEdgeMeshNodes(const int &nx, const double &Lx, Mesh &mesh)
int computeGeometricInfo_triangle(Mesh &mesh)
int nElementBoundaries_element
int * elementMaterialTypes
int * elementOffsets_subdomain_owned
double * elementDiametersArray
int allocateGeometricInfo_edge(Mesh &mesh)
int computeGeometricInfo_hexahedron(Mesh &mesh)
int * elementBoundaryNumbering_subdomain2global
int setFromTriangleNodes(triangulateio *trimesh, Mesh &mesh, int base)
void initializeMesh(Mesh &mesh)
int writeTetgenMesh(Mesh &mesh, const char *filebase, int base)
int read3DM(Mesh &mesh, const char *filebase, int indexBase)
int nExteriorElementBoundaries_global
int ** elementParentsArray
int constructElementBoundaryElementsArrayWithGivenElementBoundaryNumbers_triangle(Mesh &mesh)
int regularNURBSMeshElements(const int &nx, const int &ny, const int &nz, const int &px, const int &py, const int &pz, Mesh &mesh)
int regularHexahedralToTetrahedralMeshNodes(const int &nx, const int &ny, const int &nz, const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
int constructElementBoundaryElementsArrayWithGivenElementBoundaryAndEdgeNumbers_hexahedron(Mesh &mesh)
int constructElementBoundaryElementsArray_hexahedron(Mesh &mesh)
int max_nNodeNeighbors_node
int * nodeNumbering_subdomain2global
float * vector(long nl, long nh)
int reorientTetrahedralMesh(Mesh &mesh)
int constructElementBoundaryElementsArrayWithGivenElementBoundaryAndEdgeNumbers_edge(Mesh &mesh)
int globallyRefineTetrahedralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags=false)
int write2dmMesh(Mesh &mesh, const char *filebase, int base)
double * nodeSupportArray
int read2DM(Mesh &mesh, const char *filebase, int indexBase)
int globallyRefineTriangularMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags=false)
int * elementNumbering_subdomain2global
NodeTuple(const int *nodesIn)
int regularRectangularToTriangularMeshElements(const int &nx, const int &ny, Mesh &mesh, int triangleFlag)
int allocateGeometricInfo_triangle(Mesh &mesh)
double * elementBoundaryDiametersArray
int newEdge(int eN, int *nodes, int n0, int n1)
int writeElements(std::ostream &meshFile, const Mesh &mesh)
int readHex(Mesh &mesh, const char *filebase, int indexBase)
int allocateGeometricInfo_quadrilateral(Mesh &mesh)
int * elementBoundaryElementsArray
int nodes_unsorted[nNodes]
int ** elementChildrenOffsets
double edgeLengthFromNodeNumbers(double *nodeArray, const int &left, const int &right)
int * elementNeighborsArray
int setFromTriangleElements(triangulateio *trimesh, Mesh &mesh, int base)
int computeGeometricInfo_NURBS(Mesh &mesh)
int allocateGeometricInfo_tetrahedron(Mesh &mesh)