[cig-commits] r5707 - in long/3D/Gale/trunk/src/StGermain: . Discretisation/Mesh/src

walter at geodynamics.org walter at geodynamics.org
Mon Jan 8 23:49:51 PST 2007


Author: walter
Date: 2007-01-08 23:49:51 -0800 (Mon, 08 Jan 2007)
New Revision: 5707

Modified:
   long/3D/Gale/trunk/src/StGermain/
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CartesianGenerator.c
Log:
 r3272 at earth (orig r3953):  LukeHodkinson | 2007-01-08 22:29:33 -0800
 Adding a bunch of journal commands to more easily
 determine if the mesh generation has crashed or
 is just taking its sweet time.
 



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:3952
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3899
   + 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:3196
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/branches/decomp3d/StGermain:3953
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-01-09 07:49:48 UTC (rev 5706)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/CartesianGenerator.c	2007-01-09 07:49:51 UTC (rev 5707)
@@ -362,6 +362,7 @@
 
 void CartesianGenerator_Generate( void* meshGenerator, void* _mesh ) {
 	CartesianGenerator*	self = (CartesianGenerator*)meshGenerator;
+	Stream*			stream = Journal_Register( Info_Type, self->type );
 	Mesh*			mesh = (Mesh*)_mesh;
 	Grid**			grid;
 	unsigned		*localRange, *localOrigin;
@@ -370,6 +371,9 @@
 	assert( self );
 	assert( !self->elGrid || mesh );
 
+	Journal_Printf( stream, "Cartesian generator: '%s'\n", self->name );
+	Journal_Printf( stream, "Target mesh: '%s'\n", mesh->name );
+
 	/* If we havn't been given anything, don't do anything. */
 	if( self->elGrid ) {
 		/* Fill topological values. */
@@ -718,6 +722,7 @@
 }
 
 void CartesianGenerator_GenElements( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
 	Grid*		grid;
 	unsigned	nEls;
 	unsigned*	els;
@@ -728,6 +733,10 @@
 	assert( topo );
 	assert( grids );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating elements...\n" );
+	Stream_UnIndent( stream );
+
 	grid = Grid_New();
 	Grid_SetNDims( grid, self->elGrid->nDims );
 	Grid_SetSizes( grid, self->range );
@@ -754,6 +763,7 @@
 }
 
 void CartesianGenerator_GenVertices( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
 	Grid*		globalGrid;
 	Grid*		grid;
 	unsigned	nEls;
@@ -765,6 +775,10 @@
 	assert( topo );
 	assert( grids );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating vertices...\n" );
+	Stream_UnIndent( stream );
+
 	globalGrid = Grid_New();
 	Grid_SetNDims( globalGrid, self->elGrid->nDims );
 	for( d_i = 0; d_i < globalGrid->nDims; d_i++ )
@@ -827,11 +841,17 @@
 }
 
 void CartesianGenerator_GenEdges( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
+
 	assert( self );
 	assert( topo );
 	assert( self->elGrid->nDims >= 2 );
 	assert( self->elGrid->nDims <= 3 );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating edges...\n" );
+	Stream_UnIndent( stream );
+
 	if( self->elGrid->nDims == 2 )
 		CartesianGenerator_GenEdges2D( self, topo, grids );
 	else
@@ -1016,6 +1036,7 @@
 }
 
 void CartesianGenerator_GenFaces( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
 	Grid*		globalGrid;
 	unsigned	nGlobalEls[2];
 	Grid*		grid;
@@ -1029,6 +1050,10 @@
 	assert( grids );
 	assert( self->elGrid->nDims == 3 );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating faces...\n" );
+	Stream_UnIndent( stream );
+
 	globalGrid = Grid_New();
 	Grid_SetNDims( globalGrid, self->elGrid->nDims );
 	self->elGrid->sizes[2]++;
@@ -1110,6 +1135,7 @@
 }
 
 void CartesianGenerator_GenElementVertexInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
 	unsigned*	nIncEls;
 	unsigned**	incEls;
 	unsigned*	dimInds;
@@ -1120,6 +1146,10 @@
 	assert( topo );
 	assert( grids );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating element-vertex incidence...\n" );
+	Stream_UnIndent( stream );
+
 	vertsPerEl = (topo->nDims == 1) ? 2 : (topo->nDims == 2) ? 4 : 8;
 	if( self->enableCNodes )
 		vertsPerEl += 1;
@@ -1182,6 +1212,7 @@
 }
 
 void CartesianGenerator_GenVolumeEdgeInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
 	unsigned*	nIncEls;
 	unsigned**	incEls;
 	unsigned*	dimInds;
@@ -1192,6 +1223,10 @@
 	assert( grids );
 	assert( topo->nDims >= 3 );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating volume-edge incidence...\n" );
+	Stream_UnIndent( stream );
+
 	nIncEls = Memory_Alloc_Array_Unnamed( unsigned, topo->domains[topo->nDims]->nDomains );
 	incEls = Memory_Alloc_2DArray_Unnamed( unsigned, topo->domains[topo->nDims]->nDomains, 12 );
 	dimInds = Memory_Alloc_Array_Unnamed( unsigned, topo->nDims );
@@ -1251,6 +1286,7 @@
 }
 
 void CartesianGenerator_GenVolumeFaceInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
 	unsigned*	nIncEls;
 	unsigned**	incEls;
 	unsigned*	dimInds;
@@ -1261,6 +1297,10 @@
 	assert( grids );
 	assert( topo->nDims >= 3 );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating volume-face incidence...\n" );
+	Stream_UnIndent( stream );
+
 	nIncEls = Memory_Alloc_Array_Unnamed( unsigned, topo->domains[topo->nDims]->nDomains );
 	incEls = Memory_Alloc_2DArray_Unnamed( unsigned, topo->domains[topo->nDims]->nDomains, 6 );
 	dimInds = Memory_Alloc_Array_Unnamed( unsigned, topo->nDims );
@@ -1298,6 +1338,7 @@
 }
 
 void CartesianGenerator_GenFaceVertexInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
 	unsigned*	nIncEls;
 	unsigned**	incEls;
 	unsigned*	dimInds;
@@ -1308,6 +1349,10 @@
 	assert( grids );
 	assert( topo->nDims >= 2 );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating face-vertex incidence...\n" );
+	Stream_UnIndent( stream );
+
 	nIncEls = Memory_Alloc_Array_Unnamed( unsigned, topo->domains[MT_FACE]->nDomains );
 	incEls = Memory_Alloc_2DArray_Unnamed( unsigned, topo->domains[MT_FACE]->nDomains, 4 );
 	dimInds = Memory_Alloc_Array_Unnamed( unsigned, topo->nDims );
@@ -1383,6 +1428,7 @@
 }
 
 void CartesianGenerator_GenFaceEdgeInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
 	unsigned*	nIncEls;
 	unsigned**	incEls;
 	unsigned*	dimInds;
@@ -1393,6 +1439,10 @@
 	assert( grids );
 	assert( topo->nDims >= 2 );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating face-edge incidence...\n" );
+	Stream_UnIndent( stream );
+
 	nIncEls = Memory_Alloc_Array_Unnamed( unsigned, topo->domains[MT_FACE]->nDomains );
 	incEls = Memory_Alloc_2DArray_Unnamed( unsigned, topo->domains[MT_FACE]->nDomains, 4 );
 	dimInds = Memory_Alloc_Array_Unnamed( unsigned, topo->nDims );
@@ -1462,6 +1512,7 @@
 }
 
 void CartesianGenerator_GenEdgeVertexInc( CartesianGenerator* self, MeshTopology* topo, Grid*** grids ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
 	unsigned*	nIncEls;
 	unsigned**	incEls;
 	unsigned*	dimInds;
@@ -1471,6 +1522,10 @@
 	assert( topo );
 	assert( grids );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating edge-vertex incidence...\n" );
+	Stream_UnIndent( stream );
+
 	nIncEls = Memory_Alloc_Array_Unnamed( unsigned, topo->domains[MT_EDGE]->nDomains );
 	incEls = Memory_Alloc_2DArray_Unnamed( unsigned, topo->domains[MT_EDGE]->nDomains, 2 );
 	dimInds = Memory_Alloc_Array_Unnamed( unsigned, topo->nDims );
@@ -1540,6 +1595,7 @@
 }
 
 void CartesianGenerator_GenGeom( CartesianGenerator* self, Mesh* mesh ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
 	Grid*		grid;
 	unsigned*	inds;
 	double*		steps;
@@ -1548,6 +1604,10 @@
 	assert( self );
 	assert( mesh );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating geometry...\n" );
+	Stream_UnIndent( stream );
+
 	/* Build grid and space for indices. */
 	grid = Grid_New();
 	Grid_SetNDims( grid, mesh->topo->nDims );
@@ -1591,11 +1651,16 @@
 }
 
 void CartesianGenerator_GenElementTypes( CartesianGenerator* self, Mesh* mesh ) {
+	Stream*		stream = Journal_Register( Info_Type, self->type );
 	unsigned	nDomainEls;
 	unsigned	e_i;
 
 	assert( self );
 
+	Stream_Indent( stream );
+	Journal_Printf( stream, "Generating element types...\n" );
+	Stream_UnIndent( stream );
+
 	mesh->nElTypes = 1;
 	mesh->elTypes = Memory_Alloc_Array( Mesh_ElementType*, mesh->nElTypes, "Mesh::elTypes" );
 	mesh->elTypes[0] = (Mesh_ElementType*)Mesh_HexType_New();



More information about the cig-commits mailing list