[cig-commits] r15310 - short/3D/PyLith/trunk/libsrc/bc
brad at geodynamics.org
brad at geodynamics.org
Tue Jun 16 16:23:07 PDT 2009
Author: brad
Date: 2009-06-16 16:23:05 -0700 (Tue, 16 Jun 2009)
New Revision: 15310
Modified:
short/3D/PyLith/trunk/libsrc/bc/Neumann_NEW.cc
Log:
A little work on time-dependent Neumann.
Modified: short/3D/PyLith/trunk/libsrc/bc/Neumann_NEW.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Neumann_NEW.cc 2009-06-16 23:22:38 UTC (rev 15309)
+++ short/3D/PyLith/trunk/libsrc/bc/Neumann_NEW.cc 2009-06-16 23:23:05 UTC (rev 15310)
@@ -502,7 +502,30 @@
const double lengthScale = _getNormalizer().lengthScale();
+ // Get 'surface' cells (1 dimension lower than top-level cells)
+ const ALE::Obj<SieveSubMesh>& subSieveMesh = _boundaryMesh->sieveMesh();
+ assert(!subSieveMesh.isNull());
+ const ALE::Obj<SieveSubMesh::label_sequence>& cells =
+ subSieveMesh->heightStratum(1);
+ assert(!cells.isNull());
+ const SieveSubMesh::label_sequence::iterator cellsBegin = cells->begin();
+ const SieveSubMesh::label_sequence::iterator cellsEnd = cells->end();
+ // Create section for traction vector in global coordinates
+ const feassemble::CellGeometry& cellGeometry = _quadrature->refGeometry();
+ const int cellDim = _quadrature->cellDim() > 0 ? _quadrature->cellDim() : 1;
+ const int numBasis = _quadrature->numBasis();
+ const int numQuadPts = _quadrature->numQuadPts();
+ const int spaceDim = cellGeometry.spaceDim();
+ const int fiberDim = spaceDim * numQuadPts;
+
+ _parameters =
+ new topology::Fields<topology::Field<topology::SubMesh> >(*_boundaryMesh);
+ assert(0 != _parameters);
+ _parameters->add("traction", "traction");
+ topology::Field<topology::SubMesh>& traction = _parameters->get("traction");
+ traction.newSection(cells, fiberDim);
+ traction.allocate();
More information about the CIG-COMMITS
mailing list