[cig-commits] r22167 - short/3D/PyLith/trunk/libsrc/pylith/topology
knepley at geodynamics.org
knepley at geodynamics.org
Thu May 30 04:19:52 PDT 2013
Author: knepley
Date: 2013-05-30 04:19:51 -0700 (Thu, 30 May 2013)
New Revision: 22167
Modified:
short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorMesh.hh
short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorMesh.icc
Log:
Updated calls to DMPlexMatSetClosure()
Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorMesh.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorMesh.hh 2013-05-30 03:45:03 UTC (rev 22166)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorMesh.hh 2013-05-30 11:19:51 UTC (rev 22167)
@@ -198,6 +198,7 @@
const PetscMat _mat; ///< Cached PETSc matrix.
PetscDM _dm; ///< Cached PETSc dm for mesh.
PetscSection _section; ///< Cached PETSc section.
+ PetscSection _globalSection; ///< Cached PETSc global section.
// NOT IMPLEMENTED //////////////////////////////////////////////////////
private :
Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorMesh.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorMesh.icc 2013-05-30 03:45:03 UTC (rev 22166)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorMesh.icc 2013-05-30 11:19:51 UTC (rev 22167)
@@ -188,10 +188,16 @@
const Field& field) :
_mat(mat),
_dm(NULL),
- _section(NULL)
+ _section(NULL),
+ _globalSection(NULL)
{ // constructor
+ PetscSF sf = NULL;
+ PetscErrorCode err;
+
_dm = field.mesh().dmMesh();assert(_dm);
_section = field.petscSection();assert(_section);
+ err = DMGetPointSF(_dm, &sf);PYLITH_CHECK_ERROR(err);assert(sf);
+ err = PetscSectionCreateGlobalSection(_section, sf, PETSC_FALSE, &_globalSection);PYLITH_CHECK_ERROR(err);assert(_globalSection);
initialize();
} // constructor
@@ -205,6 +211,7 @@
_dm = NULL;
_section = NULL;
+ PetscErrorCode err = PetscSectionDestroy(&_globalSection);assert(!_globalSection);
} // destructor
// ----------------------------------------------------------------------
@@ -236,7 +243,8 @@
assert(_dm);
assert(_mat);
assert(_section);
- PetscErrorCode err = DMPlexMatSetClosure(_dm, _section, NULL, _mat, cell, valuesCell, mode);PYLITH_CHECK_ERROR(err);
+ assert(_globalSection);
+ PetscErrorCode err = DMPlexMatSetClosure(_dm, _section, _globalSection, _mat, cell, valuesCell, mode);PYLITH_CHECK_ERROR(err);
} // setClosure
More information about the CIG-COMMITS
mailing list