[cig-commits] r17951 - in short/3D/PyLith/branches/v1.5-stable/libsrc: faults topology utils
brad at geodynamics.org
brad at geodynamics.org
Tue Feb 22 19:36:45 PST 2011
Author: brad
Date: 2011-02-22 19:36:45 -0800 (Tue, 22 Feb 2011)
New Revision: 17951
Modified:
short/3D/PyLith/branches/v1.5-stable/libsrc/faults/CohesiveTopology.cc
short/3D/PyLith/branches/v1.5-stable/libsrc/faults/FaultCohesiveDyn.cc
short/3D/PyLith/branches/v1.5-stable/libsrc/faults/FaultCohesiveLagrange.cc
short/3D/PyLith/branches/v1.5-stable/libsrc/topology/Mesh.hh
short/3D/PyLith/branches/v1.5-stable/libsrc/utils/sievefwd.hh
short/3D/PyLith/branches/v1.5-stable/libsrc/utils/sievetypes.hh
Log:
Updated sieve typedefs and propagated changes to lib.
Modified: short/3D/PyLith/branches/v1.5-stable/libsrc/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/libsrc/faults/CohesiveTopology.cc 2011-02-23 03:21:12 UTC (rev 17950)
+++ short/3D/PyLith/branches/v1.5-stable/libsrc/faults/CohesiveTopology.cc 2011-02-23 03:36:45 UTC (rev 17951)
@@ -260,7 +260,7 @@
assert(!faces.isNull());
const SieveSubMesh::label_sequence::const_iterator facesBegin = faces->begin();
const SieveSubMesh::label_sequence::const_iterator facesEnd = faces->end();
- const ALE::Obj<Mesh::label_type>& material =
+ const ALE::Obj<SieveFlexMesh::label_type>& material =
sieveMesh->getLabel("material-id");
assert(!material.isNull());
const int firstCohesiveCell = firstFaultCell;
@@ -269,7 +269,7 @@
TopologyOps::PointSet replaceVertices;
ALE::ISieveVisitor::PointRetriever<SieveMesh::sieve_type> sV2(std::max(1, ifaultSieve->getMaxSupportSize()));
ALE::ISieveVisitor::NConeRetriever<SieveMesh::sieve_type> cV2(*ifaultSieve, (size_t) pow(std::max(1, ifaultSieve->getMaxConeSize()), faultSieveMesh->depth()));
- std::set<Mesh::point_type> faceSet;
+ std::set<SieveFlexMesh::point_type> faceSet;
for(SieveSubMesh::label_sequence::iterator f_iter = facesBegin;
f_iter != facesEnd;
@@ -303,7 +303,7 @@
std::cout << " firstCohesiveCell " << firstCohesiveCell << " firstFaultCell "
<< firstFaultCell << " numFaces " << faces->size() << std::endl;
std::cout << " faceSet:" << std::endl;
- for(std::set<Mesh::point_type>::const_iterator p_iter = faceSet.begin();
+ for(std::set<SieveFlexMesh::point_type>::const_iterator p_iter = faceSet.begin();
p_iter != faceSet.end();
++p_iter) {
std::cout << " " << *p_iter << std::endl;
@@ -571,7 +571,7 @@
} // if/else
} // if/else
} // for
- ReplaceVisitor<SieveMesh::sieve_type,std::map<Mesh::point_type,Mesh::point_type> > rVc(vertexRenumber, std::max(1, sieve->getMaxConeSize()), debug);
+ ReplaceVisitor<SieveMesh::sieve_type,std::map<SieveMesh::point_type,SieveMesh::point_type> > rVc(vertexRenumber, std::max(1, sieve->getMaxConeSize()), debug);
rCellsEnd = replaceCells.end();
for (TopologyOps::PointSet::const_iterator c_iter = replaceCells.begin();
@@ -585,7 +585,7 @@
} // if
rVc.clear();
} // for
- ReplaceVisitor<SieveMesh::sieve_type,std::map<Mesh::point_type,Mesh::point_type> > rVs(cellRenumber, std::max(1, sieve->getMaxSupportSize()), debug);
+ ReplaceVisitor<SieveMesh::sieve_type,std::map<SieveMesh::point_type,SieveMesh::point_type> > rVs(cellRenumber, std::max(1, sieve->getMaxSupportSize()), debug);
rVerticesEnd = replaceVertices.end();
for (TopologyOps::PointSet::const_iterator v_iter = replaceVertices.begin();
@@ -614,13 +614,13 @@
const std::string labelName("censored depth");
if (!sieveMesh->hasLabel(labelName)) {
- const ALE::Obj<Mesh::label_type>& label = sieveMesh->createLabel(labelName);
+ const ALE::Obj<SieveMesh::label_type>& label = sieveMesh->createLabel(labelName);
assert(!label.isNull());
TopologyOps::computeCensoredDepth(label, sieveMesh->getSieve(), firstFaultVertex);
} else {
// Insert new shadow vertices into existing label
- const ALE::Obj<Mesh::label_type>& label = sieveMesh->getLabel(labelName);
+ const ALE::Obj<SieveMesh::label_type>& label = sieveMesh->getLabel(labelName);
assert(!label.isNull());
const std::map<int,int>::const_iterator vRenumberEnd = vertexRenumber.end();
@@ -704,8 +704,8 @@
ALE::Obj<FlexMesh> fault =
new FlexMesh(mesh.comm(), mesh.dimension()-1, mesh.debug());
assert(!fault.isNull());
- ALE::Obj<FlexMesh::sieve_type> faultSieve =
- new FlexMesh::sieve_type(sieve->comm(), sieve->debug());
+ ALE::Obj<SieveFlexMesh::sieve_type> faultSieve =
+ new SieveFlexMesh::sieve_type(sieve->comm(), sieve->debug());
assert(!faultSieve.isNull());
const ALE::Obj<SieveMesh::label_sequence>& cohesiveCells =
@@ -732,7 +732,7 @@
++c_iter) {
sieve->cone(*c_iter, cV);
const int coneSize = cV.getSize();
- const Mesh::point_type *cone = cV.getPoints();
+ const SieveMesh::point_type *cone = cV.getPoints();
int color = 0;
if (!constraintCell) {
Modified: short/3D/PyLith/branches/v1.5-stable/libsrc/faults/FaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/libsrc/faults/FaultCohesiveDyn.cc 2011-02-23 03:21:12 UTC (rev 17950)
+++ short/3D/PyLith/branches/v1.5-stable/libsrc/faults/FaultCohesiveDyn.cc 2011-02-23 03:36:45 UTC (rev 17951)
@@ -1673,7 +1673,7 @@
*c_iter, ncV);
const int coneSize = ncV.getSize();
assert(coneSize == 3*numBasis);
- const Mesh::point_type *cohesiveCone = ncV.getPoints();
+ const SieveMesh::point_type *cohesiveCone = ncV.getPoints();
assert(0 != cohesiveCone);
const SieveMesh::point_type c_fault = _cohesiveToFault[*c_iter];
Modified: short/3D/PyLith/branches/v1.5-stable/libsrc/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/libsrc/faults/FaultCohesiveLagrange.cc 2011-02-23 03:21:12 UTC (rev 17950)
+++ short/3D/PyLith/branches/v1.5-stable/libsrc/faults/FaultCohesiveLagrange.cc 2011-02-23 03:36:45 UTC (rev 17951)
@@ -1444,7 +1444,7 @@
assert(!faultCells.isNull());
SieveSubMesh::label_sequence::iterator f_iter = faultCells->begin();
- SubMesh::renumbering_type& renumbering = faultSieveMesh->getRenumbering();
+ SieveSubMesh::renumbering_type& renumbering = faultSieveMesh->getRenumbering();
const SieveSubMesh::renumbering_type::const_iterator renumberingEnd =
renumbering.end();
const ALE::Obj<SieveSubMesh::label_sequence>& vertices =
@@ -1472,7 +1472,7 @@
ALE::ISieveTraversal<SieveMesh::sieve_type>::orientedClosure(*sieve, *c_iter, ncV);
const int coneSize = ncV.getSize();
assert(coneSize == numCorners);
- const Mesh::point_type *cone = ncV.getPoints();
+ const SieveMesh::point_type *cone = ncV.getPoints();
assert(0 != cone);
for (int iConstraint = 0; iConstraint < numConstraintVert; ++iConstraint) {
@@ -1632,7 +1632,7 @@
ALE::ISieveTraversal<SieveSubMesh::sieve_type>::orientedClosure(*sieve,
*c_iter, ncV);
const int coneSize = ncV.getSize();
- const Mesh::point_type *cone = ncV.getPoints();
+ const SieveSubMesh::point_type *cone = ncV.getPoints();
for (int v = 0; v < coneSize; ++v) {
// Compute Jacobian and determinant of Jacobian at vertex
Modified: short/3D/PyLith/branches/v1.5-stable/libsrc/topology/Mesh.hh
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/libsrc/topology/Mesh.hh 2011-02-23 03:21:12 UTC (rev 17950)
+++ short/3D/PyLith/branches/v1.5-stable/libsrc/topology/Mesh.hh 2011-02-23 03:36:45 UTC (rev 17951)
@@ -30,7 +30,7 @@
#include "spatialdata/geocoords/geocoordsfwd.hh" // forward declarations
#include "spatialdata/units/unitsfwd.hh" // forward declarations
-#include <petscmesh.hh> // HASA ALE::IMesh
+#include "pylith/utils/sievetypes.hh" // HASA pylith::SieveMesh
// Mesh -----------------------------------------------------------------
/** @brief PyLith finite-element mesh.
@@ -56,10 +56,11 @@
* (1) SieveSubMesh - SubMesh object
*/
//@{
- typedef ALE::IMesh<> SieveMesh;
+ typedef pylith::SieveMesh SieveMesh;
+ typedef pylith::SieveSubMesh SieveSubMesh;
+
typedef SieveMesh::real_section_type RealSection;
typedef SieveMesh::int_section_type IntSection;
- typedef ALE::IMesh<ALE::LabelSifter<int, SieveMesh::point_type> > SieveSubMesh;
typedef ALE::ISieveVisitor::RestrictVisitor<RealSection> RestrictVisitor;
typedef ALE::ISieveVisitor::UpdateAddVisitor<RealSection> UpdateAddVisitor;
typedef ALE::ISieveVisitor::UpdateAllVisitor<RealSection> UpdateAllVisitor;
Modified: short/3D/PyLith/branches/v1.5-stable/libsrc/utils/sievefwd.hh
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/libsrc/utils/sievefwd.hh 2011-02-23 03:21:12 UTC (rev 17950)
+++ short/3D/PyLith/branches/v1.5-stable/libsrc/utils/sievefwd.hh 2011-02-23 03:36:45 UTC (rev 17951)
@@ -30,7 +30,7 @@
namespace ALE {
/// PETSc mesh
- class Mesh;
+ template class Mesh<PetscInt,PetscScalar>;
} // ALE
#endif // pylith_utils_sievefwd_hh
Modified: short/3D/PyLith/branches/v1.5-stable/libsrc/utils/sievetypes.hh
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/libsrc/utils/sievetypes.hh 2011-02-23 03:21:12 UTC (rev 17950)
+++ short/3D/PyLith/branches/v1.5-stable/libsrc/utils/sievetypes.hh 2011-02-23 03:36:45 UTC (rev 17951)
@@ -29,23 +29,14 @@
namespace pylith {
-#if 1
- /// Sieve mesh.
- typedef ALE::IMesh<PetscInt,PetscScalar> Mesh;
-
- /// Sieve submesh.
- typedef ALE::IMesh<PetscInt,PetscScalar,ALE::LabelSifter<int, Mesh::point_type> > SubMesh;
-
-#else
/// Sieve mesh (default, fast access with set sizes).
typedef ALE::IMesh<PetscInt,PetscScalar> SieveMesh;
/// Sieve mesh (flexible, slower access without set sizes).
- typedef ALE::FlexMesh<PetscInt,PetscScalar> SieveFlexMesh;
+ typedef ALE::Mesh<PetscInt,PetscScalar> SieveFlexMesh;
/// Sieve submesh.
- typedef ALE::IMesh<PetscInt,PetscScalar,ALE::LabelSifter<int, Mesh::point_type> > SieveSubMesh;
-#endif
+ typedef ALE::IMesh<PetscInt,PetscScalar,ALE::LabelSifter<int, SieveMesh::point_type> > SieveSubMesh;
} // pylith
More information about the CIG-COMMITS
mailing list