[cig-commits] r15082 - in short/3D/PyLith/trunk: libsrc/faults libsrc/topology modulesrc/topology tests/1d/line2 tests/2d/quad4 unittests/libtests/materials/data unittests/libtests/topology

brad at geodynamics.org brad at geodynamics.org
Thu May 28 22:40:59 PDT 2009


Author: brad
Date: 2009-05-28 22:40:57 -0700 (Thu, 28 May 2009)
New Revision: 15082

Added:
   short/3D/PyLith/trunk/tests/2d/quad4/axialshear_soln.py
   short/3D/PyLith/trunk/tests/2d/quad4/axialsheardisp.cfg
   short/3D/PyLith/trunk/tests/2d/quad4/axialsheardisp_gendb.py
Modified:
   short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc
   short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
   short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc
   short/3D/PyLith/trunk/libsrc/topology/Field.cc
   short/3D/PyLith/trunk/libsrc/topology/Field.hh
   short/3D/PyLith/trunk/libsrc/topology/Fields.icc
   short/3D/PyLith/trunk/modulesrc/topology/Field.i
   short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg
   short/3D/PyLith/trunk/tests/2d/quad4/matprops.spatialdb
   short/3D/PyLith/trunk/tests/2d/quad4/testpylith.py
   short/3D/PyLith/trunk/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDep.py
   short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.hh
   short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.hh
Log:
Renamed newSection(field) to cloneSection(field) since allocation is included in cloneSection(). More work on quad4 full-scale tests.

Modified: short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc	2009-05-29 05:40:57 UTC (rev 15082)
@@ -101,8 +101,7 @@
 
   _parameters->add("rise time", "rise_time");
   topology::Field<topology::SubMesh>& riseTime = _parameters->get("rise time");
-  riseTime.newSection(slipTime);
-  riseTime.allocate();
+  riseTime.cloneSection(slipTime);
   riseTime.scale(timeScale);
   riseTime.vectorFieldType(topology::FieldBase::SCALAR);
   const ALE::Obj<RealSection>& riseTimeSection = riseTime.section();

Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc	2009-05-29 05:40:57 UTC (rev 15082)
@@ -127,8 +127,7 @@
   // Allocate cumulative slip field
   _fields->add("cumulative slip", "cumulative_slip");
   topology::Field<topology::SubMesh>& cumSlip = _fields->get("cumulative slip");
-  cumSlip.newSection(slip);
-  cumSlip.allocate();
+  cumSlip.cloneSection(slip);
   cumSlip.vectorFieldType(topology::FieldBase::VECTOR);
   cumSlip.scale(_normalizer->lengthScale());
 
@@ -802,7 +801,9 @@
   // Allocate orientation field.
   _fields->add("orientation", "orientation");
   topology::Field<topology::SubMesh>& orientation = _fields->get("orientation");
-  orientation.newSection(topology::FieldBase::VERTICES_FIELD, orientationSize);
+  const ALE::Obj<RealSection>& slipSection = _fields->get("slip").section();
+  assert(!slipSection.isNull());
+  orientation.newSection(slipSection->getChart(), orientationSize);
   const ALE::Obj<RealSection>& orientationSection = orientation.section();
   assert(!orientationSection.isNull());
   // Create subspaces for along-strike, up-dip, and normal directions
@@ -967,7 +968,9 @@
   _fields->add("area", "area");
 
   topology::Field<topology::SubMesh>& area = _fields->get("area");
-  area.newSection(topology::FieldBase::VERTICES_FIELD, 1);
+  const ALE::Obj<RealSection>& slipSection = _fields->get("slip").section();
+  assert(!slipSection.isNull());
+  area.newSection(slipSection->getChart(), 1);
   area.allocate();
   area.zero();
   const ALE::Obj<RealSection>& areaSection = area.section();
@@ -1107,7 +1110,10 @@
   // Allocate buffer for tractions field (if nec.).
   const ALE::Obj<RealSection>& tractionsSection = tractions->section();
   if (tractionsSection.isNull()) {
-    tractions->newSection(topology::FieldBase::VERTICES_FIELD, fiberDim);
+    const ALE::Obj<RealSection>& slipSection =
+      _fields->get("slip").section();
+    assert(!slipSection.isNull());
+    tractions->newSection(slipSection->getChart(), fiberDim);
     tractions->allocate();
   } // if
   assert(!tractionsSection.isNull());
@@ -1158,8 +1164,7 @@
     _fields->get("buffer (vector)");
   const topology::Field<topology::SubMesh>& slip = 
     _fields->get("cumulative slip");
-  buffer.newSection(slip);
-  buffer.allocate();
+  buffer.cloneSection(slip);
   buffer.zero();
 } // _allocateBufferVectorField
 
@@ -1178,8 +1183,7 @@
   topology::Field<topology::SubMesh>& buffer =
     _fields->get("buffer (scalar)");
   const topology::Field<topology::SubMesh>& area = _fields->get("area");
-  buffer.newSection(area);
-  buffer.allocate();
+  buffer.cloneSection(area);
   buffer.zero();
 } // _allocateBufferScalarField
 

Modified: short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/libsrc/faults/LiuCosSlipFn.cc	2009-05-29 05:40:57 UTC (rev 15082)
@@ -101,8 +101,7 @@
 
   _parameters->add("rise time", "rise_time");
   topology::Field<topology::SubMesh>& riseTime = _parameters->get("rise time");
-  riseTime.newSection(slipTime);
-  riseTime.allocate();
+  riseTime.cloneSection(slipTime);
   riseTime.scale(timeScale);
   riseTime.vectorFieldType(topology::FieldBase::SCALAR);
   const ALE::Obj<RealSection>& riseTimeSection = riseTime.section();

Modified: short/3D/PyLith/trunk/libsrc/topology/Field.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/Field.cc	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/libsrc/topology/Field.cc	2009-05-29 05:40:57 UTC (rev 15082)
@@ -181,7 +181,7 @@
     logger.stagePop();
     newSection();
     logger.stagePush("Field");
-  }
+  } // if
   _section->setChart(chart);
 
   const typename chart_type::const_iterator chartEnd = chart.end();
@@ -189,14 +189,8 @@
        c_iter != chartEnd;
        ++c_iter) {
     _section->setFiberDimension(*c_iter, fiberDim);
-  }
-  {
-    std::cout << "  allocating Field " << _label << " section type 2" << std::endl;
-    logger.stagePop();
-    allocate();
-    logger.stagePush("Field");
-    std::cout << "  done allocating Field " << _label << " section type 2" << std::endl;
-  }
+  } // for
+
   std::cout << "Done making Field " << _label << " section type 2" << std::endl;
   logger.stagePop();
 } // newSection
@@ -205,8 +199,8 @@
 // Create section with same layout as another section.
 template<typename mesh_type>
 void
-pylith::topology::Field<mesh_type>::newSection(const Field& src)
-{ // newSection
+pylith::topology::Field<mesh_type>::cloneSection(const Field& src)
+{ // cloneSection
   ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
   std::cout << "Making Field " << _label << " section type 3" << std::endl;
   logger.stagePush("Field");
@@ -233,7 +227,7 @@
     } // if
   } // if
   logger.stagePop();
-} // newSection
+} // cloneSection
 
 // ----------------------------------------------------------------------
 // Clear variables associated with section.

Modified: short/3D/PyLith/trunk/libsrc/topology/Field.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/Field.hh	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/libsrc/topology/Field.hh	2009-05-29 05:40:57 UTC (rev 15082)
@@ -181,7 +181,7 @@
    *
    * @param sec Section defining layout.
    */
-  void newSection(const Field& src);
+  void cloneSection(const Field& src);
 
   /// Clear variables associated with section.
   void clear(void);

Modified: short/3D/PyLith/trunk/libsrc/topology/Fields.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/Fields.icc	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/libsrc/topology/Fields.icc	2009-05-29 05:40:57 UTC (rev 15082)
@@ -173,7 +173,7 @@
   const typename map_type::iterator end = _fields.end();
   for (typename map_type::iterator iter=begin; iter != end; ++iter)
     if (iter != src)
-      iter->second->newSection(*src->second);
+      iter->second->cloneSection(*src->second);
 } // copyLayout
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/modulesrc/topology/Field.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/topology/Field.i	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/modulesrc/topology/Field.i	2009-05-29 05:40:57 UTC (rev 15082)
@@ -153,7 +153,7 @@
        *
        * @param sec Section defining layout.
        */
-      void newSection(const Field& src);
+      void cloneSection(const Field& src);
 
       /// Clear variables associated with section.
       void clear(void);

Modified: short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg	2009-05-29 05:40:57 UTC (rev 15082)
@@ -12,7 +12,7 @@
 #implicit = 1
 #petsc = 1
 #solverlinear = 1
-#meshiocubit = 1
+#meshioascii = 1
 #implicitelasticity = 1
 #quadrature = 1
 #fiatsimplex = 1

Added: short/3D/PyLith/trunk/tests/2d/quad4/axialshear_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/axialshear_soln.py	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/quad4/axialshear_soln.py	2009-05-29 05:40:57 UTC (rev 15082)
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/2d/quad4/axialsheardisp_soln.py
+##
+## @brief Analytical solution to axial/shear displacement problem.
+
+import numpy
+
+# Physical properties
+p_density = 2500.0
+p_vs = 3000.0
+p_vp = 5291.502622129181
+
+p_mu = p_density*p_vs**2
+p_lambda = p_density*p_vp**2 - 2*p_mu
+
+# Uniform stress field
+sxx = 1.0e+6
+sxy = 0.0e+6
+syy = 0.0
+
+# Uniform strain field
+exx = 1.0/(2*p_mu) * (sxx - p_lambda/(3*p_lambda+2*p_mu) * (sxx+syy))
+eyy = 1.0/(2*p_mu) * (syy - p_lambda/(3*p_lambda+2*p_mu) * (sxx+syy))
+exy = 1.0/(2*p_mu) * (sxy)
+      
+# ----------------------------------------------------------------------
+class AnalyticalSoln(object):
+  """
+  Analytical solution to axial/shear displacement problem.
+  """
+
+  def __init__(self):
+    return
+
+
+  def displacement(self, locs):
+    """
+    Compute displacement field at locations.
+    """
+    (npts, dim) = locs.shape
+    disp = numpy.zeros( (npts, 2), dtype=numpy.float64)
+    disp[:,0] = exx*locs[:,0] + exy*locs[:,1]
+    disp[:,1] = eyy*locs[:,1] + exy*locs[:,0]
+    return disp
+
+
+  def strain(self, locs):
+    """
+    Compute strain field at locations.
+    """
+    (npts, dim) = locs.shape
+    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
+    strain[:,0] = exx
+    strain[:,1] = eyy
+    strain[:,2] = exy
+    return
+  
+
+  def stress(self, locs):
+    """
+    Compute stress field at locations.
+    """
+    (npts, dim) = locs.shape
+    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
+    stress[:,0] = self.sxx
+    stress[:,1] = self.syy
+    stress[:,2] = self.sxy
+    return
+
+
+# End of file 

Added: short/3D/PyLith/trunk/tests/2d/quad4/axialsheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/axialsheardisp.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/quad4/axialsheardisp.cfg	2009-05-29 05:40:57 UTC (rev 15082)
@@ -0,0 +1,108 @@
+# -*- Python -*-
+[pylithapp]
+
+[pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE
+command = mpirun -np ${nodes}
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+#timedependent = 1
+#implicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshiocubit = 1
+#implicitelasticity = 1
+#quadrature2d = 1
+#fiatlagrange = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+#debug = 1
+reader = pylith.meshio.MeshIOCubit
+
+[pylithapp.mesh_generator.reader]
+filename = mesh.exo
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+dimension = 2
+bc = [x_neg,x_pos,y_neg,y_pos]
+
+[pylithapp.timedependent.formulation.time_step]
+total_time = 0.0*s
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+materials = [elastic]
+materials.elastic = pylith.materials.ElasticPlaneStrain
+
+[pylithapp.timedependent.materials.elastic]
+label = Elastic material
+id = 1
+properties_db.iohandler.filename = matprops.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.x_pos]
+fixed_dof = [0]
+label = 20
+db = spatialdata.spatialdb.SimpleDB
+db.label = Dirichlet BC +x edge
+db.iohandler.filename = axialshear_disp.spatialdb
+
+[pylithapp.timedependent.bc.x_neg]
+fixed_dof = [0]
+label = 21
+db = spatialdata.spatialdb.SimpleDB
+db.label = Dirichlet BC -x edge
+db.iohandler.filename = axialshear_disp.spatialdb
+
+[pylithapp.timedependent.bc.y_pos]
+fixed_dof = [1]
+label = 22
+db = spatialdata.spatialdb.SimpleDB
+db.label = Dirichlet BC +y edge
+db.iohandler.filename = axialshear_disp.spatialdb
+
+[pylithapp.timedependent.bc.y_neg]
+fixed_dof = [1]
+label = 23
+db = spatialdata.spatialdb.SimpleDB
+db.label = Dirichlet BC -y edge
+db.iohandler.filename = axialshear_disp.spatialdb
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+ksp_rtol = 1.0e-8
+pc_type = asm
+ksp_max_it = 100
+ksp_gmres_restart = 50
+#ksp_monitor = true
+#ksp_view = true
+#log_summary = true
+# start_in_debugger = true
+
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output.writer]
+filename = axialsheardisp.vtk
+
+[pylithapp.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = axialsheardisp-elastic.vtk

Added: short/3D/PyLith/trunk/tests/2d/quad4/axialsheardisp_gendb.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/axialsheardisp_gendb.py	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/quad4/axialsheardisp_gendb.py	2009-05-29 05:40:57 UTC (rev 15082)
@@ -0,0 +1,76 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/2d/quad4/gendb_axialsheardisp.py
+##
+## @brief Python script to generate spatial database with displacement
+## boundary conditions for the axial/shear displacement test.
+
+import numpy
+
+class GenerateDB(object):
+  """
+  Python object to generate spatial database with displacement
+  boundary conditions for the axial/shear displacement test.
+  """
+  
+  def __init__(self):
+    return
+  
+  
+  def run(self):
+    """
+    Generate the database.
+    """
+    # Domain
+    x = numpy.arange(-4000.0, 4000.1, 1000.0)
+    y = numpy.arange(-4000.0, 4000.1, 1000.0)
+    npts = x.shape[0]
+
+    xx = x * numpy.ones( (npts, 1), dtype=numpy.float64)
+    yy = y * numpy.ones( (npts, 1), dtype=numpy.float64)
+    xy = numpy.zeros( (npts**2, 2), dtype=numpy.float64)
+    xy[:,0] = numpy.ravel(xx)
+    xy[:,1] = numpy.ravel(numpy.transpose(yy))
+
+    from axialshear_soln import AnalyticalSoln
+    soln = AnalyticalSoln()
+    disp = soln.displacement(xy)
+
+    from spatialdata.geocoords.CSCart import CSCart
+    cs = CSCart()
+    cs.inventory.spaceDim = 2
+    cs._configure()
+    data = {'locs': xy,
+            'coordsys': cs,
+            'data_dim': 2,
+            'values': [{'name': "dof-0",
+                        'units': "m",
+                        'data': numpy.ravel(disp[:,0])},
+                       {'name': "dof-1",
+                        'units': "m",
+                        'data': numpy.ravel(disp[:,1])}]}
+
+    from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
+    io = SimpleIOAscii()
+    io.inventory.filename = "axialshear_disp.spatialdb"
+    io._configure()
+    io.write(data)
+    return
+
+# ======================================================================
+if __name__ == "__main__":
+  app = GenerateDB()
+  app.run()
+
+
+# End of file 

Modified: short/3D/PyLith/trunk/tests/2d/quad4/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/matprops.spatialdb	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/tests/2d/quad4/matprops.spatialdb	2009-05-29 05:40:57 UTC (rev 15082)
@@ -2,7 +2,7 @@
 SimpleDB {
   num-values = 3
   value-names =  density vs vp
-  value-units =  kg/m^3  m/s  m/s
+  value-units =  kg/m**3  m/s  m/s
   num-locs = 1
   data-dim = 0
   space-dim = 2

Modified: short/3D/PyLith/trunk/tests/2d/quad4/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/testpylith.py	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/tests/2d/quad4/testpylith.py	2009-05-29 05:40:57 UTC (rev 15082)
@@ -20,11 +20,11 @@
   """
   suite = unittest.TestSuite()
 
-  from TestAxialPlaneStrain import TestAxialPlaneStrain
-  suite.addTest(unittest.makeSuite(TestAxialPlaneStrain))
+  from TestAxialShearDisp import TestAxialShearDisp
+  suite.addTest(unittest.makeSuite(TestAxialShearDisp))
 
-  from TestShearPlaneStrain import TestShearPlaneStrain
-  suite.addTest(unittest.makeSuite(TestShearPlaneStrain))
+  from TestAxialShearTract import TestShearShearTract
+  suite.addTest(unittest.makeSuite(TestShearShearTract))
 
   from TestDislocation import TestDislocation
   suite.addTest(unittest.makeSuite(TestDislocation))

Modified: short/3D/PyLith/trunk/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDep.py
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDep.py	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDep.py	2009-05-29 05:40:57 UTC (rev 15082)
@@ -76,7 +76,7 @@
     muA = vsA*vsA*densityA
     lambdaA = vpA*vpA*densityA - 2.0*muA
     maxwellTimeA = viscosityA / muA
-    meanStrainA = (strainA[1] + strainA[2] + strainA[3])/3.0
+    meanStrainA = (strainA[0] + strainA[1] + strainA[2])/3.0
 
     densityB = 2000.0
     vsB = 1200.0
@@ -89,7 +89,7 @@
     muB = vsB*vsB*densityB
     lambdaB = vpB*vpB*densityB - 2.0*muB
     maxwellTimeB = viscosityB / muB
-    meanStrainB = (strainB[1] + strainB[2] + strainB[3])/3.0
+    meanStrainB = (strainB[0] + strainB[1] + strainB[2])/3.0
 
     # TEMPORARY, need to determine how to use initial strain
     initialStrainA = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc	2009-05-29 05:40:57 UTC (rev 15082)
@@ -226,10 +226,10 @@
 } // testNewSectionChart
 
 // ----------------------------------------------------------------------
-// Test newSection(field).
+// Test cloneSection().
 void
-pylith::topology::TestFieldMesh::testNewSectionField(void)
-{ // testNewSectionField
+pylith::topology::TestFieldMesh::testCloneSection(void)
+{ // testCloneSection
   const int fiberDim = 3;
   const int nconstraints[] = { 0, 2, 1, 3 };
   const int constraints[] = {
@@ -272,7 +272,7 @@
   } // Setup source field
 
   Field<Mesh> field(mesh);
-  field.newSection(fieldSrc);
+  field.cloneSection(fieldSrc);
   const ALE::Obj<Mesh::RealSection>& section = field.section();
   CPPUNIT_ASSERT(!section.isNull());
   int iV = 0;
@@ -286,7 +286,7 @@
 
   // Verify vector scatter was also copied.
   CPPUNIT_ASSERT_EQUAL(fieldSrc._scatter, field._scatter);
-} // testNewSectionField
+} // testCloneSection
 
 // ----------------------------------------------------------------------
 // Test clear().
@@ -783,7 +783,7 @@
   CPPUNIT_ASSERT(0 != field._scatter);
 
   Field<Mesh> fieldB(mesh);
-  fieldB.newSection(field);
+  fieldB.cloneSection(field);
   CPPUNIT_ASSERT_EQUAL(fieldB._scatter, field._scatter);
 } // testCreateScatter
 

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.hh	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.hh	2009-05-29 05:40:57 UTC (rev 15082)
@@ -51,7 +51,7 @@
   CPPUNIT_TEST( testNewSectionPoints );
   CPPUNIT_TEST( testNewSectionDomain );
   CPPUNIT_TEST( testNewSectionChart );
-  CPPUNIT_TEST( testNewSectionField );
+  CPPUNIT_TEST( testCloneSection );
   CPPUNIT_TEST( testClear );
   CPPUNIT_TEST( testAllocate );
   CPPUNIT_TEST( testZero );
@@ -107,8 +107,8 @@
   /// Test newSection(chart).
   void testNewSectionChart(void);
 
-  /// Test newSection(field).
-  void testNewSectionField(void);
+  /// Test cloneSection().
+  void testCloneSection(void);
 
   /// Test clear().
   void testClear(void);

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc	2009-05-29 05:40:57 UTC (rev 15082)
@@ -212,10 +212,10 @@
 } // testNewSectionChart
 
 // ----------------------------------------------------------------------
-// Test newSection(field).
+// Test cloneSection().
 void
-pylith::topology::TestFieldSubMesh::testNewSectionField(void)
-{ // testNewSectionField
+pylith::topology::TestFieldSubMesh::testCloneSection(void)
+{ // testCloneSection
   const int fiberDim = 3;
   const int nconstraints[] = { 0, 2, 1, 3 };
   const int constraints[] = {
@@ -261,7 +261,7 @@
 
 
   Field<SubMesh> field(submesh);
-  field.newSection(fieldSrc);
+  field.cloneSection(fieldSrc);
   const ALE::Obj<SubMesh::RealSection>& section = field.section();
   CPPUNIT_ASSERT(!section.isNull());
   int iV = 0;
@@ -272,7 +272,7 @@
     CPPUNIT_ASSERT_EQUAL(nconstraints[iV++], 
 			 section->getConstraintDimension(*v_iter));
   } // for
-} // testNewSectionField
+} // testCloneSection
 
 // ----------------------------------------------------------------------
 // Test clear().

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.hh	2009-05-29 02:26:30 UTC (rev 15081)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.hh	2009-05-29 05:40:57 UTC (rev 15082)
@@ -48,7 +48,7 @@
   CPPUNIT_TEST( testNewSectionPoints );
   CPPUNIT_TEST( testNewSectionDomain );
   CPPUNIT_TEST( testNewSectionChart );
-  CPPUNIT_TEST( testNewSectionField );
+  CPPUNIT_TEST( testCloneSection );
   CPPUNIT_TEST( testClear );
   CPPUNIT_TEST( testAllocate );
   CPPUNIT_TEST( testZero );
@@ -92,8 +92,8 @@
   /// Test newSection(chart).
   void testNewSectionChart(void);
 
-  /// Test newSection(field).
-  void testNewSectionField(void);
+  /// Test cloneSection().
+  void testCloneSection(void);
 
   /// Test clear().
   void testClear(void);



More information about the CIG-COMMITS mailing list