[cig-commits] r5710 - in long/3D/Gale/trunk/src/StgFEM: . SLE/ProvidedSystems/AdvectionDiffusion/src SLE/ProvidedSystems/StokesFlow/src

walter at geodynamics.org walter at geodynamics.org
Mon Jan 8 23:50:56 PST 2007


Author: walter
Date: 2007-01-08 23:50:56 -0800 (Mon, 08 Jan 2007)
New Revision: 5710

Modified:
   long/3D/Gale/trunk/src/StgFEM/
   long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/AdvectionDiffusion/src/Multicorrector.c
   long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/Stokes_SLE_UzawaSolver.c
Log:
 r928 at earth (orig r697):  LukeHodkinson | 2007-01-08 22:44:44 -0800
 Adding commands to the construct routines of the stokes
 flow solver and the multi-corrector to change the 
 matrix solver.
 



Property changes on: long/3D/Gale/trunk/src/StgFEM
___________________________________________________________________
Name: svk:merge
   - 38867592-cf10-0410-9e16-a142ea72ac34:/cig:880
db209038-57f2-0310-97fa-b160e0ae9d04:/branches/decomp3d:696
db209038-57f2-0310-97fa-b160e0ae9d04:/trunk:669
   + 38867592-cf10-0410-9e16-a142ea72ac34:/cig:880
db209038-57f2-0310-97fa-b160e0ae9d04:/branches/decomp3d:697
db209038-57f2-0310-97fa-b160e0ae9d04:/trunk:669

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/AdvectionDiffusion/src/Multicorrector.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/AdvectionDiffusion/src/Multicorrector.c	2007-01-09 07:50:52 UTC (rev 5709)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/AdvectionDiffusion/src/Multicorrector.c	2007-01-09 07:50:56 UTC (rev 5710)
@@ -179,6 +179,16 @@
 	multiCorrectorIterations = Stg_ComponentFactory_GetUnsignedInt( cf, self->name, "multiCorrectorIterations", 2 );
 
 	_AdvDiffMulticorrector_Init( self, gamma, multiCorrectorIterations );
+
+	self->matrixSolver = Stg_ComponentFactory_ConstructByKey( cf, self->name, "matrixSolver", MatrixSolver, 
+								  False, data );
+	if( !self->matrixSolver ) {
+#ifdef HAVE_PETSC
+		self->matrixSolver = (MatrixSolver*)PETScMatrixSolver_New( "" );
+#else
+		self->matrixSolver = NULL;
+#endif
+	}
 }
 
 void _AdvDiffMulticorrector_Build( void* solver, void* data ) {

Modified: long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/Stokes_SLE_UzawaSolver.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/Stokes_SLE_UzawaSolver.c	2007-01-09 07:50:52 UTC (rev 5709)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/Stokes_SLE_UzawaSolver.c	2007-01-09 07:50:56 UTC (rev 5710)
@@ -227,10 +227,6 @@
 	Stream_IndentBranch( StgFEM_Debug );
 	
  	Journal_DPrintfL( self->debug, 2, "building a standard solver for the velocity system.\n" );
-#ifndef HAVE_PETSC
-#error No PETSc!
-#endif
-	self->velSolver = (MatrixSolver*)PETScMatrixSolver_New( "" );
 	MatrixSolver_SetComm( self->velSolver, sle->comm );
 	
 	/* Build Preconditioner */
@@ -276,6 +272,16 @@
 	preconditioner = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Preconditioner", StiffnessMatrix, False, data );
 
 	_Stokes_SLE_UzawaSolver_Init( self, preconditioner, maxUzawaIterations, tolerance, useAbsoluteTolerance );
+
+	self->velSolver = Stg_ComponentFactory_ConstructByKey( cf, self->name, "matrixSolver", MatrixSolver, 
+							       False, data );
+	if( !self->velSolver ) {
+#ifdef HAVE_PETSC
+		self->velSolver = (MatrixSolver*)PETScMatrixSolver_New( "" );
+#else
+		self->velSolver = NULL;
+#endif
+	}
 }
 
 void _Stokes_SLE_UzawaSolver_Execute( void* solver, void* data ) {



More information about the cig-commits mailing list