[cig-commits] r22127 - in short/3D/PyLith/trunk/libsrc/pylith: faults problems topology

brad at geodynamics.org brad at geodynamics.org
Tue May 21 17:22:55 PDT 2013


Author: brad
Date: 2013-05-21 17:22:55 -0700 (Tue, 21 May 2013)
New Revision: 22127

Modified:
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/SolverLinear.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc
   short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc
Log:
Cleanup.

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2013-05-22 00:21:05 UTC (rev 22126)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2013-05-22 00:22:55 UTC (rev 22127)
@@ -131,15 +131,17 @@
 
   PetscDM dmMesh = field->dmMesh();assert(dmMesh);
   PetscSection fieldSection  = field->petscSection();assert(fieldSection);
-  const PetscInt spaceDim = field->mesh().dimension();
   PetscInt numFields, numComp;
 
+  assert(_quadrature);
+  const int spaceDim = _quadrature->spaceDim();
+
   PetscErrorCode err;
   err = PetscSectionGetNumFields(fieldSection, &numFields);PYLITH_CHECK_ERROR(err);
-  // TODO: Does this make sense?
   if (!numFields) {
     PYLITH_METHOD_END;
   } // if
+
   assert(2 == numFields);
   err = PetscSectionGetFieldComponents(fieldSection, 0, &numComp);PYLITH_CHECK_ERROR(err);assert(numComp == spaceDim);
   err = PetscSectionGetFieldComponents(fieldSection, 1, &numComp);PYLITH_CHECK_ERROR(err);assert(numComp == spaceDim);

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc	2013-05-22 00:21:05 UTC (rev 22126)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc	2013-05-22 00:22:55 UTC (rev 22127)
@@ -262,11 +262,10 @@
   PetscSection solutionSection = fields.solution().petscSection();assert(solutionSection);
   PetscVec solutionVec = fields.solution().localVector();assert(solutionVec);
   PetscVec solutionGlobalVec = fields.solution().globalVector();assert(solutionGlobalVec);
-  PetscInt spaceDim, numFields;
+  PetscInt numFields;
   PetscErrorCode err;
 
   err = PetscObjectGetComm((PetscObject) dmMesh, &comm);PYLITH_CHECK_ERROR(err);
-  err = DMPlexGetDimension(dmMesh, &spaceDim);PYLITH_CHECK_ERROR(err);
 
   err = PCSetDM(*pc, dmMesh);PYLITH_CHECK_ERROR(err);
   err = PCSetType(*pc, PCFIELDSPLIT);PYLITH_CHECK_ERROR(err);

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/SolverLinear.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/SolverLinear.cc	2013-05-22 00:21:05 UTC (rev 22126)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/SolverLinear.cc	2013-05-22 00:22:55 UTC (rev 22127)
@@ -87,7 +87,6 @@
     _setupFieldSplit(&pc, formulation, jacobian, fields);
   } // if
 
-  // :TODO: MATT Does this go here?
   _createNullSpace(fields);
 
   PYLITH_METHOD_END;

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc	2013-05-22 00:21:05 UTC (rev 22126)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc	2013-05-22 00:22:55 UTC (rev 22127)
@@ -124,7 +124,6 @@
     _setupFieldSplit(&pc, formulation, jacobian, fields);
   } // if
 
-  // :TODO: MATT Does this go here?
   _createNullSpace(fields);
 
   PYLITH_METHOD_END;

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc	2013-05-22 00:21:05 UTC (rev 22126)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc	2013-05-22 00:22:55 UTC (rev 22127)
@@ -1295,14 +1295,7 @@
     err = PetscSectionSetFieldComponents(section, f, f_iter->second);PYLITH_CHECK_ERROR(err);
   } // for
   _tmpFields.clear();
-#if 0 // :MATT: What is going on here? Is this obsolete?
-  // Right now, we assume that the section covers the entire chart
-  PetscInt pStart, pEnd;
 
-  err = DMPlexGetChart(_dm, &pStart, &pEnd);PYLITH_CHECK_ERROR(err);
-  err = PetscSectionSetChart(section, pStart, pEnd);PYLITH_CHECK_ERROR(err);
-#endif
-
   PYLITH_METHOD_END;
 } // setupFields
 
@@ -1345,7 +1338,7 @@
   } // for
   assert(f < _metadata.size());
   for(PetscInt p = pStart; p < pEnd; ++p) {
-    //err = PetscSectionAddDof(section, p, fiberDim);PYLITH_CHECK_ERROR(err);
+    //err = PetscSectionAddDof(section, p, fiberDim);PYLITH_CHECK_ERROR(err); // Future use
     err = PetscSectionSetFieldDof(section, p, f, fiberDim);PYLITH_CHECK_ERROR(err);
   } // for
 



More information about the CIG-COMMITS mailing list