[cig-commits] r6085 - in long/3D/Gale/trunk/src/StGermain: .
Discretisation/Mesh/src
walter at geodynamics.org
walter at geodynamics.org
Fri Feb 23 10:02:22 PST 2007
Author: walter
Date: 2007-02-23 10:02:21 -0800 (Fri, 23 Feb 2007)
New Revision: 6085
Modified:
long/3D/Gale/trunk/src/StGermain/
long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CartesianGenerator.c
Log:
r3336 at earth (orig r4005): LukeHodkinson | 2007-02-11 21:49:59 -0800
* Making regular meshes the default behaviour.
* Increasing the verbosity of the generation.
Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
- 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:4004
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899
+ 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:4005
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CartesianGenerator.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CartesianGenerator.c 2007-02-23 18:02:18 UTC (rev 6084)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CartesianGenerator.c 2007-02-23 18:02:21 UTC (rev 6085)
@@ -96,8 +96,13 @@
}
void _CartesianGenerator_Init( CartesianGenerator* self ) {
+ Stream* stream;
+
assert( self && Stg_CheckType( self, CartesianGenerator ) );
+ stream = Journal_Register( Info_Type, self->type );
+ Stream_SetPrintingRank( stream, 0 );
+
self->regular = True;
self->maxDecompDims = 0;
self->minDecomp = NULL;
@@ -251,7 +256,7 @@
CartesianGenerator_SetShadowDepth( self, shadowDepth );
/* Read regular flag. */
- self->regular = Stg_ComponentFactory_GetBool( cf, self->name, "regular", False );
+ self->regular = Stg_ComponentFactory_GetBool( cf, self->name, "regular", True );
/* Free stuff. */
FreeArray( size );
@@ -742,7 +747,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating elements...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
grid = Grid_New();
Grid_SetNDims( grid, self->elGrid->nDims );
@@ -767,6 +772,11 @@
FreeArray( dimInds );
FreeArray( els );
FreeObject( grid );
+
+ MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_GenVertices( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
@@ -784,7 +794,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating vertices...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
globalGrid = Grid_New();
Grid_SetNDims( globalGrid, self->elGrid->nDims );
@@ -822,6 +832,11 @@
FreeArray( els );
FreeObject( grid );
FreeObject( globalGrid );
+
+ MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_GenEdges( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
@@ -834,12 +849,17 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating edges...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
if( self->elGrid->nDims == 2 )
CartesianGenerator_GenEdges2D( self, topo, grids );
else
CartesianGenerator_GenEdges3D( self, topo, grids );
+
+ MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_GenEdges2D( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
@@ -1036,7 +1056,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating faces...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
globalGrid = Grid_New();
Grid_SetNDims( globalGrid, self->elGrid->nDims );
@@ -1116,6 +1136,11 @@
FreeArray( els );
FreeObject( grid );
FreeObject( globalGrid );
+
+ MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_GenElementVertexInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
@@ -1132,7 +1157,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating element-vertex incidence...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
vertsPerEl = (topo->nDims == 1) ? 2 : (topo->nDims == 2) ? 4 : 8;
@@ -1187,6 +1212,11 @@
FreeArray( nIncEls );
FreeArray( incEls );
FreeArray( dimInds );
+
+ MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_GenVolumeEdgeInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
@@ -1203,7 +1233,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating volume-edge incidence...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
nIncEls = Memory_Alloc_Array_Unnamed( unsigned, topo->domains[topo->nDims]->nDomains );
incEls = Memory_Alloc_2DArray_Unnamed( unsigned, topo->domains[topo->nDims]->nDomains, 12 );
@@ -1261,6 +1291,11 @@
FreeArray( nIncEls );
FreeArray( incEls );
FreeArray( dimInds );
+
+ MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_GenVolumeFaceInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
@@ -1277,7 +1312,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating volume-face incidence...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
nIncEls = Memory_Alloc_Array_Unnamed( unsigned, topo->domains[topo->nDims]->nDomains );
incEls = Memory_Alloc_2DArray_Unnamed( unsigned, topo->domains[topo->nDims]->nDomains, 6 );
@@ -1313,6 +1348,11 @@
FreeArray( nIncEls );
FreeArray( incEls );
FreeArray( dimInds );
+
+ MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_GenFaceVertexInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
@@ -1329,7 +1369,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating face-vertex incidence...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
nIncEls = Memory_Alloc_Array_Unnamed( unsigned, topo->domains[MT_FACE]->nDomains );
incEls = Memory_Alloc_2DArray_Unnamed( unsigned, topo->domains[MT_FACE]->nDomains, 4 );
@@ -1403,6 +1443,11 @@
FreeArray( nIncEls );
FreeArray( incEls );
FreeArray( dimInds );
+
+ MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_GenFaceEdgeInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
@@ -1419,7 +1464,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating face-edge incidence...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
nIncEls = Memory_Alloc_Array_Unnamed( unsigned, topo->domains[MT_FACE]->nDomains );
incEls = Memory_Alloc_2DArray_Unnamed( unsigned, topo->domains[MT_FACE]->nDomains, 4 );
@@ -1487,6 +1532,11 @@
FreeArray( nIncEls );
FreeArray( incEls );
FreeArray( dimInds );
+
+ MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_GenEdgeVertexInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
@@ -1502,7 +1552,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating edge-vertex incidence...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
nIncEls = Memory_Alloc_Array_Unnamed( unsigned, topo->domains[MT_EDGE]->nDomains );
incEls = Memory_Alloc_2DArray_Unnamed( unsigned, topo->domains[MT_EDGE]->nDomains, 2 );
@@ -1552,6 +1602,11 @@
FreeArray( nIncEls );
FreeArray( incEls );
FreeArray( dimInds );
+
+ MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_CompleteVertexNeighbours( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
@@ -1569,7 +1624,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating vertex neighbours...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
nDims = topo->nDims;
nVerts = MeshTopology_GetDomainSize( topo, MT_VERTEX );
@@ -1650,6 +1705,11 @@
FreeArray( nNbrs );
FreeArray( nbrs );
FreeArray( inds );
+
+ MPI_Barrier( topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_MapToDomain( CartesianGenerator* self, Decomp_Sync* sync,
@@ -1682,7 +1742,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating geometry...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
/* Build grid and space for indices. */
grid = Grid_New();
@@ -1724,6 +1784,11 @@
FreeArray( inds );
FreeArray( steps );
FreeObject( grid );
+
+ MPI_Barrier( mesh->topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_GenElementTypes( CartesianGenerator* self, Mesh* mesh ) {
@@ -1735,7 +1800,7 @@
Stream_Indent( stream );
Journal_Printf( stream, "Generating element types...\n" );
- Stream_UnIndent( stream );
+ Stream_Indent( stream );
mesh->nElTypes = 1;
mesh->elTypes = Memory_Alloc_Array( Mesh_ElementType*, mesh->nElTypes, "Mesh::elTypes" );
@@ -1748,6 +1813,13 @@
if( self->regular )
Mesh_SetAlgorithms( mesh, Mesh_RegularAlgorithms_New( "" ) );
+
+ MPI_Barrier( mesh->topo->domains[MT_VERTEX]->decomp->comm );
+ Journal_Printf( stream, "... element types are '%s',\n", mesh->elTypes[0]->type );
+ Journal_Printf( stream, "... mesh algorithm type is '%s',\n", mesh->algorithms->type );
+ Journal_Printf( stream, "... done.\n" );
+ Stream_UnIndent( stream );
+ Stream_UnIndent( stream );
}
void CartesianGenerator_Destruct( CartesianGenerator* self ) {
More information about the cig-commits
mailing list