[cig-commits] r14013 - in short/3D/PyLith/branches/pylith-swig/libsrc: . bc feassemble materials meshio topology
brad at geodynamics.org
brad at geodynamics.org
Tue Feb 3 16:06:19 PST 2009
Author: brad
Date: 2009-02-03 16:06:19 -0800 (Tue, 03 Feb 2009)
New Revision: 14013
Added:
short/3D/PyLith/branches/pylith-swig/libsrc/bc/bcfwd.hh
short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/feassemblefwd.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/meshiofwd.hh
short/3D/PyLith/branches/pylith-swig/libsrc/topology/topologyfwd.hh
Modified:
short/3D/PyLith/branches/pylith-swig/libsrc/Makefile.am
short/3D/PyLith/branches/pylith-swig/libsrc/bc/AbsorbingDampers.cc
short/3D/PyLith/branches/pylith-swig/libsrc/bc/AbsorbingDampers.hh
short/3D/PyLith/branches/pylith-swig/libsrc/bc/BoundaryCondition.hh
short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBC.hh
short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBoundary.cc
short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBoundary.hh
short/3D/PyLith/branches/pylith-swig/libsrc/bc/Neumann.cc
short/3D/PyLith/branches/pylith-swig/libsrc/bc/Neumann.hh
short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Constraint.hh
short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.cc
short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.hh
short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.icc
short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Makefile.am
short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Quadrature.hh
short/3D/PyLith/branches/pylith-swig/libsrc/materials/Material.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/BinaryIO.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFile.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFileAscii.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFileBinary.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/Makefile.am
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshBuilder.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIO.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOAscii.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOCubit.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOLagrit.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFile.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFileAscii.hh
short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFileBinary.hh
short/3D/PyLith/branches/pylith-swig/libsrc/topology/Field.hh
short/3D/PyLith/branches/pylith-swig/libsrc/topology/FieldBase.hh
short/3D/PyLith/branches/pylith-swig/libsrc/topology/FieldSubMesh.hh
short/3D/PyLith/branches/pylith-swig/libsrc/topology/Fields.hh
short/3D/PyLith/branches/pylith-swig/libsrc/topology/Makefile.am
short/3D/PyLith/branches/pylith-swig/libsrc/topology/Mesh.hh
short/3D/PyLith/branches/pylith-swig/libsrc/topology/MeshOps.hh
short/3D/PyLith/branches/pylith-swig/libsrc/topology/SubMesh.hh
Log:
Added use of forward declaration header files. Started working on updating integrators.
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/Makefile.am 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/Makefile.am 2009-02-04 00:06:19 UTC (rev 14013)
@@ -25,6 +25,7 @@
bc/BoundaryCondition.cc \
bc/DirichletBC.cc \
bc/DirichletBoundary.cc \
+ bc/Neumann.cc \
faults/BruneSlipFn.cc \
faults/ConstRateSlipFn.cc \
faults/CohesiveTopology.cc \
@@ -105,7 +106,6 @@
utils/EventLogger.cc
# topology/RefineUniform.cc \
-# bc/Neumann.cc
# bc/AbsorbingDampers.cc
libpylith_la_LDFLAGS = $(AM_LDFLAGS) $(PYTHON_LA_LDFLAGS)
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/bc/AbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/bc/AbsorbingDampers.cc 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/bc/AbsorbingDampers.cc 2009-02-04 00:06:19 UTC (rev 14013)
@@ -16,14 +16,12 @@
#include "pylith/feassemble/Quadrature.hh" // USES Quadrature
#include "pylith/feassemble/CellGeometry.hh" // USES CellGeometry
-#include "pylith/topology/FieldsManager.hh" // USES FieldsManager
+#include "pylith/topology/SolutionFields.hh" // USES SolutionFields
#include "spatialdata/spatialdb/SpatialDB.hh" // USES SpatialDB
#include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
#include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
-#include <Selection.hh> // USES submesh algorithms
-
#include <cstring> // USES memcpy()
#include <cassert> // USES assert()
#include <stdexcept> // USES std::runtime_error
@@ -31,7 +29,9 @@
// ----------------------------------------------------------------------
// Default constructor.
-pylith::bc::AbsorbingDampers::AbsorbingDampers(void)
+pylith::bc::AbsorbingDampers::AbsorbingDampers(void) :
+ _boundaryMesh(0),
+ _dampingConsts(0)
{ // constructor
} // constructor
@@ -39,70 +39,50 @@
// Destructor.
pylith::bc::AbsorbingDampers::~AbsorbingDampers(void)
{ // destructor
+ delete _boundaryMesh; _boundaryMesh = 0;
+ delete _dampingConsts; _dampingConsts = 0;
} // destructor
// ----------------------------------------------------------------------
// Initialize boundary condition. Determine orienation and compute traction
// vector at integration points.
void
-pylith::bc::AbsorbingDampers::initialize(const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs,
- const double_array& upDir)
+pylith::bc::AbsorbingDampers::initialize(const topology::Mesh& mesh,
+ const double upDir[3])
{ // initialize
assert(0 != _quadrature);
assert(0 != _db);
- assert(!mesh.isNull());
- assert(0 != cs);
- if (3 != upDir.size())
- throw std::runtime_error("Up direction for boundary orientation must be "
- "a vector with 3 components.");
+ delete _boundaryMesh; _boundaryMesh = 0;
+ delete _dampingConst; _dampingConsts = 0;
- // Extract submesh associated with boundary
- _boundaryMesh = ALE::Selection<Mesh>::submeshV<SubMesh>(mesh, mesh->getIntSection(_label));
- if (_boundaryMesh.isNull()) {
- std::ostringstream msg;
- msg << "Could not construct boundary mesh for absorbing boundary "
- << "condition '" << _label << "'.";
- throw std::runtime_error(msg.str());
- } // if
- _boundaryMesh->setRealSection("coordinates",
- mesh->getRealSection("coordinates"));
- // Create the parallel overlap
- Obj<SubMesh::send_overlap_type> sendParallelMeshOverlap = _boundaryMesh->getSendOverlap();
- Obj<SubMesh::recv_overlap_type> recvParallelMeshOverlap = _boundaryMesh->getRecvOverlap();
- Mesh::renumbering_type& renumbering = mesh->getRenumbering();
- // Can I figure this out in a nicer way?
- ALE::SetFromMap<std::map<Mesh::point_type,Mesh::point_type> > globalPoints(renumbering);
+ _boundaryMesh = new topology::SubMesh(mesh, _label.c_str());
+ assert(0 != _boundaryMesh);
- ALE::OverlapBuilder<>::constructOverlap(globalPoints, renumbering, sendParallelMeshOverlap, recvParallelMeshOverlap);
- _boundaryMesh->setCalculatedOverlap(true);
-
- //_boundaryMesh->view("ABSORBING BOUNDARY MESH");
-
// check compatibility of quadrature and boundary mesh
- if (_quadrature->cellDim() != _boundaryMesh->getDimension()) {
+ if (_quadrature->cellDim() != _boundaryMesh->dimension()) {
std::ostringstream msg;
msg << "Quadrature is incompatible with cells for absorbing boundary "
<< "condition '" << _label << "'.\n"
- << "Dimension of boundary mesh: " << _boundaryMesh->getDimension()
+ << "Dimension of boundary mesh: " << _boundaryMesh->dimension()
<< ", dimension of quadrature: " << _quadrature->cellDim()
<< ".";
throw std::runtime_error(msg.str());
} // if
const int numCorners = _quadrature->numBasis();
- const ALE::Obj<SubMesh::label_sequence>& cells =
- _boundaryMesh->heightStratum(1);
-
+ // Get 'surface' cells (1 dimension lower than top-level cells)
+ const ALE::Obj<SieveSubMesh>& submesh = _boundaryMesh->sieveMesh();
+ assert(!submesh.isNull());
+ const ALE::Obj<SubMesh::label_sequence>& cells = submesh->heightStratum(1);
assert(!cells.isNull());
- const SubMesh::label_sequence::iterator cellsBegin = cells->begin();
- const SubMesh::label_sequence::iterator cellsEnd = cells->end();
- const int boundaryDepth = _boundaryMesh->depth()-1; // depth of bndry cells
- for (SubMesh::label_sequence::iterator c_iter=cellsBegin;
+ const SieveSubMesh::label_sequence::iterator cellsEnd = cells->end();
+ const int boundaryDepth = submesh->depth()-1; // depth of bndry cells
+ for (SieveSubMesh::label_sequence::iterator c_iter=cells->begin();
c_iter != cellsEnd;
++c_iter) {
- const int cellNumCorners = _boundaryMesh->getNumCellCorners(*c_iter, boundaryDepth);
+ const int cellNumCorners =
+ submesh->getNumCellCorners(*c_iter, boundaryDepth);
if (numCorners != cellNumCorners) {
std::ostringstream msg;
@@ -122,12 +102,10 @@
const int numQuadPts = _quadrature->numQuadPts();
const int spaceDim = cs->spaceDim();
const int fiberDim = numQuadPts * spaceDim;
- _dampingConsts = new real_section_type(_boundaryMesh->comm(),
- _boundaryMesh->debug());
- assert(!_dampingConsts.isNull());
- _dampingConsts->setChart(real_section_type::chart_type(*std::min_element(cells->begin(), cells->end()), *std::max_element(cells->begin(), cells->end())+1));
- _dampingConsts->setFiberDimension(cells, fiberDim);
- _boundaryMesh->allocate(_dampingConsts);
+ _dampingConsts = new FieldSubMesh(*_boundaryMesh);
+ assert(0 != _dampingConsts);
+ _dampingConsts->newSection(cells, fiberDim);
+ _dampingConsts->allocate();
// Containers for orientation information
const int orientationSize = spaceDim*spaceDim;
@@ -160,7 +138,7 @@
double_array dampingConstsLocal(fiberDim);
double_array dampingConstsGlobal(fiberDim);
- const ALE::Obj<real_section_type>& coordinates =
+ const ALE::Obj<MeshRealSection>& coordinates =
mesh->getRealSection("coordinates");
assert(!coordinates.isNull());
@@ -170,10 +148,14 @@
const double velocityScale =
_normalizer->lengthScale() / _normalizer->timeScale();
- for(SubMesh::label_sequence::iterator c_iter = cells->begin();
- c_iter != cells->end();
+ const ALE::Obj<SubMeshRealSection>& constsSection =
+ _dampingConsts->section();
+ assert(!constsSection.isNull());
+
+ for(SieveSubMesh::label_sequence::iterator c_iter = cells->begin();
+ c_iter != cellsEnd;
++c_iter) {
- _quadrature->computeGeometry(_boundaryMesh, coordinates, *c_iter);
+ _quadrature->computeGeometry(submesh, coordinates, *c_iter);
const double_array& quadPtsNondim = _quadrature->quadPts();
const double_array& quadPtsRef = _quadrature->quadPtsRef();
quadPtsGlobal = quadPtsNondim;
@@ -212,8 +194,8 @@
dampingConstsLocal[spaceDim-1] = constNormal;
// Compute normal/tangential orientation
- _boundaryMesh->restrictClosure(coordinates, *c_iter,
- &cellVertices[0], cellVertices.size());
+ submesh->restrictClosure(coordinates, *c_iter,
+ &cellVertices[0], cellVertices.size());
memcpy(&quadPtRef[0], &quadPtsRef[iQuad*cellDim], cellDim*sizeof(double));
cellGeometry.jacobian(&jacobian, &jacobianDet, cellVertices, quadPtRef);
cellGeometry.orientation(&orientation, jacobian, jacobianDet,
@@ -229,7 +211,7 @@
fabs(dampingConstsGlobal[iQuad*spaceDim+iDim]);
} // for
} // for
- _dampingConsts->updatePoint(*c_iter, &dampingConstsGlobal[0]);
+ constsSection->updatePoint(*c_iter, &dampingConstsGlobal[0]);
} // for
_db->close();
@@ -239,32 +221,29 @@
// Integrate contributions to residual term (r) for operator.
void
pylith::bc::AbsorbingDampers::integrateResidual(
- const ALE::Obj<real_section_type>& residual,
+ const topology::Field& residual,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs)
+ topology::SolutionFields* const fields)
{ // integrateResidual
assert(0 != _quadrature);
- assert(!_boundaryMesh.isNull());
- assert(!residual.isNull());
+ assert(0 != _boundaryMesh);
assert(0 != fields);
- assert(!mesh.isNull());
PetscErrorCode err = 0;
// Get cell information
- const ALE::Obj<SubMesh::label_sequence>& cells =
- _boundaryMesh->heightStratum(1);
+ const ALE::Obj<SieveSubMesh>& submesh = _boundaryMesh->sieveMesh();
+ assert(!submesh.isNull());
+ const ALE::Obj<SubMesh::label_sequence>& cells = submesh->heightStratum(1);
assert(!cells.isNull());
const SubMesh::label_sequence::iterator cellsEnd = cells->end();
// Get sections
- const ALE::Obj<real_section_type>& coordinates =
+ const ALE::Obj<MeshRealSection>& coordinates =
mesh->getRealSection("coordinates");
assert(!coordinates.isNull());
- const ALE::Obj<real_section_type>& dispTpdt = fields->getFieldByHistory(0);
- const ALE::Obj<real_section_type>& dispTmdt = fields->getFieldByHistory(2);
+ const ALE::Obj<MeshRealSection>& dispTpdt = fields->getField("disp t+dt");
+ const ALE::Obj<MeshRealSection>& dispTmdt = fields->getField("disp t-dt");
assert(!dispTpdt.isNull());
assert(!dispTmdt.isNull());
@@ -286,20 +265,20 @@
double_array dispTpdtCell(cellVecSize);
double_array dispTmdtCell(cellVecSize);
- for (SubMesh::label_sequence::iterator c_iter=cells->begin();
+ for (SieveSubMesh::label_sequence::iterator c_iter=cells->begin();
c_iter != cellsEnd;
++c_iter) {
// Compute geometry information for current cell
- _quadrature->computeGeometry(_boundaryMesh, coordinates, *c_iter);
+ _quadrature->computeGeometry(submesh, coordinates, *c_iter);
// Reset element vector to zero
_resetCellVector();
// Restrict input fields to cell
- _boundaryMesh->restrictClosure(dispTpdt, *c_iter,
- &dispTpdtCell[0], cellVecSize);
- _boundaryMesh->restrictClosure(dispTmdt, *c_iter,
- &dispTmdtCell[0], cellVecSize);
+ submesh->restrictClosure(dispTpdt, *c_iter,
+ &dispTpdtCell[0], cellVecSize);
+ submesh->restrictClosure(dispTmdt, *c_iter,
+ &dispTmdtCell[0], cellVecSize);
assert(numQuadPts*spaceDim == _dampingConsts->getFiberDimension(*c_iter));
const real_section_type::value_type* dampingConstsCell =
_dampingConsts->restrictPoint(*c_iter);
@@ -328,7 +307,7 @@
PetscLogFlops(numQuadPts*(3+numBasis*(1+numBasis*(5*spaceDim))));
// Assemble cell contribution into field
- _boundaryMesh->updateAdd(residual, *c_iter, _cellVector);
+ submesh->updateAdd(residual, *c_iter, _cellVector);
} // for
} // integrateResidual
@@ -338,28 +317,29 @@
pylith::bc::AbsorbingDampers::integrateJacobian(
PetscMat* jacobian,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh)
+ topology::SolutionFields* const fields)
{ // integrateJacobian
assert(0 != _quadrature);
- assert(!_boundaryMesh.isNull());
+ assert(0 != _boundaryMesh);
assert(0 != jacobian);
assert(0 != fields);
- assert(!mesh.isNull());
- typedef ALE::ISieveVisitor::IndicesVisitor<Mesh::real_section_type,Mesh::order_type,PetscInt> visitor_type;
+
+ typedef ALE::ISieveVisitor::IndicesVisitor<MeshRealSection,SieveMesh::order_type,PetscInt> visitor_type;
PetscErrorCode err = 0;
// Get cell information
- const ALE::Obj<SubMesh::label_sequence>& cells =
- _boundaryMesh->heightStratum(1);
+ const ALE::Obj<SieveSubMesh>& submesh = _boundaryMesh->sieveMesh();
+ assert(!submesh.isNull());
+ const ALE::Obj<SieveSubMesh::label_sequence>& cells =
+ submesh->heightStratum(1);
assert(!cells.isNull());
- const SubMesh::label_sequence::iterator cellsEnd = cells->end();
+ const SieveSubMesh::label_sequence::iterator cellsEnd = cells->end();
// Get sections
- const ALE::Obj<real_section_type>& coordinates =
+ const ALE::Obj<MeshRealSection>& coordinates =
mesh->getRealSection("coordinates");
assert(!coordinates.isNull());
- const ALE::Obj<real_section_type>& dispT = fields->getFieldByHistory(1);
+ const ALE::Obj<MeshRealSection>& dispT = fields->getField("disp t");
assert(!dispT.isNull());
// Get parameters used in integration.
@@ -381,16 +361,16 @@
// Allocate vector for cell values (if necessary)
_initCellMatrix();
- const ALE::Obj<real_section_type>& solution = fields->getSolution();
+ const ALE::Obj<MeshRealSection>& solution = fields->getSolution();
assert(!solution.isNull());
- const ALE::Obj<Mesh::order_type>& globalOrder =
+ const ALE::Obj<SieveMesh::order_type>& globalOrder =
mesh->getFactory()->getGlobalOrder(mesh, "default", solution);
assert(!globalOrder.isNull());
visitor_type iV(*solution, *globalOrder,
(int) pow(mesh->getSieve()->getMaxConeSize(),
mesh->depth())*spaceDim);
- for (SubMesh::label_sequence::iterator c_iter=cells->begin();
+ for (SieveSubMesh::label_sequence::iterator c_iter=cells->begin();
c_iter != cellsEnd;
++c_iter) {
// Compute geometry information for current cell
@@ -405,7 +385,7 @@
// Restrict input fields to cell
assert(numQuadPts*spaceDim == _dampingConsts->getFiberDimension(*c_iter));
- const real_section_type::value_type* dampingConstsCell =
+ const MeshRealSection::value_type* dampingConstsCell =
_dampingConsts->restrictPoint(*c_iter);
// Compute Jacobian for absorbing bc terms
@@ -428,7 +408,7 @@
PetscLogFlops(numQuadPts*(3+numBasis*(1+numBasis*(1+2*spaceDim))));
// Assemble cell contribution into PETSc Matrix
- err = updateOperator(*jacobian, *_boundaryMesh->getSieve(),
+ err = updateOperator(*jacobian, submesh->getSieve(),
iV, *c_iter, _cellMatrix, ADD_VALUES);
if (err)
throw std::runtime_error("Update to PETSc Mat failed.");
@@ -441,7 +421,7 @@
// ----------------------------------------------------------------------
// Verify configuration is acceptable.
void
-pylith::bc::AbsorbingDampers::verifyConfiguration(const ALE::Obj<Mesh>& mesh) const
+pylith::bc::AbsorbingDampers::verifyConfiguration(const topology::Mesh& mesh) const
{ // verifyConfiguration
BoundaryCondition::verifyConfiguration(mesh);
} // verifyConfiguration
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/bc/AbsorbingDampers.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/bc/AbsorbingDampers.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/bc/AbsorbingDampers.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -50,30 +50,13 @@
#if !defined(pylith_bc_absorbingdampers_hh)
#define pylith_bc_absorbingdampers_hh
+// Include directives ---------------------------------------------------
#include "BoundaryCondition.hh" // ISA BoundaryCondition
#include "pylith/feassemble/Integrator.hh" // ISA Integrator
#include "pylith/utils/array.hh" // USES std::vector, double_array, int_array
-#include "pylith/utils/sievetypes.hh" // USES real_section_type
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class AbsorbingDampers;
- class TestAbsorbingDampers; // unit testing
- } // bc
-} // pylith
-
-/*
-namespace spatialdata {
- namespace geocoords {
- class CoordSys; // USES CoordSys
- } // geocoords
-} // spatialdata
-*/
-
-
-/// C++ implementation of AbsorbingDampers boundary conditions.
+// AbsorbingDampers ------------------------------------------------------
class pylith::bc::AbsorbingDampers : public BoundaryCondition,
public feassemble::Integrator
{ // class AbsorbingDampers
@@ -90,13 +73,11 @@
/** Initialize boundary condition.
*
- * @param mesh PETSc mesh
- * @param cs Coordinate system for mesh
+ * @param mesh Finite-element mesh.
* @param upDir Direction perpendicular to horizontal surface tangent
* direction that is not collinear with surface normal.
*/
- void initialize(const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs,
+ void initialize(const topology::Mesh& mesh,
const double_array& upDir);
/** Integrate contributions to residual term (r) for operator.
@@ -104,14 +85,10 @@
* @param residual Field containing values for residual
* @param t Current time
* @param fields Solution fields
- * @param mesh Finite-element mesh
- * @param cs Mesh coordinate system
*/
- void integrateResidual(const ALE::Obj<real_section_type>& residual,
+ void integrateResidual(const topology::Field& residual,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs);
+ topology::SolutionFields* const fields);
/** Integrate contributions to Jacobian matrix (A) associated with
* operator.
@@ -119,18 +96,16 @@
* @param mat Sparse matrix
* @param t Current time
* @param fields Solution fields
- * @param mesh Finite-element mesh
*/
void integrateJacobian(PetscMat* mat,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh);
+ topology::SolutionFields* const fields);
/** Verify configuration is acceptable.
*
* @param mesh Finite-element mesh
*/
- void verifyConfiguration(const ALE::Obj<Mesh>& mesh) const;
+ void verifyConfiguration(const topology::Mesh& mesh) const;
// NOT IMPLEMENTED ////////////////////////////////////////////////////
private :
@@ -145,10 +120,10 @@
private :
/// Mesh of absorbing boundary
- ALE::Obj<SubMesh> _boundaryMesh;
+ SubMesh* _boundaryMesh;
/// Damping constants in global coordinates at integration points.
- ALE::Obj<real_section_type> _dampingConsts;
+ FieldSubMesh* _dampingConsts;
}; // class AbsorbingDampers
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/bc/BoundaryCondition.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/bc/BoundaryCondition.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/bc/BoundaryCondition.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -21,32 +21,16 @@
#define pylith_bc_boundarycondition_hh
// Include directives ---------------------------------------------------
+#include "bcfwd.hh" // forward declarations
+
+#include "pylith/topology/topologyfwd.hh" // USES Mesh
#include "pylith/utils/arrayfwd.hh" // USES double_array
+#include "spatialdata/geocoords/geocoordsfwd.hh" // USES CoordSys
+#include "spatialdata/spatialdb/spatialdbfwd.hh" // USES SpatialDB
+
#include <string> // HASA std::string
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace bc {
- class BoundaryCondition;
- class TestBoundaryCondition; // unit testing
- } // bc
-
- namespace topology {
- class Mesh; // USES Mesh
- } // bc
-} // pylith
-
-namespace spatialdata {
- namespace geocoords {
- class CoordSys;
- } // geocoords
-
- namespace spatialdb {
- class SpatialDB;
- } // spatialdb
-} // spatialdata
-
// BoundaryCondition ----------------------------------------------------
class pylith::bc::BoundaryCondition
{ // class BoundaryCondition
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBC.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBC.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBC.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -27,15 +27,6 @@
#define NEWPYLITHMESH 1
#include "pylith/utils/sievetypes.hh" // HASA SieveMesh::point_type
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace bc {
- class DirichletBC;
- class TestDirichletBC; // unit testing
- } // bc
-} // pylith
-
-
// DirichletBC ------------------------------------------------------
class pylith::bc::DirichletBC : public BoundaryCondition,
public feassemble::Constraint
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBoundary.cc
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBoundary.cc 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBoundary.cc 2009-02-04 00:06:19 UTC (rev 14013)
@@ -53,6 +53,8 @@
return;
_boundaryMesh = new topology::SubMesh(mesh, _label.c_str());
+ assert(0 != _boundaryMesh);
+
_getPoints(mesh);
_setupQueryDatabases();
_queryDatabases(mesh);
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBoundary.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBoundary.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/bc/DirichletBoundary.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -22,21 +22,6 @@
// Include directives ---------------------------------------------------
#include "DirichletBC.hh" // ISA DirichletBC
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace bc {
- class DirichletBoundary;
-
- class TestDirichletBoundary; // unit testing
- } // bc
-
- namespace topology {
- class SubMesh; // HASA SubMesh
- class FieldSubMesh; // HASA FieldSubMesh
- class SolutionFields; // USES SolutionFields
- } // topology
-} // pylith
-
// DirichletBoundary ----------------------------------------------------
class pylith::bc::DirichletBoundary : public DirichletBC
{ // class DirichletBoundary
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/bc/Neumann.cc 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/bc/Neumann.cc 2009-02-04 00:06:19 UTC (rev 14013)
@@ -14,16 +14,14 @@
#include "Neumann.hh" // implementation of object methods
+#include "pylith/topology/SubMesh.hh" // HOLDSA SubMesh
+#include "pylith/topology/FieldSubMesh.hh" // HOLDSA FieldSubMesh
#include "pylith/feassemble/Quadrature.hh" // USES Quadrature
#include "pylith/feassemble/CellGeometry.hh" // USES CellGeometry
-#include "pylith/topology/FieldsManager.hh" // USES FieldsManager
#include "spatialdata/spatialdb/SpatialDB.hh" // USES SpatialDB
#include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
-#include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
-#include <Selection.hh> // USES submesh algorithms
-
#include <cstring> // USES memcpy()
#include <strings.h> // USES strcasecmp()
#include <cassert> // USES assert()
@@ -32,7 +30,9 @@
// ----------------------------------------------------------------------
// Default constructor.
-pylith::bc::Neumann::Neumann(void)
+pylith::bc::Neumann::Neumann(void) :
+ _boundaryMesh(0),
+ _tractions(0)
{ // constructor
} // constructor
@@ -40,54 +40,32 @@
// Destructor.
pylith::bc::Neumann::~Neumann(void)
{ // destructor
+ delete _boundaryMesh; _boundaryMesh = 0;
+ delete _tractions; _tractions = 0;
} // destructor
// ----------------------------------------------------------------------
// Initialize boundary condition. Determine orienation and compute traction
// vector at integration points.
void
-pylith::bc::Neumann::initialize(const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs,
- const double_array& upDir)
+pylith::bc::Neumann::initialize(const topology::Mesh& mesh,
+ const double upDir[3])
{ // initialize
assert(0 != _quadrature);
assert(0 != _db);
- assert(!mesh.isNull());
- assert(0 != cs);
- if (3 != upDir.size())
- throw std::runtime_error("Up direction for surface orientation must be "
- "a vector with 3 components.");
+ delete _boundaryMesh; _boundaryMesh = 0;
+ delete _tractions; _tractions = 0;
- // Extract submesh associated with surface
- _boundaryMesh =
- ALE::Selection<Mesh>::submeshV<SubMesh>(mesh, mesh->getIntSection(_label));
- if (_boundaryMesh.isNull()) {
- std::ostringstream msg;
- msg << "Could not construct boundary mesh for Neumann traction "
- << "boundary condition '" << _label << "'.";
- throw std::runtime_error(msg.str());
- } // if
- _boundaryMesh->setRealSection("coordinates",
- mesh->getRealSection("coordinates"));
- // Create the parallel overlap
- Obj<SubMesh::send_overlap_type> sendParallelMeshOverlap = _boundaryMesh->getSendOverlap();
- Obj<SubMesh::recv_overlap_type> recvParallelMeshOverlap = _boundaryMesh->getRecvOverlap();
- Mesh::renumbering_type& renumbering = mesh->getRenumbering();
- // Can I figure this out in a nicer way?
- ALE::SetFromMap<std::map<Mesh::point_type,Mesh::point_type> > globalPoints(renumbering);
+ _boundaryMesh = new topology::SubMesh(mesh, _label.c_str());
+ assert(0 != _boundaryMesh);
- ALE::OverlapBuilder<>::constructOverlap(globalPoints, renumbering, sendParallelMeshOverlap, recvParallelMeshOverlap);
- _boundaryMesh->setCalculatedOverlap(true);
-
- //_boundaryMesh->view("TRACTION BOUNDARY MESH");
-
// check compatibility of quadrature and boundary mesh
- if (_quadrature->cellDim() != _boundaryMesh->getDimension()) {
+ if (_quadrature->cellDim() != _boundaryMesh->dimension()) {
std::ostringstream msg;
msg << "Quadrature is incompatible with cells for Neumann traction "
<< "boundary condition '" << _label << "'.\n"
- << "Dimension of boundary mesh: " << _boundaryMesh->getDimension()
+ << "Dimension of boundary mesh: " << _boundaryMesh->dimension()
<< ", dimension of quadrature: " << _quadrature->cellDim()
<< ".";
throw std::runtime_error(msg.str());
@@ -95,19 +73,20 @@
const int numCorners = _quadrature->numBasis();
// Get 'surface' cells (1 dimension lower than top-level cells)
- const ALE::Obj<SubMesh::label_sequence>& cells =
+ const ALE::Obj<SieveSubMesh>& submesh = _boundaryMesh->sieveMesh();
+ assert(!submesh.isNull());
+ const ALE::Obj<SieveSubMesh::label_sequence>& cells =
_boundaryMesh->heightStratum(1);
assert(!cells.isNull());
+ const SieveSubMesh::label_sequence::iterator cellsEnd = cells->end();
+ const int boundaryDepth = _boundaryMesh->depth()-1; // depth of bndry cells
- const SubMesh::label_sequence::iterator cellsBegin = cells->begin();
- const SubMesh::label_sequence::iterator cellsEnd = cells->end();
- const int boundaryDepth = _boundaryMesh->depth()-1; //depth of boundary cells
-
// Make sure surface cells are compatible with quadrature.
- for (SubMesh::label_sequence::iterator c_iter=cellsBegin;
+ for (SieveSubMesh::label_sequence::iterator c_iter=cells->begin();
c_iter != cellsEnd;
++c_iter) {
- const int cellNumCorners = _boundaryMesh->getNumCellCorners(*c_iter, boundaryDepth);
+ const int cellNumCorners =
+ submesh->getNumCellCorners(*c_iter, boundaryDepth);
if (numCorners != cellNumCorners) {
std::ostringstream msg;
msg << "Quadrature is incompatible with cell for Neumann traction "
@@ -125,12 +104,11 @@
const int numQuadPts = _quadrature->numQuadPts();
const int spaceDim = cs->spaceDim();
const int fiberDim = spaceDim * numQuadPts;
- _tractions = new real_section_type(_boundaryMesh->comm(),
- _boundaryMesh->debug());
- assert(!_tractions.isNull());
- _tractions->setChart(real_section_type::chart_type(*std::min_element(cells->begin(), cells->end()), *std::max_element(cells->begin(), cells->end())+1));
- _tractions->setFiberDimension(cells, fiberDim);
- _boundaryMesh->allocate(_tractions);
+
+ _tractions = new FieldSubMesh(submesh);
+ assert(0 != _tractions);
+ _tractions->newSection(cells, fiberDim);
+ _tractions->allocate();
// Containers for orientation information
const int orientationSize = spaceDim * spaceDim;
@@ -160,7 +138,8 @@
break;
} // case 2
case 3 : {
- const char* valueNames[] = {"horiz-shear-traction", "vert-shear-traction",
+ const char* valueNames[] = {"horiz-shear-traction",
+ "vert-shear-traction",
"normal-traction"};
_db->queryVals(valueNames, 3);
break;
@@ -179,10 +158,12 @@
// Container for cell tractions rotated to global coordinates.
double_array cellTractionsGlobal(fiberDim);
- // Get mesh coordinates.
- const ALE::Obj<real_section_type>& coordinates =
- mesh->getRealSection("coordinates");
+ // Get sections.
+ const ALE::Obj<MeshRealSection>& coordinates =
+ submesh->getRealSection("coordinates");
assert(!coordinates.isNull());
+ const ALE::Obj<SubMeshRealSection>& tractSection = _tractions->section();
+ assert(!tractSection.isNull());
assert(0 != _normalizer);
const double lengthScale = _normalizer->lengthScale();
@@ -191,18 +172,17 @@
// Loop over cells in boundary mesh, compute orientations, and then
// compute corresponding traction vector in global coordinates
// (store values in _tractionGlobal).
- for(SubMesh::label_sequence::iterator c_iter = cellsBegin;
+ for(SieveSubMesh::label_sequence::iterator c_iter = cells->begin();
c_iter != cellsEnd;
++c_iter) {
- // std::cout << "c_iter: " << *c_iter << std::endl;
- _quadrature->computeGeometry(_boundaryMesh, coordinates, *c_iter);
+ _quadrature->computeGeometry(submesh, coordinates, *c_iter);
const double_array& quadPtsNondim = _quadrature->quadPts();
quadPtsGlobal = quadPtsNondim;
_normalizer->dimensionalize(&quadPtsGlobal[0], quadPtsGlobal.size(),
lengthScale);
- _boundaryMesh->restrictClosure(coordinates, *c_iter,
- &cellVertices[0], cellVertices.size());
-
+ submesh->restrictClosure(coordinates, *c_iter,
+ &cellVertices[0], cellVertices.size());
+
cellTractionsGlobal = 0.0;
for(int iQuad=0, iRef=0, iSpace=0; iQuad < numQuadPts;
++iQuad, iRef+=cellDim, iSpace+=spaceDim) {
@@ -239,9 +219,8 @@
} // for
// Update tractionsGlobal
- _tractions->updatePoint(*c_iter, &cellTractionsGlobal[0]);
+ tractSection->updatePoint(*c_iter, &cellTractionsGlobal[0]);
} // for
- // _tractions->view("Global tractions from Neumann::initialize");
_db->close();
} // initialize
@@ -249,32 +228,32 @@
// ----------------------------------------------------------------------
// Integrate contributions to residual term (r) for operator.
void
-pylith::bc::Neumann::integrateResidual(
- const ALE::Obj<real_section_type>& residual,
- const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs)
+pylith::bc::Neumann::integrateResidual(const topology::Field& residual,
+ const double t,
+ topology::SolutionFields* const fields)
{ // integrateResidual
assert(0 != _quadrature);
- assert(!_boundaryMesh.isNull());
+ assert(0 != _boundaryMesh);
+ assert(0 != _tractions);
assert(!residual.isNull());
assert(0 != fields);
- assert(!mesh.isNull());
PetscErrorCode err = 0;
// Get cell information
- const ALE::Obj<SubMesh::label_sequence>& cells =
- _boundaryMesh->heightStratum(1);
+ const ALE::Obj<SieveSubMesh>& submesh = _boundaryMesh->sieveMesh();
+ assert(!submesh.isNull());
+ const ALE::Obj<SieveSubMesh::label_sequence>& cells =
+ submesh->heightStratum(1);
assert(!cells.isNull());
- const SubMesh::label_sequence::iterator cellsBegin = cells->begin();
- const SubMesh::label_sequence::iterator cellsEnd = cells->end();
+ const SieveSubMesh::label_sequence::iterator cellsEnd = cells->end();
// Get sections
- const ALE::Obj<real_section_type>& coordinates =
- mesh->getRealSection("coordinates");
+ const ALE::Obj<MeshRealSection>& coordinates =
+ submesh->getRealSection("coordinates");
assert(!coordinates.isNull());
+ const ALE::Obj<SubMeshRealSection>& tractSection = _tractions->section();
+ assert(!tractSection.isNull());
// Get cell geometry information that doesn't depend on cell
const int numQuadPts = _quadrature->numQuadPts();
@@ -294,14 +273,14 @@
c_iter != cellsEnd;
++c_iter) {
// Compute geometry information for current cell
- _quadrature->computeGeometry(_boundaryMesh, coordinates, *c_iter);
+ _quadrature->computeGeometry(submesh, coordinates, *c_iter);
// Reset element vector to zero
_resetCellVector();
// Restrict tractions to cell
- _boundaryMesh->restrictClosure(_tractions, *c_iter,
- &tractionsCell[0], tractionsCell.size());
+ submesh->restrictClosure(tractSection, *c_iter,
+ &tractionsCell[0], tractionsCell.size());
// Get cell geometry information that depends on cell
const double_array& basis = _quadrature->basis();
@@ -321,7 +300,7 @@
} // for
} // for
// Assemble cell contribution into field
- _boundaryMesh->updateAdd(residual, *c_iter, _cellVector);
+ submesh->updateAdd(residual, *c_iter, _cellVector);
PetscLogFlops(numQuadPts*(1+numBasis*(1+numBasis*(1+2*spaceDim))));
} // for
@@ -330,58 +309,41 @@
// ----------------------------------------------------------------------
// Integrate contributions to Jacobian matrix (A) associated with
void
-pylith::bc::Neumann::integrateJacobian(PetscMat* mat,
+pylith::bc::Neumann::integrateJacobian(PetscMat* jacobian,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh)
+ topology::SolutionFields* const fields)
{ // integrateJacobian
} // integrateJacobian
// ----------------------------------------------------------------------
// Verify configuration is acceptable.
void
-pylith::bc::Neumann::verifyConfiguration(const ALE::Obj<Mesh>& mesh) const
+pylith::bc::Neumann::verifyConfiguration(const topology::Mesh& mesh) const
{ // verifyConfiguration
BoundaryCondition::verifyConfiguration(mesh);
} // verifyConfiguration
// ----------------------------------------------------------------------
// Get boundary mesh.
-const ALE::Obj<pylith::SubMesh>&
+const topology::SubMesh&
pylith::bc::Neumann::boundaryMesh(void) const
{ // dataMesh
- return _boundaryMesh;
+ assert(0 != _boundaryMesh);
+
+ return *_boundaryMesh;
} // dataMesh
// ----------------------------------------------------------------------
// Get cell field for tractions.
-const ALE::Obj<pylith::real_section_type>&
-pylith::bc::Neumann::cellField(VectorFieldEnum* fieldType,
- const char* name,
- const ALE::Obj<Mesh>& mesh,
- topology::FieldsManager* const fields)
+const FieldSubMesh&
+pylith::bc::Neumann::cellField(const char* name,
+ topology::SolutionFields* const fields)
{ // cellField
- assert(0 != fieldType);
+ assert(0 != _tractions);
assert(0 != name);
- assert(!_boundaryMesh.isNull());
- assert(!_tractions.isNull());
- assert(0 != _normalizer);
- const ALE::Obj<Mesh::label_sequence>& cells = _boundaryMesh->heightStratum(1);
- assert(!cells.isNull());
- const Mesh::label_sequence::iterator cellsEnd = cells->end();
-
- const int numQuadPts = _quadrature->numQuadPts();
- const int spaceDim = _quadrature->spaceDim();
-
- ALE::Obj<real_section_type> field = 0;
- int fiberDim = 0;
- double scale = 0.0;
if (0 == strcasecmp(name, "tractions")) {
- *fieldType = OTHER_FIELD;
- field = _tractions;
- fiberDim = spaceDim * numQuadPts;
- scale = _normalizer->pressureScale();
+ return *_tractions;
} else {
std::ostringstream msg;
msg << "Unknown field '" << name << "' requested for Neumann BC '"
@@ -389,30 +351,7 @@
throw std::runtime_error(msg.str());
} // else
- // Allocate buffer if necessary
- if (_buffer.isNull()) {
- _buffer = new real_section_type(_boundaryMesh->comm(), _boundaryMesh->debug());
- assert(!_buffer.isNull());
- _buffer->setChart(real_section_type::chart_type(
- *std::min_element(cells->begin(), cells->end()),
- *std::max_element(cells->begin(), cells->end())+1));
- _buffer->setFiberDimension(cells, fiberDim);
- _boundaryMesh->allocate(_buffer);
- } // if
-
- // dimensionalize values
- double_array values(fiberDim);
- for (Mesh::label_sequence::iterator c_iter=cells->begin();
- c_iter != cellsEnd;
- ++c_iter) {
- assert(fiberDim == field->getFiberDimension(*c_iter));
- assert(fiberDim == _buffer->getFiberDimension(*c_iter));
- field->restrictPoint(*c_iter, &values[0], values.size());
- _normalizer->dimensionalize(&values[0], values.size(), scale);
- _buffer->updatePointAll(*c_iter, &values[0]);
- } // for
-
- return _buffer;
+ return *_tractions;
} // cellField
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/bc/Neumann.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/bc/Neumann.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/bc/Neumann.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -19,31 +19,13 @@
#if !defined(pylith_bc_neumann_hh)
#define pylith_bc_neumann_hh
+// Include directives ---------------------------------------------------
#include "BoundaryCondition.hh" // ISA BoundaryCondition
#include "pylith/feassemble/Integrator.hh" // ISA Integrator
#include "pylith/utils/array.hh" // USES std::vector, double_array, int_array
-#include "pylith/utils/sievetypes.hh" // USES real_section_type
-#include "pylith/utils/vectorfields.hh" // USES VectorFieldEnum
-/// Namespace for pylith package
-namespace pylith {
- namespace bc {
- class Neumann;
- class TestNeumann; // unit testing
- } // bc
-} // pylith
-
-/*
-namespace spatialdata {
- namespace geocoords {
- class CoordSys; // USES CoordSys
- } // geocoords
-} // spatialdata
-*/
-
-
-/// C++ implementation of Neumann boundary conditions.
+// Neumann --------------------------------------------------------------
class pylith::bc::Neumann : public BoundaryCondition,
public feassemble::Integrator
{ // class Neumann
@@ -60,53 +42,45 @@
/** Initialize boundary condition.
*
- * @param mesh PETSc mesh
- * @param cs Coordinate system for mesh
+ * @param mesh Finite-element mesh.
* @param upDir Direction perpendicular to horizontal surface tangent
* direction that is not collinear with surface normal.
*/
- void initialize(const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs,
- const double_array& upDir);
+ void initialize(const topology::Mesh& mesh,
+ const double upDir[3]);
/** Integrate contributions to residual term (r) for operator.
*
- * @param residual Field containing values for residual
- * @param t Current time
- * @param fields Solution fields
- * @param mesh Finite-element mesh
- * @param cs Mesh coordinate system
+ * @param residual Field containing values for residual.
+ * @param t Current time.
+ * @param fields Solution fields.
*/
- void integrateResidual(const ALE::Obj<real_section_type>& residual,
+ void integrateResidual(const topology::Field& residual,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs);
+ topology::SolutionFields* const fields);
/** Integrate contributions to Jacobian matrix (A) associated with
* operator.
*
- * @param mat Sparse matrix
+ * @param jacobian Sparse matrix for Jacobian of system.
* @param t Current time
* @param fields Solution fields
- * @param mesh Finite-element mesh
*/
- void integrateJacobian(PetscMat* mat,
+ void integrateJacobian(PetscMat* jacobian,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh);
+ topology::SolutionFields* const fields);
/** Verify configuration is acceptable.
*
* @param mesh Finite-element mesh
*/
- void verifyConfiguration(const ALE::Obj<Mesh>& mesh) const;
+ void verifyConfiguration(const topology::Mesh& mesh) const;
/** Get boundary mesh.
*
* @returns Boundary mesh.
*/
- const ALE::Obj<SubMesh>& boundaryMesh(void) const;
+ const topology::SubMesh& boundaryMesh(void) const;
/** Get cell field with BC information.
*
@@ -117,11 +91,9 @@
*
* @returns Traction vector at integration points.
*/
- const ALE::Obj<real_section_type>&
- cellField(VectorFieldEnum* fieldType,
- const char* name,
- const ALE::Obj<Mesh>& mesh,
- topology::FieldsManager* const fields);
+ const topology::Field&
+ cellField(const char* name,
+ topology::SolutionFields* const fields);
// NOT IMPLEMENTED ////////////////////////////////////////////////////
private :
@@ -136,17 +108,13 @@
private :
/// Mesh over which tractions are applied
- ALE::Obj<SubMesh> _boundaryMesh;
+ topology::SubMesh* _boundaryMesh;
/// Traction vector in global coordinates at integration points.
- ALE::Obj<real_section_type> _tractions;
+ topology::FieldSubMesh* _tractions;
- ALE::Obj<real_section_type> _buffer; ///< Buffer for output.
-
}; // class Neumann
-// #include "Neumann.icc" // inline methods
-
#endif // pylith_bc_neumann_hh
Added: short/3D/PyLith/branches/pylith-swig/libsrc/bc/bcfwd.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/bc/bcfwd.hh (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/bc/bcfwd.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -0,0 +1,40 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/** @file libsrc/bc/bcfwd.hh
+ *
+ * @brief Forward declarations for PyLith boundary condition objects.
+ *
+ * Including this header file eliminates the need to use separate
+ * forward declarations.
+ */
+
+#if !defined(pylith_bc_bcfwd_hh)
+#define pylith_bc_bcfwd_hh
+
+namespace pylith {
+ namespace bc {
+
+ class BoundaryCondition;
+ class DirichletBC;
+ class DirichletBoundary;
+ class Neumann;
+ class AbosrbingDampers;
+
+ } // bc
+} // pylith
+
+
+#endif // pylith_bc_bcfwd_hh
+
+
+// End of file
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Constraint.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Constraint.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Constraint.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -20,26 +20,11 @@
#define pylith_feassemble_constraint_hh
// Include directives ---------------------------------------------------
+#include "feassemblefwd.hh"
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace feassemble {
- class Constraint;
- class TestConstraint; // unit testing
- } // feassemble
+#include "pylith/topology/topologyfwd.hh" // USES Mesh, Field
+#include "spatialdata/units/unitsfwd.hh" // USES Nondimensional
- namespace topology {
- class Field; // USES Field
- class Mesh; // USES Mesh
- } // feassemble
-} // pylith
-
-namespace spatialdata {
- namespace units {
- class Nondimensional; // USES Nondimensional
- } // units
-} // spatialdata
-
// Constraint -----------------------------------------------------------
class pylith::feassemble::Constraint
{ // class Constraint
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.cc
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.cc 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.cc 2009-02-04 00:06:19 UTC (rev 14013)
@@ -29,8 +29,6 @@
_quadrature(0),
_normalizer(new spatialdata::units::Nondimensional),
_gravityField(0),
- _cellVector(0),
- _cellMatrix(0),
_needNewJacobian(true),
_useSolnIncr(false)
{ // constructor
@@ -42,8 +40,6 @@
{ // destructor
delete _quadrature; _quadrature = 0;
delete _normalizer; _normalizer = 0;
- delete[] _cellVector; _cellVector = 0;
- delete[] _cellMatrix; _cellMatrix = 0;
} // destructor
// ----------------------------------------------------------------------
@@ -55,8 +51,8 @@
_quadrature = (0 != q) ? q->clone() : 0;
// Deallocate cell vector and matrix since size may change
- delete[] _cellVector; _cellVector = 0;
- delete[] _cellMatrix; _cellMatrix = 0;
+ _cellVector.resize(0);
+ _cellMatrix.resize(0);
} // quadrature
// ----------------------------------------------------------------------
@@ -94,10 +90,8 @@
{ // _initCellVector
assert(0 != _quadrature);
const int size = _quadrature->spaceDim() * _quadrature->numBasis();
- if (0 == _cellVector)
- _cellVector = (size > 0) ? new real_section_type::value_type[size] : 0;
- for (int i=0; i < size; ++i)
- _cellVector[i] = 0.0;
+ _cellVector.resize(size);
+ _cellVector = 0.0;
} // _initCellVector
// ----------------------------------------------------------------------
@@ -105,11 +99,7 @@
void
pylith::feassemble::Integrator::_resetCellVector(void)
{ // _resetCellVector
- assert(0 != _quadrature);
- assert(0 != _cellVector);
- const int size = _quadrature->spaceDim() * _quadrature->numBasis();
- for (int i=0; i < size; ++i)
- _cellVector[i] = 0.0;
+ _cellVector = 0.0;
} // _resetCellVector
// ----------------------------------------------------------------------
@@ -121,10 +111,8 @@
const int size =
_quadrature->spaceDim() * _quadrature->numBasis() *
_quadrature->spaceDim() * _quadrature->numBasis();
- if (0 == _cellMatrix)
- _cellMatrix = (size > 0) ? new real_section_type::value_type[size] : 0;
- for (int i=0; i < size; ++i)
- _cellMatrix[i] = 0.0;
+ _cellMatrix.resize(size);
+ _cellMatrix = 0.0;
} // _initCellMatrix
// ----------------------------------------------------------------------
@@ -132,13 +120,7 @@
void
pylith::feassemble::Integrator::_resetCellMatrix(void)
{ // _resetCellMatrix
- assert(0 != _quadrature);
- assert(0 != _cellMatrix);
- const int size =
- _quadrature->spaceDim() * _quadrature->numBasis() *
- _quadrature->spaceDim() * _quadrature->numBasis();
- for (int i=0; i < size; ++i)
- _cellMatrix[i] = 0.0;
+ _cellMatrix = 0.0;
} // _resetCellMatrix
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -24,34 +24,17 @@
#if !defined(pylith_feassemble_integrator_hh)
#define pylith_feassemble_integrator_hh
-#include "pylith/utils/sievetypes.hh" // USES real_section_type
-#include "pylith/utils/petscfwd.h" // USES PetscMat
+// Include directives ---------------------------------------------------
+#include "feassemblefwd.hh" // forward declarations
-namespace pylith {
- namespace feassemble {
- class Integrator;
- class TestIntegrator;
+#include "pylith/topology/topologyfwd.hh" // USES Mesh, Field, SolutionFields
+#include "spatialdata/spatialdb/spatialdbfwd.hh" // USES GravityField
+#include "spatialdata/units/unitsfwd.hh" // USES Nondimensional
- class Quadrature; // HOLDSA Quadrature
- } // feassemble
+#include "pylith/utils/petscfwd.h" // USES PetscMat
+#include "pylith/utils/array.hh" // HASA double_array
- namespace topology {
- class FieldsManager;
- } // topology
-} // pylith
-
-namespace spatialdata {
- namespace spatialdb {
- class GravityField; // HOLDSA GravityField
- } // spatialdb
- namespace geocoords {
- class CoordSys; // USES CoordSys
- } // geocoords
- namespace units {
- class Nondimensional; // USES Nondimensional
- } // units
-} // spatialdata
-
+// Integrator -----------------------------------------------------------
class pylith::feassemble::Integrator
{ // Integrator
friend class TestIntegrator; // unit testing
@@ -121,29 +104,23 @@
* @param residual Field containing values for residual
* @param t Current time
* @param fields Solution fields
- * @param mesh Finite-element mesh
- * @param cs Mesh coordinate system
*/
virtual
- void integrateResidual(const ALE::Obj<real_section_type>& residual,
+ void integrateResidual(const topology::Field& residual,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs);
+ topology::SolutionFields* const fields);
/** Integrate contributions to Jacobian matrix (A) associated with
* operator.
*
- * @param mat Sparse matrix
+ * @param jacobian Sparse matrix for Jacobian of system.
* @param t Current time
* @param fields Solution fields
- * @param mesh Finite-element mesh
*/
virtual
- void integrateJacobian(PetscMat* mat,
+ void integrateJacobian(PetscMat* jacobian,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh);
+ topology::SolutionFields* const fields);
/** Integrate contributions to residual term (r) for operator that
* do not require assembly over cells, vertices, or processors.
@@ -151,30 +128,24 @@
* @param residual Field containing values for residual
* @param t Current time
* @param fields Solution fields
- * @param mesh Finite-element mesh
- * @param cs Mesh coordinate system
*/
virtual
- void integrateResidualAssembled(const ALE::Obj<real_section_type>& residual,
+ void integrateResidualAssembled(const topology::Field& residual,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs);
+ topology::SolutionFields* const fields);
/** Integrate contributions to Jacobian matrix (A) associated with
* operator that do not require assembly over cells, vertices, or
* processors
*
- * @param mat Sparse matrix
+ * @param jacobian Sparse matrix for Jacobian of system.
* @param t Current time
* @param fields Solution fields
- * @param mesh Finite-element mesh
*/
virtual
- void integrateJacobianAssembled(PetscMat* mat,
+ void integrateJacobianAssembled(PetscMat* jacobian,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh);
+ topology::SolutionFields* const fields);
/** Update state variables as needed.
*
@@ -184,15 +155,14 @@
*/
virtual
void updateState(const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh);
+ topology::SolutionFields* const fields);
/** Verify configuration is acceptable.
*
* @param mesh Finite-element mesh
*/
virtual
- void verifyConfiguration(const ALE::Obj<Mesh>& mesh) const = 0;
+ void verifyConfiguration(const topology::Mesh& mesh) const = 0;
// PROTECTED METHODS ////////////////////////////////////////////////////
protected :
@@ -229,10 +199,10 @@
spatialdata::spatialdb::GravityField* _gravityField; ///< Gravity field.
/// Vector local to cell containing result of integration action
- real_section_type::value_type* _cellVector;
+ double_array _cellVector;
/// Matrix local to cell containing result of integration
- real_section_type::value_type* _cellMatrix;
+ double_array _cellMatrix;
/// True if we need to recompute Jacobian for operator, false otherwise.
/// Default is false;
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.icc
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.icc 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Integrator.icc 2009-02-04 00:06:19 UTC (rev 14013)
@@ -39,11 +39,9 @@
inline
void
pylith::feassemble::Integrator::integrateResidual(
- const ALE::Obj<real_section_type>& residual,
- const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs) {
+ const topology::Field& residual,
+ const double t,
+ topology::SolutionFields* const fields) {
} // integrateResidual
// Integrate contributions to Jacobian matrix (A) associated with
@@ -53,8 +51,7 @@
pylith::feassemble::Integrator::integrateJacobian(
PetscMat* mat,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh) {
+ topology::SolutionFields* const fields) {
_needNewJacobian = false;
} // integrateJacobian
@@ -63,11 +60,9 @@
inline
void
pylith::feassemble::Integrator::integrateResidualAssembled(
- const ALE::Obj<real_section_type>& residual,
- const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs) {
+ const topology::Field& residual,
+ const double t,
+ topology::SolutionFields* const fields) {
_needNewJacobian = false;
} // integrateResidualAssembled
@@ -79,8 +74,7 @@
pylith::feassemble::Integrator::integrateJacobianAssembled(
PetscMat* mat,
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh) {
+ topology::SolutionFields* const fields) {
} // integrateJacobianAssembled
// Update state variables as needed.
@@ -88,8 +82,7 @@
void
pylith::feassemble::Integrator::updateState(
const double t,
- topology::FieldsManager* const fields,
- const ALE::Obj<Mesh>& mesh) {
+ topology::SolutionFields* const fields) {
} // updateState
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Makefile.am 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Makefile.am 2009-02-04 00:06:19 UTC (rev 14013)
@@ -50,7 +50,8 @@
Quadrature2Din3D.hh \
Quadrature2Din3D.icc \
Quadrature3D.hh \
- Quadrature3D.icc
+ Quadrature3D.icc \
+ feassemblefwd.hh
noinst_HEADERS =
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Quadrature.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Quadrature.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/Quadrature.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -32,8 +32,10 @@
#define pylith_feassemble_quadrature_hh
#include "pylith/utils/array.hh" // HASA double_array
-#include "pylith/utils/sievetypes.hh" // USES PETSc Mesh
+#define NEWPYLITHMESH 1
+#include "pylith/utils/sievetypes.hh" // USES SieveMesh
+
namespace pylith {
namespace feassemble {
class Quadrature;
@@ -223,12 +225,12 @@
virtual
void computeGeometry(const real_section_type::value_type* vertCoords,
const int coordDim,
- const Mesh::point_type& cell) = 0;
+ const SieveMesh::point_type& cell) = 0;
template<typename mesh_type>
void computeGeometry(const ALE::Obj<mesh_type>& mesh,
const ALE::Obj<real_section_type>& coordinates,
- const Mesh::point_type& cell) {
+ const SieveMesh::point_type& cell) {
computeGeometry(mesh->restrictClosure(coordinates, cell),
coordinates->getFiberDimension(*mesh->depthStratum(0)->begin()),
cell);
@@ -242,9 +244,9 @@
* @param mesh Finite-element mesh
* @param coordinates Section containing vertex coordinates
*/
- void precomputeGeometry(const ALE::Obj<Mesh>& mesh,
- const ALE::Obj<real_section_type>& coordinates,
- const ALE::Obj<Mesh::label_sequence>& cells);
+ void precomputeGeometry(const topology::Mesh& mesh,
+ const ALE::Obj<MeshRealSection>& coordinates,
+ const ALE::Obj<SieveMesh::label_sequence>& cells);
/** Retrieve precomputed geometric quantities for a cell.
*
@@ -252,9 +254,9 @@
* @param coordinates Section containing vertex coordinates
* @param cell Finite-element cell
*/
- void retrieveGeometry(const ALE::Obj<Mesh>& mesh,
- const ALE::Obj<real_section_type>& coordinates,
- const Mesh::point_type& cell,
+ void retrieveGeometry(const ALE::Obj<SieveMesh>& mesh,
+ const ALE::Obj<MeshRealSection>& coordinates,
+ const SieveMesh::point_type& cell,
const int c);
// PROTECTED METHODS ////////////////////////////////////////////////////
@@ -272,7 +274,7 @@
* @param cell Finite-element cell
*/
void _checkJacobianDet(const double det,
- const Mesh::point_type& cell) const;
+ const SieveMesh::point_type& cell) const;
/// Set entries in geometry arrays to zero.
void _resetGeometry(void);
@@ -390,16 +392,16 @@
/* Precomputation sections */
int _qTag, _jTag, _jDTag, _jITag, _bTag;
- Obj<real_section_type> _quadPtsPre;
- Obj<ALE::ISieveVisitor::RestrictVisitor<real_section_type> > _quadPtsPreV;
- Obj<real_section_type> _jacobianPre;
- Obj<ALE::ISieveVisitor::RestrictVisitor<real_section_type> > _jacobianPreV;
- Obj<real_section_type> _jacobianDetPre;
- Obj<ALE::ISieveVisitor::RestrictVisitor<real_section_type> > _jacobianDetPreV;
- Obj<real_section_type> _jacobianInvPre;
- Obj<ALE::ISieveVisitor::RestrictVisitor<real_section_type> > _jacobianInvPreV;
- Obj<real_section_type> _basisDerivPre;
- Obj<ALE::ISieveVisitor::RestrictVisitor<real_section_type> > _basisDerivPreV;
+ ALE::Obj<MeshRealSection> _quadPtsPre;
+ ALE::Obj<ALE::ISieveVisitor::RestrictVisitor<MeshRealSection> > _quadPtsPreV;
+ ALE::Obj<MeshRealSection> _jacobianPre;
+ ALE::Obj<ALE::ISieveVisitor::RestrictVisitor<MeshRealSection> > _jacobianPreV;
+ ALE::Obj<MeshRealSection> _jacobianDetPre;
+ ALE::Obj<ALE::ISieveVisitor::RestrictVisitor<MeshRealSection> > _jacobianDetPreV;
+ ALE::Obj<MeshRealSection> _jacobianInvPre;
+ ALE::Obj<ALE::ISieveVisitor::RestrictVisitor<MeshRealSection> > _jacobianInvPreV;
+ ALE::Obj<MeshRealSection> _basisDerivPre;
+ ALE::Obj<ALE::ISieveVisitor::RestrictVisitor<MeshRealSection> > _basisDerivPreV;
bool _precomputed; ///< True if we have computed geometry info
bool _checkConditioning; ///< True if checking for ill-conditioning
Added: short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/feassemblefwd.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/feassemblefwd.hh (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/feassemble/feassemblefwd.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -0,0 +1,64 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/** @file libsrc/feassemble/feassemblefwd.hh
+ *
+ * @brief Forward declarations for PyLith feassemble objects.
+ *
+ * Including this header file eliminates the need to use separate
+ * forward declarations.
+ */
+
+#if !defined(pylith_feassemble_feassemblefwd_hh)
+#define pylith_feassemble_feassemblefwd_hh
+
+namespace pylith {
+ namespace feassemble {
+
+ class CellGeometry;
+ class GeometryPoint1D;
+ class GeometryPoint2D;
+ class geometryPoint3D;
+ class GeometryLine1D;
+ class GeometryLine2D;
+ class GeometryLine3D;
+ class GeometryTri2D;
+ class GeometryTri3D;
+ class GeometryQuad2D;
+ class GeometryQuad3D;
+ class GeometryTet3D;
+ class GeometryHex3D;
+
+ class Quadrature;
+ class Quadrature0D;
+ class Quadrature1D;
+ class Quadrature1Din2D;
+ class Quadrature1Din3D;
+ class Quadrature2D;
+ class Quadrature2Din3D;
+ class Quadrature3D;
+
+ class Constraint;
+ class Integrator;
+
+ class IntegratorElasticity;
+ class ElasticityImplicit;
+ class ElasticityExplicit;
+
+ } // feassemble
+} // pylith
+
+
+#endif // pylith_feassemble_feassemblefwd_hh
+
+
+// End of file
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/materials/Material.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/materials/Material.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/materials/Material.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -26,7 +26,6 @@
#include "pylith/utils/array.hh" // USES double_array
#include <string> // HASA std::string
#include "pylith/utils/sievetypes.hh" // USES real_section_type
-#include "pylith/utils/vectorfields.hh" // USES VectorFieldEnum
/// Namespace for pylith package
namespace pylith {
@@ -154,12 +153,10 @@
/** Initialize material by getting physical property parameters from
* database.
*
- * @param mesh PETSc mesh
- * @param cs Coordinate system associated with mesh
+ * @param mesh Finite-element mesh.
* @param quadrature Quadrature for finite-element integration
*/
- void initialize(const ALE::Obj<Mesh>& mesh,
- const spatialdata::geocoords::CoordSys* cs,
+ void initialize(const topology::Mesh& mesh,
pylith::feassemble::Quadrature* quadrature);
/** Get flag indicating whether Jacobian matrix must be reformed for
@@ -186,12 +183,12 @@
*
* @param field Proeprty field.
* @param name Name of physical property.
- * @param mesh PETSc mesh.
+ * @param mesh Finite-element mesh.
* @param numQuadPoints Number of quadrature points.
*/
void propertyField(ALE::Obj<real_section_type>* field,
const char* name,
- const ALE::Obj<Mesh>& mesh,
+ const topology::Mesh& mesh,
const int numQuadPts) const;
// PROTECTED METHODS //////////////////////////////////////////////////
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/BinaryIO.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/BinaryIO.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/BinaryIO.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -10,17 +10,21 @@
// ======================================================================
//
+/**
+ * @file pylith/meshio/MeshIOCubit.hh
+ *
+ * @brief C++ object for general binary input/output operations.
+ */
+
#if !defined(pylith_meshio_binaryio_hh)
#define pylith_meshio_binaryio_hh
+// Include directives ---------------------------------------------------
+#include "meshiofwd.hh" // forward declarations
+
#include <iosfwd>
-namespace pylith {
- namespace meshio {
- class BinaryIO;
- } // meshio
-} // pylith
-
+// BinaryIO -------------------------------------------------------------
class pylith::meshio::BinaryIO
{ // BinaryIO
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFile.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFile.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFile.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -10,17 +10,21 @@
// ======================================================================
//
+/**
+ * @file libsrc/topology/GMVFile.hh
+ *
+ * @brief C++ base class for input/output of LaGriT GMV files.
+ */
+
#if !defined(pylith_meshio_gmvfile_hh)
#define pylith_meshio_gmvfile_hh
+// Include directives ---------------------------------------------------
+#include "meshiofwd.hh" // forward declarations
+
#include <string> // HASA std::string
-namespace pylith {
- namespace meshio {
- class GMVFile;
- } // meshio
-} // pylith
-
+// GMVFile --------------------------------------------------------------
class pylith::meshio::GMVFile
{ // GMVFile
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFileAscii.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFileAscii.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFileAscii.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -10,20 +10,22 @@
// ======================================================================
//
+/**
+ * @file libsrc/topology/GMVFileAscii.hh
+ *
+ * @brief C++ object for input/output of LaGriT ASCII GMV files.
+ */
+
#if !defined(pylith_meshio_gmvfileascii_hh)
#define pylith_meshio_gmvfileascii_hh
+// Include directives ---------------------------------------------------
#include "GMVFile.hh" // ISA GMVFile
#include "pylith/utils/arrayfwd.hh" // USES int_array, double_array
#include <iosfwd>
-namespace pylith {
- namespace meshio {
- class GMVFileAscii;
- } // meshio
-} // pylith
-
+// GMVFileAscii ---------------------------------------------------------
class pylith::meshio::GMVFileAscii : public GMVFile
{ // GMVFileAscii
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFileBinary.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFileBinary.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/GMVFileBinary.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -10,20 +10,22 @@
// ======================================================================
//
+/**
+ * @file libsrc/topology/GMVFileAscii.hh
+ *
+ * @brief C++ object for input/output of LaGriT ASCII GMV files.
+ */
+
#if !defined(pylith_meshio_gmvfilebinary_hh)
#define pylith_meshio_gmvfilebinary_hh
+// Include directives ---------------------------------------------------
#include "GMVFile.hh" // ISA GMVFile
#include "pylith/utils/arrayfwd.hh" // USES int_array, double_array
#include <iosfwd>
-namespace pylith {
- namespace meshio {
- class GMVFileBinary;
- } // meshio
-} // pylith
-
+// GMVFileBinary --------------------------------------------------------
class pylith::meshio::GMVFileBinary : public GMVFile
{ // GMVFileBinary
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/Makefile.am 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/Makefile.am 2009-02-04 00:06:19 UTC (rev 14013)
@@ -28,9 +28,10 @@
MeshIOLagrit.icc \
OutputManager.hh \
OutputSolnSubset.hh \
+ UCDFaultFile.hh \
VertexFilter.hh \
VertexFilterVecNorm.hh \
- UCDFaultFile.cc
+ meshiofwd.hh
if ENABLE_CUBIT
subpkginclude_HEADERS += \
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshBuilder.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshBuilder.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshBuilder.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -14,29 +14,16 @@
#define pylith_meshio_meshbuilder_hh
// Include directives ---------------------------------------------------
+#include "meshiofwd.hh" // forward declarations
+
+#include "pylith/topology/topologyfwd.hh" // USES Mesh
#include "pylith/utils/arrayfwd.hh" // USES double_array, int_array,
// string_vector
+#include "spatialdata/units/unitsfwd.hh" // USES Nondimensional
#define NEWPYLITHMESH 1
#include "pylith/utils/sievetypes.hh" // USES Obj, PETSc Mesh
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace meshio {
- class MeshBuilder;
- } // meshio
-
- namespace topology {
- class Mesh;
- } // meshio
-} // pylith
-
-namespace spatialdata {
- namespace units {
- class Nondimensional; // USES Nondimensional
- } // units
-} // spatialdata
-
// MeshBuilder ----------------------------------------------------------
class pylith::meshio::MeshBuilder
{ // MeshBuilder
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIO.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIO.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIO.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -10,30 +10,24 @@
// ======================================================================
//
+/**
+ * @file libsrc/topology/MeshIO.hh
+ *
+ * @brief C++ object for managing mesh input/output.
+ */
+
#if !defined(pylith_meshio_meshio_hh)
#define pylith_meshio_meshio_hh
// Include directives ---------------------------------------------------
+#include "meshiofwd.hh" // forward declarations
+
+#include "pylith/topology/topologyfwd.hh" // forward declarations
+#include "spatialdata/units/unitsfwd.hh" // forward declarations
+
#include "pylith/utils/arrayfwd.hh" // USES double_array, int_array,
// string_vector
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace meshio {
- class MeshIO;
- } // meshio
-
- namespace topology {
- class Mesh; // USES Mesh
- } // topology
-} // pylith
-
-namespace spatialdata {
- namespace units {
- class Nondimensional; // USES Nondimensional
- } // units
-} // spatialdata
-
// MeshIO ---------------------------------------------------------------
class pylith::meshio::MeshIO
{ // MeshIO
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOAscii.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOAscii.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOAscii.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -22,24 +22,11 @@
// Include directives ---------------------------------------------------
#include "MeshIO.hh" // ISA MeshIO
+#include "spatialdata/utils/utilsfwd.hh" // USES LineParser
+
#include <iosfwd> // USES std::istream, std::ostream
#include <string> // HASA std::string
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace meshio {
- class MeshIOAscii;
-
- class TestMeshIOAscii; // unit testing
- } // meshio
-} // pylith
-
-namespace spatialdata {
- namespace utils {
- class LineParser;
- } // utils
-} // pylith
-
// MeshIOAscii ----------------------------------------------------------
class pylith::meshio::MeshIOAscii : public MeshIO
{ // MeshIOAscii
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOCubit.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOCubit.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOCubit.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -25,14 +25,6 @@
#include <string> // HASA std::string
// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace meshio {
- class MeshIOCubit;
-
- class TestMeshIOCubit; // unit testing
- } // meshio
-} // pylith
-
class NcFile; // netcdf file
// MeshIOCubit ----------------------------------------------------------
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOLagrit.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOLagrit.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/MeshIOLagrit.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -24,15 +24,6 @@
#include <string> // HASA std::string
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace meshio {
- class MeshIOLagrit;
-
- class TestMeshIOLagrit; // unit testing
- } // meshio
-} // pylith
-
// MeshIOLagrit ---------------------------------------------------------
class pylith::meshio::MeshIOLagrit : public MeshIO
{ // MeshIOLagrit
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFile.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFile.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFile.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -10,18 +10,22 @@
// ======================================================================
//
+/**
+ * @file libsrc/topology/PsetFile.hh
+ *
+ * @brief C++ base class for input/output of LaGriT Pset files.
+ */
+
#if !defined(pylith_meshio_psetfile_hh)
#define pylith_meshio_psetfile_hh
-#include "pylith/utils/array.hh" // USES int_array
+// Include directives ---------------------------------------------------
+#include "meshiofwd.hh" // forward declarations
+
+#include "pylith/utils/array.hh" // HASA int_array
#include <string> // HASA std::string
-namespace pylith {
- namespace meshio {
- class PsetFile;
- } // meshio
-} // pylith
-
+// PsetFile -------------------------------------------------------------
class pylith::meshio::PsetFile
{ // PsetFile
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFileAscii.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFileAscii.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFileAscii.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -10,20 +10,21 @@
// ======================================================================
//
+/**
+ * @file libsrc/topology/PsetFile.hh
+ *
+ * @brief C++ object for input/output of LaGriT binary Pset files.
+ */
+
#if !defined(pylith_meshio_psetfileascii_hh)
#define pylith_meshio_psetfileascii_hh
+// Include directives ---------------------------------------------------
#include "PsetFile.hh" // ISA PsetFile
-#include "pylith/utils/array.hh" // USES int_array, string_array, std::vector
#include <iosfwd>
-namespace pylith {
- namespace meshio {
- class PsetFileAscii;
- } // meshio
-} // pylith
-
+// PsetFileAscii --------------------------------------------------------
class pylith::meshio::PsetFileAscii : public PsetFile
{ // PsetFileAscii
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFileBinary.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFileBinary.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/PsetFileBinary.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -10,20 +10,21 @@
// ======================================================================
//
+/**
+ * @file libsrc/topology/PsetFile.hh
+ *
+ * @brief C++ object for input/output of LaGriT binary Pset files.
+ */
+
#if !defined(pylith_meshio_psetfilebinary_hh)
#define pylith_meshio_psetfilebinary_hh
+// Include directives ---------------------------------------------------
#include "PsetFile.hh" // ISA PsetFile
-#include "pylith/utils/array.hh" // USES int_array, string_array, std::vector
#include <iosfwd>
-namespace pylith {
- namespace meshio {
- class PsetFileBinary;
- } // meshio
-} // pylith
-
+// PsetFileBinary -------------------------------------------------------
class pylith::meshio::PsetFileBinary : public PsetFile
{ // PsetFileBinary
Added: short/3D/PyLith/branches/pylith-swig/libsrc/meshio/meshiofwd.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/meshio/meshiofwd.hh (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/meshio/meshiofwd.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/** @file libsrc/meshio/meshiofwd.hh
+ *
+ * @brief Forward declarations for PyLith meshio objects.
+ *
+ * Including this header file eliminates the need to use separate
+ * forward declarations.
+ */
+
+#if !defined(pylith_meshio_meshiofwd_hh)
+#define pylith_meshio_meshiofwd_hh
+
+namespace pylith {
+ namespace meshio {
+
+ class BinaryIO;
+
+ class MeshIO;
+ class MeshBuilder;
+ class MeshIOAscii;
+ class MeshIOCubit;
+ class MeshIOLagrit;
+ class GMVFile;
+ class GMVFileAscii;
+ class GMVFileBinary;
+ class PsetFile;
+ class PsetFileAscii;
+ class PsetFileBinary;
+
+ class DataWriter;
+ class DataWriterVTK;
+
+ class CellFilter;
+ class CellFilterAvg;
+ class VertexFilter;
+ class VertexFilterVecNorm;
+
+ class UCDFaultFile;
+
+ } // meshio
+} // pylith
+
+
+#endif // pylith_meshio_meshiofwd_hh
+
+
+// End of file
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/topology/Field.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/topology/Field.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/topology/Field.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -19,25 +19,12 @@
* Extends Sieve real general section by adding metadata.
*/
-#include "FieldBase.hh" // ISA FieldBase
-
#if !defined(pylith_topology_field_hh)
#define pylith_topology_field_hh
// Include directives ---------------------------------------------------
-#define NEWPYLITHMESH 1
-#include "pylith/utils/sievetypes.hh" // HASA PETSc real_section_type
+#include "FieldBase.hh" // ISA FieldBase
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace topology {
- class Field;
- class TestField;
-
- class Mesh; // HASA Mesh
- } // topology
-} // pylith
-
// Field ----------------------------------------------------------------
class pylith::topology::Field : public FieldBase
{ // Field
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/topology/FieldBase.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/topology/FieldBase.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/topology/FieldBase.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -31,19 +31,13 @@
#define pylith_topology_fieldbase_hh
// Include directives ---------------------------------------------------
+#include "topologyfwd.hh" // forward declarations
+
#define NEWPYLITHMESH 1
#include "pylith/utils/sievetypes.hh" // HASA PETSc real_section_type
#include <string> // HASA std::string
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace topology {
- class FieldBase;
- class TestFieldBase;
- } // topology
-} // pylith
-
// FieldBase ----------------------------------------------------------------
class pylith::topology::FieldBase
{ // FieldBase
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/topology/FieldSubMesh.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/topology/FieldSubMesh.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/topology/FieldSubMesh.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -19,26 +19,13 @@
* Extends Sieve real general section by adding metadata.
*/
-#include "FieldBase.hh" // ISA FieldBase
-
#if !defined(pylith_topology_fieldsubmesh_hh)
#define pylith_topology_fieldsubmesh_hh
// Include directives ---------------------------------------------------
-#define NEWPYLITHMESH 1
-#include "pylith/utils/sievetypes.hh" // HASA PETSc real_section_type
+#include "FieldBase.hh" // ISA FieldBase
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace topology {
- class FieldSubMesh;
- class TestFieldSubMesh;
-
- class SubMesh; // HASA SubMesh
- } // topology
-} // pylith
-
-// FieldSubMesh ----------------------------------------------------------------
+// FieldSubMesh ---------------------------------------------------------
class pylith::topology::FieldSubMesh : public FieldBase
{ // FieldSubMesh
friend class TestFieldSubMesh; // unit testing
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/topology/Fields.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/topology/Fields.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/topology/Fields.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -20,18 +20,10 @@
#define pylith_topology_fields_hh
// Include directives ---------------------------------------------------
+#include "topologyfwd.hh" // forward declarations
+
#include "FieldBase.hh" // USES FieldBase::DomainEnum
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace topology {
- template<typename field_type, typename mesh_type> class Fields;
-
- class TestFieldsMesh; // unit testing
- class TestFieldsSubMesh; // unit testing
- } // topology
-} // pylith
-
// Fields ---------------------------------------------------------------
template<typename field_type, typename mesh_type>
class pylith::topology::Fields
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/topology/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/topology/Makefile.am 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/topology/Makefile.am 2009-02-04 00:06:19 UTC (rev 14013)
@@ -29,7 +29,8 @@
MeshRefiner.hh \
RefineUniform.hh \
SubMesh.hh \
- SubMesh.icc
+ SubMesh.icc \
+ topologyfwd.hh
noinst_HEADERS =
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/topology/Mesh.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/topology/Mesh.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/topology/Mesh.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -23,23 +23,12 @@
#define pylith_topology_mesh_hh
// Include directives ---------------------------------------------------
+#include "topologyfwd.hh" // forward declarations
+#include "spatialdata/geocoords/geocoordsfwd.hh" // forward declarations
+
#define NEWPYLITHMESH 1
#include "pylith/utils/sievetypes.hh"
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace topology {
- class Mesh;
- class TestMesh; // unit testing
- } // topology
-} // pylith
-
-namespace spatialdata {
- namespace geocoords {
- class CoordSys;
- } // geocoords
-} // spatialdata
-
// Mesh -----------------------------------------------------------------
class pylith::topology::Mesh
{ // Mesh
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/topology/MeshOps.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/topology/MeshOps.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/topology/MeshOps.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -19,17 +19,9 @@
#if !defined(pylith_topology_meshops_hh)
#define pylith_topology_meshops_hh
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace topology {
- class MeshOps;
+// Include directives ---------------------------------------------------
+#include "topologyfwd.hh" // forward declarations
- class Mesh; // USES Mesh
- class TestMeshOps; // unit testing
- } // topology
-} // pylith
-
-
// MeshOps --------------------------------------------------------------
class pylith::topology::MeshOps
{ // MeshOps
Modified: short/3D/PyLith/branches/pylith-swig/libsrc/topology/SubMesh.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/topology/SubMesh.hh 2009-02-03 19:50:37 UTC (rev 14012)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/topology/SubMesh.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -23,25 +23,12 @@
#define pylith_topology_submesh_hh
// Include directives ---------------------------------------------------
+#include "topologyfwd.hh" // forward declarations
+#include "spatialdata/geocoords/geocoordsfwd.hh" // forward declarations
+
#define NEWPYLITHMESH 1
#include "pylith/utils/sievetypes.hh"
-// Forward declarations -------------------------------------------------
-namespace pylith {
- namespace topology {
- class SubMesh;
- class TestSubMesh; // unit testing
-
- class Mesh; // USES Mesh
- } // topology
-} // pylith
-
-namespace spatialdata {
- namespace geocoords {
- class CoordSys; // USES Mesh
- } // geocoords
-} // spatialdata
-
// SubMesh -----------------------------------------------------------------
class pylith::topology::SubMesh
{ // SubMesh
Added: short/3D/PyLith/branches/pylith-swig/libsrc/topology/topologyfwd.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/topology/topologyfwd.hh (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/topology/topologyfwd.hh 2009-02-04 00:06:19 UTC (rev 14013)
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/** @file libsrc/topology/topologyfwd.hh
+ *
+ * @brief Forward declarations for PyLith topology objects.
+ *
+ * Including this header file eliminates the need to use separate
+ * forward declarations.
+ */
+
+#if !defined(pylith_topology_topologyfwd_hh)
+#define pylith_topology_topologyfwd_hh
+
+namespace pylith {
+ namespace topology {
+
+ class Mesh;
+ class SubMesh;
+ class MeshOps;
+
+ class FieldBase;
+ class Field;
+ class FieldSubMesh;
+ template<typename field_type, typename mesh_type> class Fields;
+ typedef Fields<Field, Mesh> FieldsMesh;
+ typedef Fields<FieldSubMesh, SubMesh> FieldsSubMesh;
+ class SolutionFields;
+
+ class Distributor;
+
+ class MeshRefiner;
+ class RefineUniform;
+
+ } // topology
+} // pylith
+
+
+#endif // pylith_topology_topologyfwd_hh
+
+
+// End of file
More information about the CIG-COMMITS
mailing list