[cig-commits] r17943 - in short/3D/PyLith/trunk/libsrc: faults meshio topology
knepley at geodynamics.org
knepley at geodynamics.org
Tue Feb 22 14:03:07 PST 2011
Author: knepley
Date: 2011-02-22 14:03:07 -0800 (Tue, 22 Feb 2011)
New Revision: 17943
Modified:
short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh
short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh
short/3D/PyLith/trunk/libsrc/faults/TopologyOps.cc
short/3D/PyLith/trunk/libsrc/faults/TopologyOps.hh
short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.hh
short/3D/PyLith/trunk/libsrc/meshio/UCDFaultFile.cc
short/3D/PyLith/trunk/libsrc/meshio/UCDFaultFile.hh
short/3D/PyLith/trunk/libsrc/topology/MeshOrder.hh
short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.cc
short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.hh
short/3D/PyLith/trunk/libsrc/topology/RefineEdges2.hh
short/3D/PyLith/trunk/libsrc/topology/RefineFace4Edges2.hh
short/3D/PyLith/trunk/libsrc/topology/RefineVol8Face4Edges2.hh
Log:
More corrections for updated Sieve
Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc 2011-02-22 22:03:07 UTC (rev 17943)
@@ -41,7 +41,7 @@
// ----------------------------------------------------------------------
void
pylith::faults::CohesiveTopology::createFault(topology::SubMesh* faultMesh,
- ALE::Obj<ALE::Mesh>& faultBoundary,
+ ALE::Obj<FlexMesh>& faultBoundary,
const topology::Mesh& mesh,
const ALE::Obj<topology::Mesh::IntSection>& groupField,
const bool flipFault)
@@ -66,11 +66,11 @@
const ALE::Obj<SieveSubMesh::sieve_type> ifaultSieve =
new SieveMesh::sieve_type(sieve->comm(), sieve->debug());
assert(!ifaultSieve.isNull());
- ALE::Obj<ALE::Mesh> fault =
- new ALE::Mesh(mesh.comm(), mesh.dimension()-1, mesh.debug());
+ ALE::Obj<FlexMesh> fault =
+ new FlexMesh(mesh.comm(), mesh.dimension()-1, mesh.debug());
assert(!fault.isNull());
- ALE::Obj<ALE::Mesh::sieve_type> faultSieve =
- new ALE::Mesh::sieve_type(sieve->comm(), sieve->debug());
+ ALE::Obj<FlexMesh::sieve_type> faultSieve =
+ new FlexMesh::sieve_type(sieve->comm(), sieve->debug());
assert(!faultSieve.isNull());
const int debug = mesh.debug();
@@ -105,7 +105,7 @@
if (debug)
fault->view("Fault mesh");
- faultBoundary = ALE::Selection<ALE::Mesh>::boundary(fault);
+ faultBoundary = ALE::Selection<FlexMesh>::boundary(fault);
if (debug)
faultBoundary->view("Fault boundary mesh");
@@ -126,7 +126,7 @@
void
pylith::faults::CohesiveTopology::create(topology::Mesh* mesh,
const topology::SubMesh& faultMesh,
- const ALE::Obj<ALE::Mesh>& faultBoundary,
+ const ALE::Obj<FlexMesh>& faultBoundary,
const ALE::Obj<topology::Mesh::IntSection>& groupField,
const int materialId,
int& firstFaultVertex,
@@ -138,8 +138,8 @@
assert(!faultBoundary.isNull());
assert(!groupField.isNull());
- typedef ALE::SieveAlg<ALE::Mesh> sieveAlg;
- typedef ALE::Selection<ALE::Mesh> selection;
+ typedef ALE::SieveAlg<FlexMesh> sieveAlg;
+ typedef ALE::Selection<FlexMesh> selection;
// Memory logging
ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
@@ -424,7 +424,7 @@
// This completes the set of cells scheduled to be replaced
TopologyOps::PointSet replaceCellsBase(replaceCells);
- const ALE::Obj<ALE::Mesh::label_sequence>& faultBdVerts =
+ const ALE::Obj<FlexMesh::label_sequence>& faultBdVerts =
faultBoundary->depthStratum(0);
assert(!faultBdVerts.isNull());
TopologyOps::PointSet faultBdVertices;
@@ -701,11 +701,11 @@
const ALE::Obj<SieveMesh::sieve_type> ifaultSieve =
new SieveMesh::sieve_type(sieve->comm(), sieve->debug());
assert(!ifaultSieve.isNull());
- ALE::Obj<ALE::Mesh> fault =
- new ALE::Mesh(mesh.comm(), mesh.dimension()-1, mesh.debug());
+ ALE::Obj<FlexMesh> fault =
+ new FlexMesh(mesh.comm(), mesh.dimension()-1, mesh.debug());
assert(!fault.isNull());
- ALE::Obj<ALE::Mesh::sieve_type> faultSieve =
- new ALE::Mesh::sieve_type(sieve->comm(), sieve->debug());
+ ALE::Obj<FlexMesh::sieve_type> faultSieve =
+ new FlexMesh::sieve_type(sieve->comm(), sieve->debug());
assert(!faultSieve.isNull());
const ALE::Obj<SieveMesh::label_sequence>& cohesiveCells =
Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh 2011-02-22 22:03:07 UTC (rev 17943)
@@ -37,6 +37,7 @@
private :
typedef pylith::topology::Mesh::SieveMesh::point_type point_type;
+ typedef ALE::Mesh<PetscInt,PetscScalar> FlexMesh;
// PUBLIC METHODS /////////////////////////////////////////////////////
public :
@@ -53,7 +54,7 @@
*/
static
void createFault(topology::SubMesh* faultMesh,
- ALE::Obj<ALE::Mesh>& faultBoundary,
+ ALE::Obj<FlexMesh>& faultBoundary,
const topology::Mesh& mesh,
const ALE::Obj<topology::Mesh::IntSection>& groupField,
const bool flipFault =false);
@@ -75,7 +76,7 @@
static
void create(topology::Mesh* mesh,
const topology::SubMesh& faultMesh,
- const ALE::Obj<ALE::Mesh>& faultBoundary,
+ const ALE::Obj<FlexMesh>& faultBoundary,
const ALE::Obj<topology::Mesh::IntSection>& groupField,
const int materialId,
int& firstFaultVertex,
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc 2011-02-22 22:03:07 UTC (rev 17943)
@@ -120,7 +120,7 @@
assert(std::string("") != label());
topology::SubMesh faultMesh;
- ALE::Obj<ALE::Mesh> faultBoundary;
+ ALE::Obj<FlexMesh> faultBoundary;
// Get group of vertices associated with fault
const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = mesh->sieveMesh();
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh 2011-02-22 22:03:07 UTC (rev 17943)
@@ -38,6 +38,7 @@
public feassemble::Integrator<feassemble::Quadrature<topology::SubMesh> >
{ // class FaultCohesive
friend class TestFaultCohesive; // unit testing
+ typedef ALE::Mesh<PetscInt,PetscScalar> FlexMesh;
// PUBLIC METHODS /////////////////////////////////////////////////////
public :
Modified: short/3D/PyLith/trunk/libsrc/faults/TopologyOps.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/TopologyOps.cc 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/faults/TopologyOps.cc 2011-02-22 22:03:07 UTC (rev 17943)
@@ -129,11 +129,11 @@
const int firstCell,
const PointSet& faultVertices,
const ALE::Obj<SieveMesh>& mesh,
- const ALE::Obj<ALE::Mesh::arrow_section_type>& orientation,
- const ALE::Obj<ALE::Mesh::sieve_type>& faultSieve,
+ const ALE::Obj<FlexMesh::arrow_section_type>& orientation,
+ const ALE::Obj<FlexMesh::sieve_type>& faultSieve,
const bool flipFault)
{
- typedef ALE::Selection<ALE::Mesh> selection;
+ typedef ALE::Selection<FlexMesh> selection;
const ALE::Obj<SieveMesh::sieve_type>& sieve = mesh->getSieve();
const PointSet::const_iterator fvBegin = faultVertices.begin();
const PointSet::const_iterator fvEnd = faultVertices.end();
@@ -141,7 +141,7 @@
int curVertex = 0;
int newElement = curCell + dim*faultVertices.size();
int o = 1;
- ALE::Mesh::point_type f = firstCell;
+ FlexMesh::point_type f = firstCell;
const int debug = mesh->debug();
ALE::Obj<PointSet> face = new PointSet();
int numCorners = 0; // The number of vertices in a mesh cell
@@ -232,26 +232,26 @@
if (2 == dim && 4 == faceSize){
if (debug) std::cout << " Adding hex face " << f << std::endl;
- ALE::SieveBuilder<ALE::Mesh>::buildHexFaces(
+ ALE::SieveBuilder<FlexMesh>::buildHexFaces(
faultSieve, orientation, dim, curElement,
bdVertices, oFaultFaces, f, o);
} else if ((1 == dim && 3 == faceSize) ||
(2 == dim && 9 == faceSize)){
if (debug) std::cout << " Adding quadratic hex face " << f
<< std::endl;
- ALE::SieveBuilder<ALE::Mesh>::buildQuadraticHexFaces(
+ ALE::SieveBuilder<FlexMesh>::buildQuadraticHexFaces(
faultSieve, orientation, dim, curElement,
bdVertices, oFaultFaces, f, o);
} else if ((1 == dim && 3 == faceSize) ||
(2 == dim && 6 == faceSize)){
if (debug) std::cout << " Adding quadratic tri face " << f
<< std::endl;
- ALE::SieveBuilder<ALE::Mesh>::buildQuadraticTetFaces(
+ ALE::SieveBuilder<FlexMesh>::buildQuadraticTetFaces(
faultSieve, orientation, dim, curElement,
bdVertices, oFaultFaces, f, o);
} else {
if (debug) std::cout << " Adding simplicial face " << f << std::endl;
- ALE::SieveBuilder<ALE::Mesh>::buildFaces(
+ ALE::SieveBuilder<FlexMesh>::buildFaces(
faultSieve, orientation, dim, curElement,
bdVertices, oFaultFaces, f, o);
}
@@ -276,10 +276,10 @@
const int faultVertices[],
const int faultCells[],
const ALE::Obj<SieveMesh>& mesh,
- const ALE::Obj<ALE::Mesh::arrow_section_type>& orientation,
- const ALE::Obj<ALE::Mesh::sieve_type>& faultSieve)
+ const ALE::Obj<FlexMesh::arrow_section_type>& orientation,
+ const ALE::Obj<FlexMesh::sieve_type>& faultSieve)
{
- typedef ALE::Selection<ALE::Mesh> selection;
+ typedef ALE::Selection<FlexMesh> selection;
int faceSize = 0; // The number of vertices in a mesh face
int curCell = firstCell;
int curVertex = 0;
@@ -312,10 +312,10 @@
// Create face
if (faceSize != dim+1) {
if (debug) std::cout << " Adding hex face " << f << std::endl;
- ALE::SieveBuilder<ALE::Mesh>::buildHexFaces(faultSieve, orientation, dim, curElement, bdVertices, oFaultFaces, f, o);
+ ALE::SieveBuilder<FlexMesh>::buildHexFaces(faultSieve, orientation, dim, curElement, bdVertices, oFaultFaces, f, o);
} else {
if (debug) std::cout << " Adding simplicial face " << f << std::endl;
- ALE::SieveBuilder<ALE::Mesh>::buildFaces(faultSieve, orientation, dim, curElement, bdVertices, oFaultFaces, f, o);
+ ALE::SieveBuilder<FlexMesh>::buildFaces(faultSieve, orientation, dim, curElement, bdVertices, oFaultFaces, f, o);
}
// Add arrow to cells
faultSieve->addArrow(face, faultCells[face*2+0]);
@@ -327,21 +327,21 @@
void
pylith::faults::TopologyOps::orientFaultSieve(const int dim,
const ALE::Obj<SieveMesh>& mesh,
- const ALE::Obj<ALE::Mesh::arrow_section_type>& orientation,
- const ALE::Obj<ALE::Mesh>& fault)
+ const ALE::Obj<FlexMesh::arrow_section_type>& orientation,
+ const ALE::Obj<FlexMesh>& fault)
{
assert(!mesh.isNull());
assert(!orientation.isNull());
assert(!fault.isNull());
- typedef ALE::Selection<ALE::Mesh> selection;
+ typedef ALE::Selection<FlexMesh> selection;
// Must check the orientation here
- const ALE::Obj<ALE::Mesh::sieve_type>& faultSieve = fault->getSieve();
+ const ALE::Obj<FlexMesh::sieve_type>& faultSieve = fault->getSieve();
assert(!faultSieve.isNull());
const SieveMesh::point_type firstFaultCell =
*fault->heightStratum(1)->begin();
- const ALE::Obj<ALE::Mesh::label_sequence>& fFaces = fault->heightStratum(2);
+ const ALE::Obj<FlexMesh::label_sequence>& fFaces = fault->heightStratum(2);
assert(!fFaces.isNull());
const int numFaultFaces = fFaces->size();
const int faultDepth = fault->depth()-1; // Depth of fault cells
@@ -392,21 +392,21 @@
// Loop over new cells
for(PointSet::iterator c_iter = loopCells->begin(); c_iter != loopCells->end(); ++c_iter) {
// Loop over edges of this cell
- const ALE::Obj<ALE::Mesh::sieve_type::traits::coneSequence>& cone = faultSieve->cone(*c_iter);
- const ALE::Mesh::sieve_type::traits::coneSequence::iterator eBegin = cone->begin();
- const ALE::Mesh::sieve_type::traits::coneSequence::iterator eEnd = cone->end();
+ const ALE::Obj<FlexMesh::sieve_type::traits::coneSequence>& cone = faultSieve->cone(*c_iter);
+ const FlexMesh::sieve_type::traits::coneSequence::iterator eBegin = cone->begin();
+ const FlexMesh::sieve_type::traits::coneSequence::iterator eEnd = cone->end();
- for(ALE::Mesh::sieve_type::traits::coneSequence::iterator e_iter = eBegin; e_iter != eEnd; ++e_iter) {
+ for(FlexMesh::sieve_type::traits::coneSequence::iterator e_iter = eBegin; e_iter != eEnd; ++e_iter) {
if (facesSeen.find(*e_iter) != facesSeen.end()) continue;
facesSeen.insert(*e_iter);
if (debug) std::cout << " Checking orientation of fault face " << *e_iter << std::endl;
- const ALE::Obj<ALE::Mesh::sieve_type::traits::supportSequence>& support = faultSieve->support(*e_iter);
- ALE::Mesh::sieve_type::traits::supportSequence::iterator s_iter = support->begin();
+ const ALE::Obj<FlexMesh::sieve_type::traits::supportSequence>& support = faultSieve->support(*e_iter);
+ FlexMesh::sieve_type::traits::supportSequence::iterator s_iter = support->begin();
// Throw out boundary fault faces
if (support->size() < 2) continue;
- ALE::Mesh::point_type cellA = *s_iter; ++s_iter;
- ALE::Mesh::point_type cellB = *s_iter;
+ FlexMesh::point_type cellA = *s_iter; ++s_iter;
+ FlexMesh::point_type cellB = *s_iter;
bool flippedA = (flippedCells.find(cellA) != flippedCells.end());
bool flippedB = (flippedCells.find(cellB) != flippedCells.end());
bool seenA = (cellsSeen.find(cellA) != cellsSeen.end());
@@ -417,10 +417,10 @@
if (debug) std::cout << " neighboring cells " << cellA << " and " << cellB << std::endl;
// In 1D, just check that vertices match
if (dim == 1) {
- const ALE::Obj<ALE::Mesh::sieve_type::traits::coneSequence>& coneA = faultSieve->cone(cellA);
- ALE::Mesh::sieve_type::traits::coneSequence::iterator iterA = coneA->begin();
- const ALE::Obj<ALE::Mesh::sieve_type::traits::coneSequence>& coneB = faultSieve->cone(cellB);
- ALE::Mesh::sieve_type::traits::coneSequence::iterator iterB = coneB->begin();
+ const ALE::Obj<FlexMesh::sieve_type::traits::coneSequence>& coneA = faultSieve->cone(cellA);
+ FlexMesh::sieve_type::traits::coneSequence::iterator iterA = coneA->begin();
+ const ALE::Obj<FlexMesh::sieve_type::traits::coneSequence>& coneB = faultSieve->cone(cellB);
+ FlexMesh::sieve_type::traits::coneSequence::iterator iterB = coneB->begin();
int posA, posB;
for(posA = 0; posA < 2; ++posA, ++iterA) if (*iterA == *e_iter) break;
@@ -444,9 +444,9 @@
}
} else if (dim == 2) {
// Check orientation
- ALE::MinimalArrow<ALE::Mesh::sieve_type::point_type,ALE::Mesh::sieve_type::point_type> arrowA(*e_iter, cellA);
+ ALE::MinimalArrow<FlexMesh::sieve_type::point_type,FlexMesh::sieve_type::point_type> arrowA(*e_iter, cellA);
const int oA = orientation->restrictPoint(arrowA)[0];
- ALE::MinimalArrow<ALE::Mesh::sieve_type::point_type,ALE::Mesh::sieve_type::point_type> arrowB(*e_iter, cellB);
+ ALE::MinimalArrow<FlexMesh::sieve_type::point_type,FlexMesh::sieve_type::point_type> arrowB(*e_iter, cellB);
const int oB = orientation->restrictPoint(arrowB)[0];
const bool mismatch = (oA == oB);
@@ -484,8 +484,8 @@
for(PointSet::const_iterator f_iter = flippedCells.begin(); f_iter != flippedCells.end(); ++f_iter) {
if (debug) std::cout << " Reversing fault face " << *f_iter << std::endl;
faceVertices.clear();
- const ALE::Obj<ALE::Mesh::sieve_type::traits::coneSequence>& cone = faultSieve->cone(*f_iter);
- for(ALE::Mesh::sieve_type::traits::coneSequence::iterator v_iter = cone->begin(); v_iter != cone->end(); ++v_iter) {
+ const ALE::Obj<FlexMesh::sieve_type::traits::coneSequence>& cone = faultSieve->cone(*f_iter);
+ for(FlexMesh::sieve_type::traits::coneSequence::iterator v_iter = cone->begin(); v_iter != cone->end(); ++v_iter) {
faceVertices.insert(faceVertices.begin(), *v_iter);
}
faultSieve->clearCone(*f_iter);
@@ -497,7 +497,7 @@
if (dim > 1) {
// Here, they are edges, not vertices
for(PointArray::const_iterator e_iter = faceVertices.begin(); e_iter != faceVertices.end(); ++e_iter) {
- ALE::MinimalArrow<ALE::Mesh::sieve_type::point_type,ALE::Mesh::sieve_type::point_type> arrow(*e_iter, *f_iter);
+ ALE::MinimalArrow<FlexMesh::sieve_type::point_type,FlexMesh::sieve_type::point_type> arrow(*e_iter, *f_iter);
int o = orientation->restrictPoint(arrow)[0];
if (debug) std::cout << " Reversing orientation of " << *e_iter <<"-->"<<*f_iter << " from " << o << " to " << -(o+1) << std::endl;
@@ -507,26 +507,26 @@
}
}
flippedCells.clear();
- const ALE::Mesh::label_sequence::iterator fFacesBegin = fFaces->begin();
- const ALE::Mesh::label_sequence::iterator fFacesEnd = fFaces->end();
- for(ALE::Mesh::label_sequence::iterator e_iter = fFacesBegin; e_iter != fFacesEnd; ++e_iter) {
+ const FlexMesh::label_sequence::iterator fFacesBegin = fFaces->begin();
+ const FlexMesh::label_sequence::iterator fFacesEnd = fFaces->end();
+ for(FlexMesh::label_sequence::iterator e_iter = fFacesBegin; e_iter != fFacesEnd; ++e_iter) {
if (debug) std::cout << " Checking orientation of fault face " << *e_iter << std::endl;
// for each face get the support (2 fault cells)
- const ALE::Obj<ALE::Mesh::sieve_type::traits::supportSequence>& support = faultSieve->support(*e_iter);
- ALE::Mesh::sieve_type::traits::supportSequence::iterator s_iter = support->begin();
+ const ALE::Obj<FlexMesh::sieve_type::traits::supportSequence>& support = faultSieve->support(*e_iter);
+ FlexMesh::sieve_type::traits::supportSequence::iterator s_iter = support->begin();
// Throw out boundary fault faces
if (support->size() > 1) {
- ALE::Mesh::point_type cellA = *s_iter; ++s_iter;
- ALE::Mesh::point_type cellB = *s_iter;
+ FlexMesh::point_type cellA = *s_iter; ++s_iter;
+ FlexMesh::point_type cellB = *s_iter;
if (debug) std::cout << " neighboring cells " << cellA << " and " << cellB << std::endl;
// In 1D, just check that vertices match
if (dim == 1) {
- const ALE::Obj<ALE::Mesh::sieve_type::traits::coneSequence>& coneA = faultSieve->cone(cellA);
- ALE::Mesh::sieve_type::traits::coneSequence::iterator iterA = coneA->begin();
- const ALE::Obj<ALE::Mesh::sieve_type::traits::coneSequence>& coneB = faultSieve->cone(cellB);
- ALE::Mesh::sieve_type::traits::coneSequence::iterator iterB = coneB->begin();
+ const ALE::Obj<FlexMesh::sieve_type::traits::coneSequence>& coneA = faultSieve->cone(cellA);
+ FlexMesh::sieve_type::traits::coneSequence::iterator iterA = coneA->begin();
+ const ALE::Obj<FlexMesh::sieve_type::traits::coneSequence>& coneB = faultSieve->cone(cellB);
+ FlexMesh::sieve_type::traits::coneSequence::iterator iterB = coneB->begin();
int posA, posB;
for(posA = 0; posA < 2; ++posA, ++iterA) if (*iterA == *e_iter) break;
@@ -540,9 +540,9 @@
}
} else {
// Check orientation
- ALE::MinimalArrow<ALE::Mesh::sieve_type::point_type,ALE::Mesh::sieve_type::point_type> arrowA(*e_iter, cellA);
+ ALE::MinimalArrow<FlexMesh::sieve_type::point_type,FlexMesh::sieve_type::point_type> arrowA(*e_iter, cellA);
const int oA = orientation->restrictPoint(arrowA)[0];
- ALE::MinimalArrow<ALE::Mesh::sieve_type::point_type,ALE::Mesh::sieve_type::point_type> arrowB(*e_iter, cellB);
+ ALE::MinimalArrow<FlexMesh::sieve_type::point_type,FlexMesh::sieve_type::point_type> arrowB(*e_iter, cellB);
const int oB = orientation->restrictPoint(arrowB)[0];
if (oA == oB) {
Modified: short/3D/PyLith/trunk/libsrc/faults/TopologyOps.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/TopologyOps.hh 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/faults/TopologyOps.hh 2011-02-22 22:03:07 UTC (rev 17943)
@@ -41,6 +41,7 @@
typedef std::vector<SieveMesh::sieve_type::point_type> PointArray;
typedef std::pair<SieveMesh::sieve_type::point_type, int> oPoint_type;
typedef std::vector<oPoint_type> oPointArray;
+ typedef ALE::Mesh<PetscInt,PetscScalar> FlexMesh;
// PUBLIC METHODS /////////////////////////////////////////////////////
public :
@@ -79,8 +80,8 @@
const int firstCell,
const PointSet& faultVertices,
const ALE::Obj<SieveMesh>& mesh,
- const ALE::Obj<ALE::Mesh::arrow_section_type>& orientation,
- const ALE::Obj<ALE::Mesh::sieve_type>& faultSieve,
+ const ALE::Obj<FlexMesh::arrow_section_type>& orientation,
+ const ALE::Obj<FlexMesh::sieve_type>& faultSieve,
const bool flipFault);
static
@@ -90,14 +91,14 @@
const int faultVertices[],
const int faultCells[],
const ALE::Obj<SieveMesh>& mesh,
- const ALE::Obj<ALE::Mesh::arrow_section_type>& orientation,
- const ALE::Obj<ALE::Mesh::sieve_type>& faultSieve);
+ const ALE::Obj<FlexMesh::arrow_section_type>& orientation,
+ const ALE::Obj<FlexMesh::sieve_type>& faultSieve);
static
void orientFaultSieve(const int dim,
const ALE::Obj<SieveMesh>& mesh,
- const ALE::Obj<ALE::Mesh::arrow_section_type>& orientation,
- const ALE::Obj<ALE::Mesh>& fault);
+ const ALE::Obj<FlexMesh::arrow_section_type>& orientation,
+ const ALE::Obj<FlexMesh>& fault);
}; // class CohesiveTopology
#endif // pylith_faults_cohesivetopology_hh
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.cc 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.cc 2011-02-22 22:03:07 UTC (rev 17943)
@@ -118,16 +118,16 @@
sieve->symmetrize();
} else {
// Same old thing
- ALE::Obj<ALE::Mesh::sieve_type> s =
- new ALE::Mesh::sieve_type(sieve->comm(), sieve->debug());
+ ALE::Obj<FlexMesh::sieve_type> s =
+ new FlexMesh::sieve_type(sieve->comm(), sieve->debug());
- ALE::SieveBuilder<ALE::Mesh>::buildTopology(s, meshDim,
+ ALE::SieveBuilder<FlexMesh>::buildTopology(s, meshDim,
numCells,
const_cast<int*>(&cells[0]),
numVertices,
interpolate,
numCorners);
- std::map<ALE::Mesh::point_type,ALE::Mesh::point_type> renumbering;
+ std::map<FlexMesh::point_type,FlexMesh::point_type> renumbering;
ALE::ISieveConverter::convertSieve(*s, *sieve, renumbering);
} // if/else
logger.stagePop();
@@ -192,7 +192,7 @@
// Set vertices and cells for fault mesh.
void
pylith::meshio::MeshBuilder::buildFaultMesh(const ALE::Obj<SieveMesh>& fault,
- ALE::Obj<ALE::Mesh>& faultBd,
+ ALE::Obj<FlexMesh>& faultBd,
const double_array& coordinates,
const int numVertices,
const int spaceDim,
@@ -223,10 +223,10 @@
if (0 == rank) {
assert(coordinates.size() == numVertices*spaceDim);
assert(cells.size() == numCells*numCorners);
- ALE::Obj<ALE::Mesh::sieve_type> s =
- new ALE::Mesh::sieve_type(sieve->comm(), sieve->debug());
+ ALE::Obj<FlexMesh::sieve_type> s =
+ new FlexMesh::sieve_type(sieve->comm(), sieve->debug());
- ALE::SieveBuilder<ALE::Mesh>::buildTopology(s, meshDim,
+ ALE::SieveBuilder<FlexMesh>::buildTopology(s, meshDim,
numCells,
const_cast<int*>(&cells[0]),
numVertices,
@@ -242,23 +242,23 @@
s->addArrow(c+firstCell, faceCells[c*2+1]);
} // for
- ALE::Mesh::renumbering_type& renumbering = fault->getRenumbering();
+ FlexMesh::renumbering_type& renumbering = fault->getRenumbering();
ALE::ISieveConverter::convertSieve(*s, *sieve, renumbering, false);
ALE::ISieveConverter::convertOrientation(*s, *sieve, renumbering,
fault->getArrowSection("orientation").ptr());
- Obj<ALE::Mesh> tmpMesh =
- new ALE::Mesh(fault->comm(), dim, fault->debug());
- faultBd = ALE::Selection<ALE::Mesh>::boundary(tmpMesh);
+ Obj<FlexMesh> tmpMesh =
+ new FlexMesh(fault->comm(), dim, fault->debug());
+ faultBd = ALE::Selection<FlexMesh>::boundary(tmpMesh);
logger.stagePop();
logger.stagePush("FaultStratification");
fault->stratify();
logger.stagePop();
} else {
- Obj<ALE::Mesh> tmpMesh =
- new ALE::Mesh(fault->comm(), dim, fault->debug());
- faultBd = ALE::Selection<ALE::Mesh>::boundary(tmpMesh);
+ Obj<FlexMesh> tmpMesh =
+ new FlexMesh(fault->comm(), dim, fault->debug());
+ faultBd = ALE::Selection<FlexMesh>::boundary(tmpMesh);
logger.stagePop();
logger.stagePush("FaultStratification");
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.hh 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshBuilder.hh 2011-02-22 22:03:07 UTC (rev 17943)
@@ -40,6 +40,10 @@
class pylith::meshio::MeshBuilder
{ // MeshBuilder
+ // PUBLIC TYPEDEFS ////////////////////////////////////////////////////
+public :
+ typedef ALE::Mesh<PetscInt,PetscScalar> FlexMesh;
+
// PUBLIC MEMBERS ///////////////////////////////////////////////////////
public :
@@ -88,7 +92,7 @@
*/
static
void buildFaultMesh(const ALE::Obj<topology::Mesh::SieveMesh>& fault,
- ALE::Obj<ALE::Mesh>& faultBd,
+ ALE::Obj<FlexMesh>& faultBd,
const double_array& coordinates,
const int numVertices,
const int spaceDim,
Modified: short/3D/PyLith/trunk/libsrc/meshio/UCDFaultFile.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/UCDFaultFile.cc 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/meshio/UCDFaultFile.cc 2011-02-22 22:03:07 UTC (rev 17943)
@@ -63,7 +63,7 @@
void
pylith::meshio::UCDFaultFile::read(const char* filename,
topology::SubMesh* faultMesh,
- ALE::Obj<ALE::Mesh>& faultBoundary,
+ ALE::Obj<FlexMesh>& faultBoundary,
const topology::Mesh& mesh)
{ // read
assert(0 != faultMesh);
Modified: short/3D/PyLith/trunk/libsrc/meshio/UCDFaultFile.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/UCDFaultFile.hh 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/meshio/UCDFaultFile.hh 2011-02-22 22:03:07 UTC (rev 17943)
@@ -44,6 +44,7 @@
class pylith::meshio::UCDFaultFile
{ // UCDFaultFile
friend class TestUCDFaultFile; // unit testing
+ typedef ALE::Mesh<PetscInt,PetscScalar> FlexMesh;
// PUBLIC METHODS ///////////////////////////////////////////////////////
public :
@@ -70,7 +71,7 @@
static
void read(const char* filename,
topology::SubMesh* faultMesh,
- ALE::Obj<ALE::Mesh>& faultBoundary,
+ ALE::Obj<FlexMesh>& faultBoundary,
const topology::Mesh& mesh);
}; // UCDFaultFile
Modified: short/3D/PyLith/trunk/libsrc/topology/MeshOrder.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/MeshOrder.hh 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/topology/MeshOrder.hh 2011-02-22 22:03:07 UTC (rev 17943)
@@ -37,7 +37,7 @@
class ALE::MeshOrder
{ // MeshOrder
typedef int point_type;
- typedef ALE::IMesh<> mesh_type;
+ typedef ALE::IMesh<PetscInt,PetscScalar> mesh_type;
// PUBLIC MEMBERS ///////////////////////////////////////////////////////
public :
Modified: short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.cc 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.cc 2011-02-22 22:03:07 UTC (rev 17943)
@@ -425,7 +425,7 @@
_createLabels(newMesh, mesh, refiner);
// Create sensored depth
- const ALE::Obj<Mesh::label_type>& censoredLabel = newMesh->createLabel("censored depth");
+ const ALE::Obj<FlexMesh::label_type>& censoredLabel = newMesh->createLabel("censored depth");
assert(!censoredLabel.isNull());
mesh_type::DepthVisitor depthVisitor(*newSieve, _orderNewMesh->verticesCensored().min(), *censoredLabel);
Modified: short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.hh 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/topology/MeshRefiner.hh 2011-02-22 22:03:07 UTC (rev 17943)
@@ -33,8 +33,9 @@
template<typename cellrefiner_type>
class ALE::MeshRefiner
{ // MeshRefiner
- typedef IMesh<> mesh_type;
+ typedef IMesh<PetscInt,PetscScalar> mesh_type;
typedef mesh_type::point_type point_type;
+ typedef ALE::Mesh<PetscInt,PetscScalar> FlexMesh;
// PUBLIC MEMBERS ///////////////////////////////////////////////////////
public :
Modified: short/3D/PyLith/trunk/libsrc/topology/RefineEdges2.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/RefineEdges2.hh 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/topology/RefineEdges2.hh 2011-02-22 22:03:07 UTC (rev 17943)
@@ -37,7 +37,7 @@
{ // RefineEdges2
protected:
- typedef IMesh<> mesh_type;
+ typedef ALE::IMesh<PetscInt,PetscScalar> mesh_type;
typedef mesh_type::point_type point_type;
// PUBLIC MEMBERS ///////////////////////////////////////////////////////
Modified: short/3D/PyLith/trunk/libsrc/topology/RefineFace4Edges2.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/RefineFace4Edges2.hh 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/topology/RefineFace4Edges2.hh 2011-02-22 22:03:07 UTC (rev 17943)
@@ -37,7 +37,7 @@
{ // RefineFace4Edges2
protected:
- typedef IMesh<> mesh_type;
+ typedef IMesh<PetscInt,PetscScalar> mesh_type;
typedef mesh_type::point_type point_type;
// PUBLIC MEMBERS ///////////////////////////////////////////////////////
Modified: short/3D/PyLith/trunk/libsrc/topology/RefineVol8Face4Edges2.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/RefineVol8Face4Edges2.hh 2011-02-22 20:47:56 UTC (rev 17942)
+++ short/3D/PyLith/trunk/libsrc/topology/RefineVol8Face4Edges2.hh 2011-02-22 22:03:07 UTC (rev 17943)
@@ -38,7 +38,7 @@
{ // RefineVol8Face4Edges2
protected:
- typedef IMesh<> mesh_type;
+ typedef IMesh<PetscInt,PetscScalar> mesh_type;
typedef mesh_type::point_type point_type;
// PUBLIC MEMBERS ///////////////////////////////////////////////////////
More information about the CIG-COMMITS
mailing list