[cig-commits] r22125 - short/3D/PyLith/trunk/libsrc/pylith/problems
brad at geodynamics.org
brad at geodynamics.org
Tue May 21 16:10:33 PDT 2013
Author: brad
Date: 2013-05-21 16:10:33 -0700 (Tue, 21 May 2013)
New Revision: 22125
Modified:
short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc
Log:
Fixed small bug in getting DM in solver.
Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc 2013-05-21 23:08:51 UTC (rev 22124)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc 2013-05-21 23:10:33 UTC (rev 22125)
@@ -234,7 +234,9 @@
PetscObject field = NULL;
PetscInt numFields;
err = DMGetNumFields(dmMesh, &numFields);PYLITH_CHECK_ERROR(err);
- if (!numFields) {err = DMSetNumFields(dmMesh, 1);PYLITH_CHECK_ERROR(err);}
+ if (!numFields) {
+ err = DMSetNumFields(dmMesh, 1);PYLITH_CHECK_ERROR(err);
+ } // if
err = DMGetField(dmMesh, 0, &field);PYLITH_CHECK_ERROR(err);
err = PetscObjectCompose(field, "nearnullspace", (PetscObject) nullsp);PYLITH_CHECK_ERROR(err);
err = MatNullSpaceDestroy(&nullsp);PYLITH_CHECK_ERROR(err);
@@ -255,7 +257,7 @@
assert(pc);
assert(formulation);
- PetscDM dmMesh = fields.mesh().dmMesh();assert(dmMesh);
+ PetscDM dmMesh = fields.solution().dmMesh();assert(dmMesh);
MPI_Comm comm;
PetscSection solutionSection = fields.solution().petscSection();assert(solutionSection);
PetscVec solutionVec = fields.solution().localVector();assert(solutionVec);
More information about the CIG-COMMITS
mailing list