[cig-commits] r18791 - in short/3D/PyLith/branches/v1.6-stable: libsrc/pylith/faults libsrc/pylith/topology pylith/problems
brad at geodynamics.org
brad at geodynamics.org
Thu Jul 21 11:27:36 PDT 2011
Author: brad
Date: 2011-07-21 11:27:34 -0700 (Thu, 21 Jul 2011)
New Revision: 18791
Modified:
short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc
short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveTract.cc
short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/Distributor.cc
short/3D/PyLith/branches/v1.6-stable/pylith/problems/ExplicitLumped.py
short/3D/PyLith/branches/v1.6-stable/pylith/problems/Formulation.py
short/3D/PyLith/branches/v1.6-stable/pylith/problems/Implicit.py
Log:
Fixed setting field metadata. Set after newSection() since newSection now clears the metadata.
Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc 2011-07-21 03:22:30 UTC (rev 18790)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc 2011-07-21 18:27:34 UTC (rev 18791)
@@ -1826,8 +1826,8 @@
topology::Field<topology::SubMesh>& area = _fields->get("area");
const topology::Field<topology::SubMesh>& slip = _fields->get("slip");
area.newSection(slip, 1);
+ area.allocate();
area.vectorFieldType(topology::FieldBase::SCALAR);
- area.allocate();
area.zero();
const ALE::Obj<RealSection>& areaSection = area.section();
assert(!areaSection.isNull());
Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveTract.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveTract.cc 2011-07-21 03:22:30 UTC (rev 18790)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveTract.cc 2011-07-21 18:27:34 UTC (rev 18791)
@@ -302,10 +302,10 @@
// Create section to hold initial tractions.
_fields->add("initial traction", "initial_traction");
topology::Field<topology::SubMesh>& traction = _fields->get("initial traction");
+ traction.newSection(topology::FieldBase::CELLS_FIELD, numQuadPts*spaceDim);
+ traction.allocate();
traction.scale(pressureScale);
traction.vectorFieldType(topology::FieldBase::MULTI_VECTOR);
- traction.newSection(topology::FieldBase::CELLS_FIELD, numQuadPts*spaceDim);
- traction.allocate();
const ALE::Obj<RealSection>& tractionSection = traction.section();
assert(!tractionSection.isNull());
Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/Distributor.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/Distributor.cc 2011-07-21 03:22:30 UTC (rev 18790)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/Distributor.cc 2011-07-21 18:27:34 UTC (rev 18791)
@@ -102,11 +102,11 @@
// Setup and allocate field
const int fiberDim = 1;
topology::Field<topology::Mesh> partition(mesh);
+ partition.newSection(topology::FieldBase::CELLS_FIELD, fiberDim);
+ partition.allocate();
partition.scale(1.0);
partition.label("partition");
partition.vectorFieldType(topology::FieldBase::SCALAR);
- partition.newSection(topology::FieldBase::CELLS_FIELD, fiberDim);
- partition.allocate();
const ALE::Obj<RealSection>& partitionSection = partition.section();
assert(!partitionSection.isNull());
Modified: short/3D/PyLith/branches/v1.6-stable/pylith/problems/ExplicitLumped.py
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/pylith/problems/ExplicitLumped.py 2011-07-21 03:22:30 UTC (rev 18790)
+++ short/3D/PyLith/branches/v1.6-stable/pylith/problems/ExplicitLumped.py 2011-07-21 18:27:34 UTC (rev 18791)
@@ -132,10 +132,10 @@
self._info.log("Creating lumped Jacobian matrix.")
from pylith.topology.topology import MeshField
jacobian = MeshField(self.mesh)
+ jacobian.newSection(jacobian.VERTICES_FIELD, dimension)
+ jacobian.allocate()
jacobian.label("jacobian")
jacobian.vectorFieldType(jacobian.VECTOR)
- jacobian.newSection(jacobian.VERTICES_FIELD, dimension)
- jacobian.allocate()
self.jacobian = jacobian
self._debug.log(resourceUsageString())
Modified: short/3D/PyLith/branches/v1.6-stable/pylith/problems/Formulation.py
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/pylith/problems/Formulation.py 2011-07-21 03:22:30 UTC (rev 18790)
+++ short/3D/PyLith/branches/v1.6-stable/pylith/problems/Formulation.py 2011-07-21 18:27:34 UTC (rev 18791)
@@ -473,9 +473,9 @@
lengthScale = normalizer.lengthScale()
solution = self.fields.get("dispIncr(t->t+dt)")
+ solution.newSection(solution.VERTICES_FIELD, dimension)
solution.vectorFieldType(solution.VECTOR)
solution.scale(lengthScale.value)
- solution.newSection(solution.VERTICES_FIELD, dimension)
if self.splitFields:
solution.splitDefault()
for integrator in self.integratorsMesh + self.integratorsSubMesh:
Modified: short/3D/PyLith/branches/v1.6-stable/pylith/problems/Implicit.py
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/pylith/problems/Implicit.py 2011-07-21 03:22:30 UTC (rev 18790)
+++ short/3D/PyLith/branches/v1.6-stable/pylith/problems/Implicit.py 2011-07-21 18:27:34 UTC (rev 18791)
@@ -230,7 +230,7 @@
self._eventLogger.stagePush("Solve")
#self.jacobian.view() # TEMPORARY
self.solver.solve(dispIncr, self.jacobian, residual)
- #dispIncr.view("DISP INCR") # TEMPORARY
+ dispIncr.view("DISP INCR") # TEMPORARY
# DEBUGGING Verify solution makes residual 0
#self._reformResidual(t+dt, dt)
More information about the CIG-COMMITS
mailing list