Пример #1
0
void CDPTH::load(ReadContext &ctx) {
	readCells(ctx);

	checkConsistency(ctx);

	drawImage(ctx);
}
Пример #2
0
 void XMLMesh::startElement(const xmlChar *name, const xmlChar **attrs) {
   switch (state) {
   case OUTSIDE:
     if (xmlStrcasecmp(name, (xmlChar *) "mesh") == 0) {
       readMesh(name, attrs);
       state = INSIDE_MESH;
     }
     break;
   case INSIDE_MESH:
     if (xmlStrcasecmp(name, (xmlChar *) "vertices") == 0) {
       readVertices(name, attrs);
       state = INSIDE_VERTICES;
     }
     else if (xmlStrcasecmp(name, (xmlChar *) "cells") == 0) {
       readCells(name, attrs);
       state = INSIDE_CELLS;
     }
     break;
   case INSIDE_VERTICES:
     if (xmlStrcasecmp(name, (xmlChar *) "vertex") == 0)
       readVertex(name, attrs);
     break;
   case INSIDE_CELLS:
     if (xmlStrcasecmp(name, (xmlChar *) "interval") == 0) {
       readInterval(name, attrs);
     } else if (xmlStrcasecmp(name, (xmlChar *) "triangle") == 0) {
       readTriangle(name, attrs);
     } else if (xmlStrcasecmp(name, (xmlChar *) "tetrahedron") == 0) {
       readTetrahedron(name, attrs);
     }
     break;
   default:
     break;
   }
 };
Пример #3
0
// Construct from components
starMesh::starMesh
(
    const fileName& prefix,
    const Time& rt,
    const scalar scaleFactor
)
:
    casePrefix_(prefix),
    runTime_(rt),
    points_(0),
    cellShapes_(0),
    boundary_(0),
    patchTypes_(0),
    defaultFacesName_("defaultFaces"),
    defaultFacesType_(emptyPolyPatch::typeName),
    patchNames_(0),
    patchPhysicalTypes_(0),
    starPointLabelLookup_(0),
    starPointID_(0),
    starCellID_(0),
    starCellLabelLookup_(0),
    starCellPermutation_(0),
    cellFaces_(0),
    boundaryCellIDs_(0),
    boundaryCellFaceIDs_(0),
    meshFaces_(0),
    cellPolys_(0),
    nInternalFaces_(0),
    polyBoundaryPatchStartIndices_(0),
    pointCellsPtr_(NULL),
    couples_(0),
    isShapeMesh_(true)
{
    readPoints(scaleFactor);

    readCells();

    readBoundary();

    fixCollapsedEdges();

    readCouples();

    if (couples_.size())
    {
        createCoupleMatches();
    }

    markBoundaryFaces();

    mergeCoupleFacePoints();

    purgeCellShapes();

    collectBoundaryFaces();
}
Пример #4
0
// Construct from components
sammMesh::sammMesh
(
    const fileName& prefix,
    const Time& rt,
    const scalar scaleFactor
)
:
    casePrefix_(prefix),
    runTime_(rt),
    points_(0),
    cellShapes_(0),
    boundary_(0),
    patchTypes_(0),
    defaultFacesName_("defaultFaces"),
    defaultFacesType_(emptyPolyPatch::typeName),
    patchNames_(0),
    patchPhysicalTypes_(0),
    starPointLabelLookup_(0),
    starCellLabelLookup_(0),
    cellFaces_(0),
    meshFaces_(0),
    cellPolys_(0),
    nInternalFaces_(0),
    polyBoundaryPatchStartIndices_(0),
    pointCellsPtr_(NULL),
    isShapeMesh_(true)
{
    // Fill in the lookup tables
    fillSammCellShapeTable();
    fillSammAddressingTable();

    readPoints(scaleFactor);

    readCells();

    readBoundary();

    fixCollapsedEdges();

    readCouples();

    // create boundary faces
    createBoundaryFaces();

    // after all this is done do couples
}