[cig-commits] r20382 - in short/3D/PyLith/branches/v1.7-stable: examples/2d/greensfns/strikeslip libsrc/pylith/faults pylith/faults
brad at geodynamics.org
brad at geodynamics.org
Mon Jun 18 20:28:25 PDT 2012
Author: brad
Date: 2012-06-18 20:28:24 -0700 (Mon, 18 Jun 2012)
New Revision: 20382
Modified:
short/3D/PyLith/branches/v1.7-stable/examples/2d/greensfns/strikeslip/greensfns.cfg
short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/FaultCohesiveImpulses.cc
short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc
short/3D/PyLith/branches/v1.7-stable/pylith/faults/FaultCohesiveImpulses.py
Log:
Added ability to output area for Green's functions.
Modified: short/3D/PyLith/branches/v1.7-stable/examples/2d/greensfns/strikeslip/greensfns.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-stable/examples/2d/greensfns/strikeslip/greensfns.cfg 2012-06-19 02:23:34 UTC (rev 20381)
+++ short/3D/PyLith/branches/v1.7-stable/examples/2d/greensfns/strikeslip/greensfns.cfg 2012-06-19 03:28:24 UTC (rev 20382)
@@ -64,6 +64,7 @@
# Fault
[greensfns.interfaces.fault.output]
writer.filename = output/greensfns-fault.h5
+vertex_info_fields = [area]
# Materials
[greensfns.materials.elastic.output]
Modified: short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/FaultCohesiveImpulses.cc
===================================================================
--- short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/FaultCohesiveImpulses.cc 2012-06-19 02:23:34 UTC (rev 20381)
+++ short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/FaultCohesiveImpulses.cc 2012-06-19 03:28:24 UTC (rev 20382)
@@ -256,6 +256,10 @@
_fields->get("impulse amplitude");
return amplitude;
+ } else if (0 == strcasecmp("area", name)) {
+ topology::Field<topology::SubMesh>& area = _fields->get("area");
+ return area;
+
} else if (0 == strcasecmp("traction_change", name)) {
assert(fields);
const topology::Field<topology::Mesh>& dispT = fields->get("disp(t)");
Modified: short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc 2012-06-19 02:23:34 UTC (rev 20381)
+++ short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc 2012-06-19 03:28:24 UTC (rev 20382)
@@ -1535,8 +1535,9 @@
void
pylith::faults::FaultCohesiveLagrange::_calcArea(void)
{ // _calcArea
- assert(0 != _faultMesh);
- assert(0 != _fields);
+ assert(_faultMesh);
+ assert(_fields);
+ assert(_normalizer);
// Containers for area information
const int cellDim = _quadrature->cellDim();
@@ -1569,6 +1570,8 @@
area.newSection(dispRel, 1);
area.allocate();
area.vectorFieldType(topology::FieldBase::SCALAR);
+ const PylithScalar lengthScale = _normalizer->lengthScale();
+ area.scale(pow(lengthScale, (spaceDim-1)));
area.zero();
const ALE::Obj<RealSection>& areaSection = area.section();
assert(!areaSection.isNull());
Modified: short/3D/PyLith/branches/v1.7-stable/pylith/faults/FaultCohesiveImpulses.py
===================================================================
--- short/3D/PyLith/branches/v1.7-stable/pylith/faults/FaultCohesiveImpulses.py 2012-06-19 02:23:34 UTC (rev 20381)
+++ short/3D/PyLith/branches/v1.7-stable/pylith/faults/FaultCohesiveImpulses.py 2012-06-19 03:28:24 UTC (rev 20382)
@@ -101,7 +101,8 @@
self.availableFields = \
{'vertex': \
{'info': ["normal_dir",
- "impulse_amplitude"],
+ "impulse_amplitude",
+ "area",],
'data': ["slip",
"traction_change"]},
'cell': \
More information about the CIG-COMMITS
mailing list