[cig-commits] r4680 - in short/3D/PyLith/trunk: libsrc/feassemble
unittests/libtests/feassemble
brad at geodynamics.org
brad at geodynamics.org
Mon Oct 2 18:34:51 PDT 2006
Author: brad
Date: 2006-10-02 18:34:51 -0700 (Mon, 02 Oct 2006)
New Revision: 4680
Modified:
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.hh
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.hh
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.hh
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.hh
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.hh
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.hh
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc
short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.hh
short/3D/PyLith/trunk/unittests/libtests/feassemble/TestQuadrature.cc
short/3D/PyLith/trunk/unittests/libtests/feassemble/test_feassemble.cc
Log:
Updated to reflect changes in Sieve types (section_type -> real_section_type).
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.hh 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.hh 2006-10-03 01:34:51 UTC (rev 4680)
@@ -127,7 +127,7 @@
* @param cell Finite-element cell
*/
virtual
- void _computeGeometry(const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ void _computeGeometry(const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell) = 0;
/// Set entries in geometry arrays to zero.
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc 2006-10-03 01:34:51 UTC (rev 4680)
@@ -39,7 +39,7 @@
// Compute geometric quantities for a cell.
void
pylith::feassemble::Quadrature1D::_computeGeometry(
- const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell)
{ // _computeGeometry
assert(1 == _cellDim);
@@ -55,7 +55,7 @@
// Get coordinates of cell's vertices
const ALE::Mesh::topology_type::patch_type patch = 0;
- const ALE::Mesh::section_type::value_type* vertCoords =
+ const ALE::Mesh::real_section_type::value_type* vertCoords =
coordinates->restrict(patch, cell);
//assert(1 == coordinates.GetFiberDimensionByDepth(patch,
//*vertices->begin(), 0));
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.hh 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.hh 2006-10-03 01:34:51 UTC (rev 4680)
@@ -59,7 +59,7 @@
* @param coordinates Section containing vertex coordinates
* @param cell Finite-element cell
*/
- void _computeGeometry(const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ void _computeGeometry(const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell);
// PRIVATE METHODS //////////////////////////////////////////////////////
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc 2006-10-03 01:34:51 UTC (rev 4680)
@@ -39,7 +39,7 @@
// Compute geometric quantities for a cell.
void
pylith::feassemble::Quadrature1Din2D::_computeGeometry(
- const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell)
{ // _computeGeometry
assert(1 == _cellDim);
@@ -55,7 +55,7 @@
// Get coordinates of cell's vertices
const ALE::Mesh::topology_type::patch_type patch = 0;
- const ALE::Mesh::section_type::value_type* vertCoords =
+ const ALE::Mesh::real_section_type::value_type* vertCoords =
coordinates->restrict(patch, cell);
//assert(2 == coordinates.GetFiberDimensionByDepth(patch,
//*vertices->begin(), 0));
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.hh 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.hh 2006-10-03 01:34:51 UTC (rev 4680)
@@ -59,7 +59,7 @@
* @param coordinates Section containing vertex coordinates
* @param cell Finite-element cell
*/
- void _computeGeometry(const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ void _computeGeometry(const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell);
// PRIVATE METHODS //////////////////////////////////////////////////////
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc 2006-10-03 01:34:51 UTC (rev 4680)
@@ -39,7 +39,7 @@
// Compute geometric quantities for a cell.
void
pylith::feassemble::Quadrature1Din3D::_computeGeometry(
- const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell)
{ // _computeGeometry
assert(1 == _cellDim);
@@ -55,7 +55,7 @@
// Get coordinates of cell's vertices
const ALE::Mesh::topology_type::patch_type patch = 0;
- const ALE::Mesh::section_type::value_type* vertCoords =
+ const ALE::Mesh::real_section_type::value_type* vertCoords =
coordinates->restrict(patch, cell);
//assert(3 == coordinates.GetFiberDimensionByDepth(patch,
//*vertices->begin(), 0));
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.hh 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.hh 2006-10-03 01:34:51 UTC (rev 4680)
@@ -59,7 +59,7 @@
* @param coordinates Section containing vertex coordinates
* @param cell Finite-element cell
*/
- void _computeGeometry(const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ void _computeGeometry(const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell);
// PRIVATE METHODS //////////////////////////////////////////////////////
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc 2006-10-03 01:34:51 UTC (rev 4680)
@@ -39,7 +39,7 @@
// Compute geometric quantities for a cell.
void
pylith::feassemble::Quadrature2D::_computeGeometry(
- const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell)
{ // _computeGeometry
assert(2 == _cellDim);
@@ -55,7 +55,7 @@
// Get coordinates of cell's vertices
const ALE::Mesh::topology_type::patch_type patch = 0;
- const ALE::Mesh::section_type::value_type* vertCoords =
+ const ALE::Mesh::real_section_type::value_type* vertCoords =
coordinates->restrict(patch, cell);
//assert(2 == coordinates.GetFiberDimensionByDepth(patch,
//*vertices->begin(), 0));
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.hh 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.hh 2006-10-03 01:34:51 UTC (rev 4680)
@@ -59,7 +59,7 @@
* @param coordinates Section containing vertex coordinates
* @param cell Finite-element cell
*/
- void _computeGeometry(const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ void _computeGeometry(const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell);
// PRIVATE METHODS //////////////////////////////////////////////////////
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc 2006-10-03 01:34:51 UTC (rev 4680)
@@ -42,7 +42,7 @@
// Compute geometric quantities for a cell.
void
pylith::feassemble::Quadrature2Din3D::_computeGeometry(
- const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell)
{ // _computeGeometry
assert(2 == _cellDim);
@@ -58,7 +58,7 @@
// Get coordinates of cell's vertices
const ALE::Mesh::topology_type::patch_type patch = 0;
- const ALE::Mesh::section_type::value_type* vertCoords =
+ const ALE::Mesh::real_section_type::value_type* vertCoords =
coordinates->restrict(patch, cell);
//assert(3 == coordinates.GetFiberDimensionByDepth(patch,
//*vertices->begin(), 0));
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.hh 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.hh 2006-10-03 01:34:51 UTC (rev 4680)
@@ -59,7 +59,7 @@
* @param coordinates Section containing vertex coordinates
* @param cell Finite-element cell
*/
- void _computeGeometry(const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ void _computeGeometry(const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell);
// PRIVATE METHODS //////////////////////////////////////////////////////
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc 2006-10-03 01:34:51 UTC (rev 4680)
@@ -39,7 +39,7 @@
// Compute geometric quantities for a cell.
void
pylith::feassemble::Quadrature3D::_computeGeometry(
- const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell)
{ // _computeGeometry
assert(3 == _cellDim);
@@ -55,7 +55,7 @@
// Get coordinates of cell's vertices
const ALE::Mesh::topology_type::patch_type patch = 0;
- const ALE::Mesh::section_type::value_type* vertCoords =
+ const ALE::Mesh::real_section_type::value_type* vertCoords =
coordinates->restrict(patch, cell);
//assert(3 == coordinates.GetFiberDimensionByDepth(patch,
//*vertices->begin(), 0));
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.hh 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.hh 2006-10-03 01:34:51 UTC (rev 4680)
@@ -59,7 +59,7 @@
* @param coordinates Section containing vertex coordinates
* @param cell Finite-element cell
*/
- void _computeGeometry(const ALE::Obj<ALE::Mesh::section_type>& coordinates,
+ void _computeGeometry(const ALE::Obj<ALE::Mesh::real_section_type>& coordinates,
const ALE::Mesh::point_type& cell);
// PRIVATE METHODS //////////////////////////////////////////////////////
Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestQuadrature.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestQuadrature.cc 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestQuadrature.cc 2006-10-03 01:34:51 UTC (rev 4680)
@@ -232,10 +232,9 @@
cellDim, numCorners, numQuadPts, spaceDim);
// Create mesh with test cell
- typedef ALE::Sieve<int, int, int> sieve_type;
- typedef ALE::New::Topology<int, sieve_type> topology_type;
- typedef ALE::New::Section<topology_type, double> section_type;
- ALE::Obj<ALE::Mesh> mesh = ALE::Mesh(PETSC_COMM_WORLD, cellDim);
+ typedef ALE::Mesh::topology_type topology_type;
+ typedef topology_type::sieve_type sieve_type;
+ ALE::Obj<ALE::Mesh> mesh = new ALE::Mesh(PETSC_COMM_WORLD, cellDim);
ALE::Obj<sieve_type> sieve = new sieve_type(mesh->comm());
ALE::Obj<topology_type> topology = new topology_type(mesh->comm());
@@ -245,17 +244,17 @@
sieve->stratify();
topology->setPatch(0, sieve);
topology->stratify();
- mesh->setTopologyNew(topology);
+ mesh->setTopology(topology);
ALE::New::SieveBuilder<sieve_type>::buildCoordinates(
- mesh->getSection("coordinates"), spaceDim, vertCoords);
+ mesh->getRealSection("coordinates"), spaceDim, vertCoords);
// Check values from _computeGeometry()
const ALE::Mesh::topology_type::patch_type patch = 0;
const ALE::Obj<topology_type::label_sequence>& elements =
topology->heightStratum(patch, 0);
const topology_type::label_sequence::iterator e_iter = elements->begin();
- const ALE::Obj<ALE::Mesh::section_type>& coordinates =
- mesh->getSection("coordinates");
+ const ALE::Obj<ALE::Mesh::real_section_type>& coordinates =
+ mesh->getRealSection("coordinates");
pQuad->_computeGeometry(coordinates, *e_iter);
CPPUNIT_ASSERT(1 == numCells);
Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/test_feassemble.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/test_feassemble.cc 2006-10-02 23:20:32 UTC (rev 4679)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/test_feassemble.cc 2006-10-03 01:34:51 UTC (rev 4680)
@@ -21,38 +21,45 @@
#include <cppunit/TestRunner.h>
#include <cppunit/TextOutputter.h>
+#include <stdlib.h> // USES abort()
+
int
main(int argc,
char* argv[])
{ // main
- // Initialize PETSc
- PetscErrorCode err = PetscInitialize(&argc, &argv, PETSC_NULL, PETSC_NULL);
- CHKERRQ(err);
+ CppUnit::TestResultCollector result;
- // Create event manager and test controller
- CppUnit::TestResult controller;
+ try {
+ // Initialize PETSc
+ PetscErrorCode err = PetscInitialize(&argc, &argv, PETSC_NULL, PETSC_NULL);
+ CHKERRQ(err);
- // Add listener to collect test results
- CppUnit::TestResultCollector result;
- controller.addListener(&result);
+ // Create event manager and test controller
+ CppUnit::TestResult controller;
- // Add listener to show progress as tests run
- CppUnit::BriefTestProgressListener progress;
- controller.addListener(&progress);
+ // Add listener to collect test results
+ controller.addListener(&result);
- // Add top suite to test runner
- CppUnit::TestRunner runner;
- runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
- runner.run(controller);
+ // Add listener to show progress as tests run
+ CppUnit::BriefTestProgressListener progress;
+ controller.addListener(&progress);
- // Print tests
- CppUnit::TextOutputter outputter(&result, std::cerr);
- outputter.write();
+ // Add top suite to test runner
+ CppUnit::TestRunner runner;
+ runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
+ runner.run(controller);
- // Finalize PETSc
- err = PetscFinalize();
- CHKERRQ(err);
+ // Print tests
+ CppUnit::TextOutputter outputter(&result, std::cerr);
+ outputter.write();
+ // Finalize PETSc
+ err = PetscFinalize();
+ CHKERRQ(err);
+ } catch (...) {
+ abort();
+ } // catch
+
return (result.wasSuccessful() ? 0 : 1);
} // main
More information about the cig-commits
mailing list