[cig-commits] [commit] knepley/upgrade-petsc-interface: Work on removing use of newSection(). Code commented out. (a289b5b)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Jan 17 17:20:46 PST 2014
Repository : ssh://geoshell/pylith
On branch : knepley/upgrade-petsc-interface
Link : https://github.com/geodynamics/pylith/compare/7a219dfd15d0b9fda084e39111a258bc97b47814...a289b5b9fb88708d2d1cdfbaf7bd2f3b7c8d91a4
>---------------------------------------------------------------
commit a289b5b9fb88708d2d1cdfbaf7bd2f3b7c8d91a4
Author: Brad Aagaard <baagaard at usgs.gov>
Date: Fri Jan 17 17:20:16 2014 -0800
Work on removing use of newSection(). Code commented out.
Not sure why settting up subfields isn't working. Wrong PetscDM in
fields?
>---------------------------------------------------------------
a289b5b9fb88708d2d1cdfbaf7bd2f3b7c8d91a4
unittests/libtests/feassemble/TestElasticityImplicit.cc | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/unittests/libtests/feassemble/TestElasticityImplicit.cc b/unittests/libtests/feassemble/TestElasticityImplicit.cc
index fa34f73..64f522a 100644
--- a/unittests/libtests/feassemble/TestElasticityImplicit.cc
+++ b/unittests/libtests/feassemble/TestElasticityImplicit.cc
@@ -321,6 +321,7 @@ pylith::feassemble::TestElasticityImplicit::testStableTimeStep(void)
PYLITH_METHOD_END;
} // testStableTimeStep
+// ----------------------------------------------------------------------
// Initialize elasticity integrator.
void
pylith::feassemble::TestElasticityImplicit::_initialize(topology::Mesh* mesh,
@@ -344,7 +345,7 @@ pylith::feassemble::TestElasticityImplicit::_initialize(topology::Mesh* mesh,
const PetscBool interpolate = PETSC_FALSE;
PetscErrorCode err;
err = DMPlexCreateFromCellList(PETSC_COMM_WORLD, _data->cellDim, _data->numCells, _data->numVertices, _data->numBasis, interpolate, _data->cells, _data->spaceDim, _data->vertices, &dmMesh);PYLITH_CHECK_ERROR(err);
- mesh->dmMesh(dmMesh, "domain");
+ mesh->dmMesh(dmMesh);
// Material ids
PetscInt cStart, cEnd;
@@ -404,9 +405,18 @@ pylith::feassemble::TestElasticityImplicit::_initialize(topology::Mesh* mesh,
fields->solutionName("dispIncr(t->t+dt)");
topology::Field& residual = fields->get("residual");
+#if 1
residual.newSection(topology::FieldBase::VERTICES_FIELD, _data->spaceDim);
+#else
+ residual.subfieldAdd("displacement", spaceDim, topology::Field::VECTOR, lengthScale);
+ residual.subfieldAdd("lagrange_multiplier", spaceDim, topology::Field::VECTOR);
+
+ residual.subfieldsSetup();
+ residual.setupSolnChart();
+ residual.setupSolnDof(spaceDim);
+#endif
residual.allocate();
- residual.zero();
+ residual.zeroAll();
fields->copyLayout("residual");
topology::VecVisitorMesh dispTVisitor(fields->get("disp(t)"));
More information about the CIG-COMMITS
mailing list