[cig-commits] commit: Completely remove all of the support for using simplexes with quad elements since they are no longer used
Mercurial
hg at geodynamics.org
Fri Sep 30 15:00:32 PDT 2011
changeset: 624:4550141f61d4
tag: tip
user: Walter Landry <wlandry at caltech.edu>
date: Fri Sep 30 14:58:52 2011 -0700
files: Mesh/src/Mesh_HexType.cxx Mesh/src/Mesh_HexType.h
description:
Completely remove all of the support for using simplexes with quad elements since they are no longer used
diff -r 8cdf02dfe67c -r 4550141f61d4 Mesh/src/Mesh_HexType.cxx
--- a/Mesh/src/Mesh_HexType.cxx Fri Sep 30 14:57:56 2011 -0700
+++ b/Mesh/src/Mesh_HexType.cxx Fri Sep 30 14:58:52 2011 -0700
@@ -90,8 +90,6 @@ void _Mesh_HexType_Init( Mesh_HexType* s
void _Mesh_HexType_Init( Mesh_HexType* self ) {
assert( self && Stg_CheckType( self, Mesh_HexType ) );
- self->num_simplexes[0]=2;
- self->num_simplexes[1]=10;
self->vertMap = AllocArray( unsigned, max_vertices );
self->inc = AllocArray( unsigned, max_vertices );
Mesh_HexType_SetVertexMap( self );
@@ -310,28 +308,10 @@ void Mesh_HexType_SetQ2Inds( void* hexTy
Mesh_HexType* self = (Mesh_HexType*)hexType;
unsigned index_map[]={0,1,3,4,9,10,12,13};
- unsigned start_index[]={0,1,3,4,9,10,12,13};
/* Set vertmap so that MinimumSeparation will work */
for(int i=0; i<max_vertices; i++)
self->vertMap[i] = index_map[i];
-
- unsigned tetInds[80][4];
-
- for(int n=0;n<8;++n)
- for(int i=0;i<10;++i)
- for(int j=0;j<4;++j)
- {
- tetInds[10*n+i][j]=index_map[self->tetInds[i][j]]+start_index[n];
- }
-
- self->tetInds = ReallocArray2D( self->tetInds, unsigned, 80, 4 );
- for(int i=0;i<80;++i)
- for(int j=0;j<4;++j)
- self->tetInds[i][j]=tetInds[i][j];
-
- self->num_simplexes[0]=8;
- self->num_simplexes[1]=80;
}
@@ -367,6 +347,7 @@ bool Mesh_HexType_ElementHasPoint3DGener
inc = IArray_GetPtr( self->incArray );
bool fnd;
+ /* If quad elements, use face search instead of simplexes.*/
if(IArray_GetSize(self->incArray)==27)
{
int on_face[6];
@@ -375,8 +356,7 @@ bool Mesh_HexType_ElementHasPoint3DGener
/* Search for tetrahedra. */
else
{
- fnd=Simplex_Search3D( mesh->verts, (unsigned*)inc,
- self->num_simplexes[1], self->tetInds,
+ fnd=Simplex_Search3D( mesh->verts, (unsigned*)inc, 10, self->tetInds,
point, bc, &inside);
}
if(fnd)
@@ -435,6 +415,7 @@ bool Mesh_HexType_ElementHasPoint3DWithI
self->incArray );
inc = IArray_GetPtr( self->incArray );
+ /* If quad elements, use face search instead of simplexes.*/
if(IArray_GetSize(self->incArray)==27)
{
int on_face[6];
@@ -603,8 +584,7 @@ bool Mesh_HexType_ElementHasPoint3DWithI
/* Search for tetrahedra. */
else
{
- fnd = Simplex_Search3D( mesh->verts, (unsigned*)inc,
- self->num_simplexes[1], self->tetInds,
+ fnd = Simplex_Search3D( mesh->verts, (unsigned*)inc, 10, self->tetInds,
point, bc, &inside );
if( fnd ) {
unsigned* inds = self->tetInds[inside];
@@ -787,8 +767,7 @@ bool Mesh_HexType_ElementHasPoint2DGener
}
/* Search for triangle. */
else
- fnd = Simplex_Search2D( mesh->verts, (unsigned*)inc,
- self->num_simplexes[0], self->triInds,
+ fnd = Simplex_Search2D( mesh->verts, (unsigned*)inc, 2, self->triInds,
point, bc, &inside );
if( fnd ) {
*dim = MT_FACE;
@@ -824,7 +803,7 @@ bool Mesh_HexType_ElementHasPoint2DWithI
self->incArray );
inc = IArray_GetPtr( self->incArray );
- /* Use edges instead of simplices for quadratic elements */
+ /* If a quadratic element, use side search instead of simplexes. */
if(IArray_GetSize(self->incArray)==9)
{
int on_edge[4];
@@ -888,9 +867,8 @@ bool Mesh_HexType_ElementHasPoint2DWithI
else
{
/* Search for triangle. */
- fnd = Simplex_Search2D( mesh->verts, (unsigned*)inc,
- self->num_simplexes[0],
- self->triInds, point, bc, &inside );
+ fnd = Simplex_Search2D( mesh->verts, (unsigned*)inc, 2, self->triInds,
+ point, bc, &inside );
if( fnd ) {
unsigned *inds = self->triInds[inside];
diff -r 8cdf02dfe67c -r 4550141f61d4 Mesh/src/Mesh_HexType.h
--- a/Mesh/src/Mesh_HexType.h Fri Sep 30 14:57:56 2011 -0700
+++ b/Mesh/src/Mesh_HexType.h Fri Sep 30 14:58:52 2011 -0700
@@ -59,7 +59,6 @@
Mesh_ElementType_ElementHasPointFunc* elementHasPoint; \
unsigned** triInds; \
unsigned** tetInds; \
- unsigned num_simplexes[2]; \
IArray* incArray;
struct Mesh_HexType { __Mesh_HexType };
More information about the CIG-COMMITS
mailing list