[cig-commits] r22126 - in short/3D/PyLith/trunk: libsrc/pylith/faults pylith/problems
knepley at geodynamics.org
knepley at geodynamics.org
Tue May 21 17:21:05 PDT 2013
Author: knepley
Date: 2013-05-21 17:21:05 -0700 (Tue, 21 May 2013)
New Revision: 22126
Modified:
short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
short/3D/PyLith/trunk/pylith/problems/Formulation.py
Log:
Fixed name of constraint field (must be in alphabetic order), fixed Lagrange vertex dof
Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc 2013-05-21 23:10:33 UTC (rev 22125)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc 2013-05-22 00:21:05 UTC (rev 22126)
@@ -132,7 +132,7 @@
PetscDM dmMesh = field->dmMesh();assert(dmMesh);
PetscSection fieldSection = field->petscSection();assert(fieldSection);
const PetscInt spaceDim = field->mesh().dimension();
- PetscInt numFields, numComp, pStart, pEnd;
+ PetscInt numFields, numComp;
PetscErrorCode err;
err = PetscSectionGetNumFields(fieldSection, &numFields);PYLITH_CHECK_ERROR(err);
@@ -150,17 +150,9 @@
PetscInt dof;
err = PetscSectionGetDof(fieldSection, v_lagrange, &dof);PYLITH_CHECK_ERROR(err);assert(spaceDim == dof);
+ err = PetscSectionSetFieldDof(fieldSection, v_lagrange, 0, 0);PYLITH_CHECK_ERROR(err);
err = PetscSectionSetFieldDof(fieldSection, v_lagrange, 1, dof);PYLITH_CHECK_ERROR(err);
} // for
- err = PetscSectionGetChart(fieldSection, &pStart, &pEnd);PYLITH_CHECK_ERROR(err);
- for(PetscInt p = pStart; p < pEnd; ++p) {
- PetscInt dof;
- err = PetscSectionGetFieldDof(fieldSection, p, 1, &dof);PYLITH_CHECK_ERROR(err);
- if (!dof) {
- err = PetscSectionGetDof(fieldSection, p, &dof);PYLITH_CHECK_ERROR(err);assert(spaceDim == dof);
- err = PetscSectionSetFieldDof(fieldSection, p, 0, dof);PYLITH_CHECK_ERROR(err);
- } // if
- } // for
PYLITH_METHOD_END;
} // splitField
Modified: short/3D/PyLith/trunk/pylith/problems/Formulation.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Formulation.py 2013-05-21 23:10:33 UTC (rev 22125)
+++ short/3D/PyLith/trunk/pylith/problems/Formulation.py 2013-05-22 00:21:05 UTC (rev 22126)
@@ -520,7 +520,7 @@
solution = self.fields.get("dispIncr(t->t+dt)")
solution.addField("displacement", dimension)
if self.splitFields():
- solution.addField("constraints", dimension)
+ solution.addField("fault constraints", dimension)
solution.setupFields()
solution.newSection(solution.VERTICES_FIELD, dimension)
solution.updateDof("displacement", solution.VERTICES_FIELD, dimension)
More information about the CIG-COMMITS
mailing list