[cig-commits] r9352 - short/3D/PyLith/trunk/libsrc/bc
brad at geodynamics.org
brad at geodynamics.org
Thu Feb 14 15:15:34 PST 2008
Author: brad
Date: 2008-02-14 15:15:34 -0800 (Thu, 14 Feb 2008)
New Revision: 9352
Modified:
short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
short/3D/PyLith/trunk/libsrc/bc/Neumann.hh
Log:
Shorted name of tractions section.
Modified: short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2008-02-14 23:09:25 UTC (rev 9351)
+++ short/3D/PyLith/trunk/libsrc/bc/Neumann.cc 2008-02-14 23:15:34 UTC (rev 9352)
@@ -117,11 +117,11 @@
const int numQuadPts = _quadrature->numQuadPts();
const int spaceDim = cs->spaceDim();
const int fiberDim = spaceDim * numQuadPts;
- _tractionsGlobal = new real_section_type(_boundaryMesh->comm(),
- _boundaryMesh->debug());
- assert(!_tractionsGlobal.isNull());
- _tractionsGlobal->setFiberDimension(cells, fiberDim);
- _boundaryMesh->allocate(_tractionsGlobal);
+ _tractions = new real_section_type(_boundaryMesh->comm(),
+ _boundaryMesh->debug());
+ assert(!_tractions.isNull());
+ _tractions->setFiberDimension(cells, fiberDim);
+ _boundaryMesh->allocate(_tractions);
// Containers for orientation information
const int orientationSize = spaceDim * spaceDim;
@@ -132,8 +132,7 @@
double_array orientation(orientationSize);
double_array cellVertices(numBasis*spaceDim);
- // open database with traction information
- // NEED TO SET NAMES BASED ON DIMENSION OF BOUNDARY
+ // Set names based on dimension of problem.
// 1-D problem = {'normal-traction'}
// 2-D problem = {'shear-traction', 'normal-traction'}
// 3-D problem = {'horiz-shear-traction', 'vert-shear-traction',
@@ -231,9 +230,9 @@
} // for
// Update tractionsGlobal
- _tractionsGlobal->updatePoint(*c_iter, &cellTractionsGlobal[0]);
+ _tractions->updatePoint(*c_iter, &cellTractionsGlobal[0]);
} // for
- // _tractionsGlobal->view("Global tractions from Neumann::initialize");
+ // _tractions->view("Global tractions from Neumann::initialize");
_db->close();
} // initialize
@@ -291,7 +290,7 @@
_resetCellVector();
// Restrict tractions to cell
- _boundaryMesh->restrict(_tractionsGlobal, *c_iter,
+ _boundaryMesh->restrict(_tractions, *c_iter,
&tractionsCell[0], tractionsCell.size());
// Get cell geometry information that depends on cell
@@ -351,9 +350,11 @@
const ALE::Obj<Mesh>& mesh,
topology::FieldsManager* const fields)
{ // cellField
+ _tractions->view("TRACTIONS");
+
if (0 == strcasecmp(name, "tractions")) {
*fieldType = VECTOR_FIELD;
- return _tractionsGlobal;
+ return _tractions;
} else {
std::ostringstream msg;
msg << "Unknown field '" << name << "' requested for Neumann BC '"
@@ -361,7 +362,7 @@
throw std::runtime_error(msg.str());
} // else
- return _tractionsGlobal;
+ return _tractions;
} // cellField
Modified: short/3D/PyLith/trunk/libsrc/bc/Neumann.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Neumann.hh 2008-02-14 23:09:25 UTC (rev 9351)
+++ short/3D/PyLith/trunk/libsrc/bc/Neumann.hh 2008-02-14 23:15:34 UTC (rev 9352)
@@ -129,7 +129,7 @@
ALE::Obj<Mesh> _boundaryMesh;
/// Traction vector in global coordinates at integration points.
- ALE::Obj<real_section_type> _tractionsGlobal;
+ ALE::Obj<real_section_type> _tractions;
}; // class Neumann
More information about the cig-commits
mailing list