[cig-commits] r22018 - short/3D/PyLith/trunk/unittests/libtests/topology

knepley at geodynamics.org knepley at geodynamics.org
Thu May 9 16:08:25 PDT 2013


Author: knepley
Date: 2013-05-09 16:08:25 -0700 (Thu, 09 May 2013)
New Revision: 22018

Modified:
   short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc
   short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc
Log:
Fix coordinate creation in tests

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc	2013-05-09 21:40:08 UTC (rev 22017)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldMesh.cc	2013-05-09 23:08:25 UTC (rev 22018)
@@ -1458,6 +1458,8 @@
   PetscInt coordSize;
 
   err = DMPlexGetCoordinateSection(dmMesh, &coordSection);PYLITH_CHECK_ERROR(err);
+  err = PetscSectionSetNumFields(coordSection, 1);PYLITH_CHECK_ERROR(err);
+  err = PetscSectionSetFieldComponents(coordSection, 0, spaceDim);PYLITH_CHECK_ERROR(err);
   err = PetscSectionSetChart(coordSection, ncells, ncells+nvertices);PYLITH_CHECK_ERROR(err);
   for(PetscInt v = ncells; v < ncells+nvertices; ++v) {
     err = PetscSectionSetDof(coordSection, v, spaceDim);PYLITH_CHECK_ERROR(err);

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc	2013-05-09 21:40:08 UTC (rev 22017)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestFieldSubMesh.cc	2013-05-09 23:08:25 UTC (rev 22018)
@@ -1030,6 +1030,8 @@
   PetscScalar *coords = NULL;
   PetscInt coordSize = 0;
   err = DMPlexGetCoordinateSection(dmMesh, &coordSection);PYLITH_CHECK_ERROR(err);
+  err = PetscSectionSetNumFields(coordSection, 1);PYLITH_CHECK_ERROR(err);
+  err = PetscSectionSetFieldComponents(coordSection, 0, spaceDim);PYLITH_CHECK_ERROR(err);
   err = PetscSectionSetChart(coordSection, ncells, ncells+nvertices);PYLITH_CHECK_ERROR(err);
   for(PetscInt v = ncells; v < ncells+nvertices; ++v) {
     err = PetscSectionSetDof(coordSection, v, spaceDim);PYLITH_CHECK_ERROR(err);

Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc	2013-05-09 21:40:08 UTC (rev 22017)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestSubMesh.cc	2013-05-09 23:08:25 UTC (rev 22018)
@@ -341,6 +341,8 @@
   PetscInt coordSize = 0;
 
   err = DMPlexGetCoordinateSection(dmMesh, &coordSection);PYLITH_CHECK_ERROR(err);
+  err = PetscSectionSetNumFields(coordSection, 1);PYLITH_CHECK_ERROR(err);
+  err = PetscSectionSetFieldComponents(coordSection, 0, spaceDim);PYLITH_CHECK_ERROR(err);
   err = PetscSectionSetChart(coordSection, ncells, ncells+nvertices);PYLITH_CHECK_ERROR(err);
   for(PetscInt v = ncells; v < ncells+nvertices; ++v) {
     err = PetscSectionSetDof(coordSection, v, spaceDim);PYLITH_CHECK_ERROR(err);



More information about the CIG-COMMITS mailing list