[cig-commits] r14639 - in mc/3D/CitcomS/trunk: CitcomS/Components/Stokes_solver lib module

tan2 at geodynamics.org tan2 at geodynamics.org
Wed Apr 8 16:31:12 PDT 2009


Author: tan2
Date: 2009-04-08 16:31:11 -0700 (Wed, 08 Apr 2009)
New Revision: 14639

Modified:
   mc/3D/CitcomS/trunk/CitcomS/Components/Stokes_solver/Incompressible.py
   mc/3D/CitcomS/trunk/lib/Construct_arrays.c
   mc/3D/CitcomS/trunk/lib/Full_parallel_related.c
   mc/3D/CitcomS/trunk/lib/Full_version_dependent.c
   mc/3D/CitcomS/trunk/lib/General_matrix_functions.c
   mc/3D/CitcomS/trunk/lib/Instructions.c
   mc/3D/CitcomS/trunk/lib/Regional_parallel_related.c
   mc/3D/CitcomS/trunk/lib/Regional_sphere_related.c
   mc/3D/CitcomS/trunk/lib/Regional_version_dependent.c
   mc/3D/CitcomS/trunk/lib/Size_does_matter.c
   mc/3D/CitcomS/trunk/lib/Solver_conj_grad.c
   mc/3D/CitcomS/trunk/lib/Solver_multigrid.c
   mc/3D/CitcomS/trunk/lib/global_defs.h
   mc/3D/CitcomS/trunk/module/bindings.c
   mc/3D/CitcomS/trunk/module/stokes_solver.c
   mc/3D/CitcomS/trunk/module/stokes_solver.h
Log:
Removed multigrid-el option of stokes solver, which is broken for a long time and not used by anyone.


Modified: mc/3D/CitcomS/trunk/CitcomS/Components/Stokes_solver/Incompressible.py
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/Components/Stokes_solver/Incompressible.py	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/CitcomS/Components/Stokes_solver/Incompressible.py	2009-04-08 23:31:11 UTC (rev 14639)
@@ -47,13 +47,11 @@
 
     def initialize(self, all_variables):
         CitcomComponent.initialize(self, all_variables)
-        from CitcomSLib import set_cg_defaults, set_mg_defaults, set_mg_el_defaults
+        from CitcomSLib import set_cg_defaults, set_mg_defaults
         if self.inventory.Solver == "cgrad":
             set_cg_defaults(self.all_variables)
         elif self.inventory.Solver == "multigrid":
             set_mg_defaults(self.all_variables)
-        elif self.inventory.Solver == "multigrid-el":
-            set_mg_el_defaults(self.all_variables)
         return
 
 
@@ -84,8 +82,7 @@
 
         Solver = prop.str("Solver", default="cgrad",
                  validator=prop.choice(["cgrad",
-                                        "multigrid",
-                                        "multigrid-el"]))
+                                        "multigrid"]))
         node_assemble = prop.bool("node_assemble", default=True)
         precond = prop.bool("precond", default=True)
 

Modified: mc/3D/CitcomS/trunk/lib/Construct_arrays.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Construct_arrays.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/Construct_arrays.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -614,7 +614,7 @@
 	  ely = E->lmesh.ELY[lev];
 	  elxu = 2 * elx;
 	  elzu = 2 * elz;
-          if (!(E->control.NMULTIGRID||E->control.EMULTIGRID))  {
+          if (!E->control.NMULTIGRID)  {
              elzu = 1;
              if (lev == E->mesh.levmax-1)
                  elzu = E->lmesh.ELZ[E->mesh.levmax];

Modified: mc/3D/CitcomS/trunk/lib/Full_parallel_related.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Full_parallel_related.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/Full_parallel_related.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -275,7 +275,7 @@
 
   for(i=E->mesh.levmax;i>=E->mesh.levmin;i--)   {
 
-     if (E->control.NMULTIGRID||E->control.EMULTIGRID)  {
+     if (E->control.NMULTIGRID)  {
         nox = E->lmesh.elx/(int)pow(2.0,(double)(E->mesh.levmax-i))+1;
         noy = E->lmesh.ely/(int)pow(2.0,(double)(E->mesh.levmax-i))+1;
         noz = E->lmesh.elz/(int)pow(2.0,(double)(E->mesh.levmax-i))+1;

Modified: mc/3D/CitcomS/trunk/lib/Full_version_dependent.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Full_version_dependent.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/Full_version_dependent.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -145,7 +145,7 @@
 
   for (lev=E->mesh.levmin;lev<=E->mesh.levmax;lev++) {
 
-    if (E->control.NMULTIGRID||E->control.EMULTIGRID)
+    if (E->control.NMULTIGRID)
         step = (int) pow(2.0,(double)(E->mesh.levmax-lev));
     else
         step = 1;

Modified: mc/3D/CitcomS/trunk/lib/General_matrix_functions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/General_matrix_functions.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/General_matrix_functions.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -86,7 +86,7 @@
   count = 0;
   initial_time=CPU_time0();
 
-  if (!(E->control.NMULTIGRID || E->control.EMULTIGRID)) {
+  if (!E->control.NMULTIGRID) {
     /* conjugate gradient solution */
 
     cycles = E->control.v_steps_low;

Modified: mc/3D/CitcomS/trunk/lib/Instructions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Instructions.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/Instructions.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -330,14 +330,9 @@
 
   input_string("Solver",E->control.SOLVER_TYPE,"cgrad",m);
   if ( strcmp(E->control.SOLVER_TYPE,"cgrad") == 0)
-    { E->control.CONJ_GRAD = 1;
-    set_cg_defaults(E);}
+    set_cg_defaults(E);
   else if ( strcmp(E->control.SOLVER_TYPE,"multigrid") == 0)
-    { E->control.NMULTIGRID = 1;
-    set_mg_defaults(E);}
-  else if ( strcmp(E->control.SOLVER_TYPE,"multigrid-el") == 0)
-    { E->control.EMULTIGRID = 1;
-    set_mg_defaults(E);}
+    set_mg_defaults(E);
   else
     { if (E->parallel.me==0) fprintf(stderr,"Unable to determine how to solve, specify Solver=VALID_OPTION \n");
     parallel_process_termination();
@@ -1178,7 +1173,6 @@
     E->control.AXI = 0;
     E->control.CONJ_GRAD = 0;
     E->control.NMULTIGRID = 0;
-    E->control.EMULTIGRID = 0;
     E->control.augmented_Lagr = 0;
     E->control.augmented = 0.0;
 

Modified: mc/3D/CitcomS/trunk/lib/Regional_parallel_related.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Regional_parallel_related.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/Regional_parallel_related.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -241,7 +241,7 @@
 
   for(i=E->mesh.levmax;i>=E->mesh.levmin;i--)   {
 
-     if (E->control.NMULTIGRID||E->control.EMULTIGRID)  {
+     if (E->control.NMULTIGRID)  {
         nox = E->mesh.mgunitx * (int) pow(2.0,(double)i) + 1;
         noy = E->mesh.mgunity * (int) pow(2.0,(double)i) + 1;
         noz = E->lmesh.elz/(int)pow(2.0,(double)(E->mesh.levmax-i))+1;

Modified: mc/3D/CitcomS/trunk/lib/Regional_sphere_related.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Regional_sphere_related.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/Regional_sphere_related.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -133,7 +133,7 @@
     
     for (lev=E->mesh.gridmin;lev<=E->mesh.gridmax;lev++)  {
       
-      if (E->control.NMULTIGRID||E->control.EMULTIGRID)
+      if (E->control.NMULTIGRID)
         step = (int) pow(2.0,(double)(E->mesh.levmax-lev));
       else
         step = 1;

Modified: mc/3D/CitcomS/trunk/lib/Regional_version_dependent.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Regional_version_dependent.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/Regional_version_dependent.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -127,7 +127,7 @@
 
   for (lev=E->mesh.levmin;lev<=E->mesh.levmax;lev++) {
 
-    if (E->control.NMULTIGRID||E->control.EMULTIGRID)
+    if (E->control.NMULTIGRID)
         step = (int) pow(2.0,(double)(E->mesh.levmax-lev));
     else
         step = 1;

Modified: mc/3D/CitcomS/trunk/lib/Size_does_matter.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Size_does_matter.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/Size_does_matter.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -1107,7 +1107,7 @@
                 for(node=1;node<=E->lmesh.NNO[lev];node++)
                     E->NMass[m][node] = E->MASS[lev][m][node];
 
-        if (E->control.NMULTIGRID||E->control.EMULTIGRID||E->mesh.levmax==lev)
+        if (E->control.NMULTIGRID||E->mesh.levmax==lev)
             (E->exchange_node_d)(E,E->MASS[lev],lev);
 
         for (m=1;m<=E->sphere.caps_per_proc;m++)

Modified: mc/3D/CitcomS/trunk/lib/Solver_conj_grad.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Solver_conj_grad.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/Solver_conj_grad.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -34,6 +34,7 @@
   void solve_constrained_flow_iterative();
   void cg_allocate_vars();
 
+  E->control.CONJ_GRAD = 1;
   E->build_forcing_term =   assemble_forces_iterative;
   E->solve_stokes_problem = solve_constrained_flow_iterative;
   E->solver_allocate_vars = cg_allocate_vars;

Modified: mc/3D/CitcomS/trunk/lib/Solver_multigrid.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Solver_multigrid.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/Solver_multigrid.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -36,6 +36,7 @@
   void solve_constrained_flow_iterative();
   void mg_allocate_vars();
 
+  E->control.NMULTIGRID = 1;
   E->build_forcing_term =   assemble_forces_iterative;
   E->solve_stokes_problem = solve_constrained_flow_iterative;
   E->solver_allocate_vars = mg_allocate_vars;

Modified: mc/3D/CitcomS/trunk/lib/global_defs.h
===================================================================
--- mc/3D/CitcomS/trunk/lib/global_defs.h	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/lib/global_defs.h	2009-04-08 23:31:11 UTC (rev 14639)
@@ -422,7 +422,6 @@
     int DIRECT;
     int CONJ_GRAD;
     int NMULTIGRID;
-    int EMULTIGRID;
     int DIRECTII;
 
     char NODE_SPACING[20]; /* turns into ... */

Modified: mc/3D/CitcomS/trunk/module/bindings.c
===================================================================
--- mc/3D/CitcomS/trunk/module/bindings.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/module/bindings.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -362,11 +362,6 @@
      METH_VARARGS,
      pyCitcom_set_mg_defaults__doc__},
 
-    {pyCitcom_set_mg_el_defaults__name__,
-     pyCitcom_set_mg_el_defaults,
-     METH_VARARGS,
-     pyCitcom_set_mg_el_defaults__doc__},
-
     {pyCitcom_solve_constrained_flow_iterative__name__,
      pyCitcom_solve_constrained_flow_iterative,
      METH_VARARGS,

Modified: mc/3D/CitcomS/trunk/module/stokes_solver.c
===================================================================
--- mc/3D/CitcomS/trunk/module/stokes_solver.c	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/module/stokes_solver.c	2009-04-08 23:31:11 UTC (rev 14639)
@@ -194,7 +194,6 @@
 
     E = (struct All_variables*)(PyCObject_AsVoidPtr(obj));
 
-    E->control.CONJ_GRAD = 1;
     set_cg_defaults(E);
 
     Py_INCREF(Py_None);
@@ -216,7 +215,6 @@
 
     E = (struct All_variables*)(PyCObject_AsVoidPtr(obj));
 
-    E->control.NMULTIGRID = 1;
     set_mg_defaults(E);
 
     Py_INCREF(Py_None);
@@ -225,28 +223,6 @@
 
 
 
-char pyCitcom_set_mg_el_defaults__doc__[] = "";
-char pyCitcom_set_mg_el_defaults__name__[] = "set_mg_el_defaults";
-
-PyObject * pyCitcom_set_mg_el_defaults(PyObject *self, PyObject *args)
-{
-    PyObject *obj;
-    struct All_variables* E;
-
-    if (!PyArg_ParseTuple(args, "O:set_mg_el_defaults", &obj))
-        return NULL;
-
-    E = (struct All_variables*)(PyCObject_AsVoidPtr(obj));
-
-    E->control.EMULTIGRID = 1;
-    set_mg_defaults(E);
-
-    Py_INCREF(Py_None);
-    return Py_None;
-}
-
-
-
 char pyCitcom_solve_constrained_flow_iterative__doc__[] = "";
 char pyCitcom_solve_constrained_flow_iterative__name__[] = "solve_constrained_flow_iterative";
 

Modified: mc/3D/CitcomS/trunk/module/stokes_solver.h
===================================================================
--- mc/3D/CitcomS/trunk/module/stokes_solver.h	2009-04-08 23:27:51 UTC (rev 14638)
+++ mc/3D/CitcomS/trunk/module/stokes_solver.h	2009-04-08 23:31:11 UTC (rev 14639)
@@ -68,11 +68,6 @@
 PyObject * pyCitcom_set_mg_defaults(PyObject *, PyObject *);
 
 
-extern char pyCitcom_set_mg_el_defaults__name__[];
-extern char pyCitcom_set_mg_el_defaults__doc__[];
-PyObject * pyCitcom_set_mg_el_defaults(PyObject *, PyObject *);
-
-
 extern char pyCitcom_solve_constrained_flow_iterative__name__[];
 extern char pyCitcom_solve_constrained_flow_iterative__doc__[];
 PyObject * pyCitcom_solve_constrained_flow_iterative(PyObject *, PyObject *);



More information about the CIG-COMMITS mailing list