From 7284b8dc8b692554fdfccaaa111c4b7b78ffbc77 Mon Sep 17 00:00:00 2001 From: abuhsing Date: Tue, 5 Nov 2013 08:29:15 +0000 Subject: [PATCH] Hexa 7 livraison 1 salome_adm/unix/SALOMEconfig.h.in src/HEXABLOCK/HexDocument.cxx src/HEXABLOCK/HexDocument.hxx src/HEXABLOCK/HexDocument_trans.cxx src/HEXABLOCK/HexDocument_v6.cxx src/HEXABLOCK/HexElements.cxx src/HEXABLOCK/HexElements.hxx src/HEXABLOCK/HexElements_ter.cxx src/HEXABLOCK/HexHexa.cxx src/HEXABLOCK/HexQuad.cxx src/HEXABLOCK/hexa_base.hxx src/HEXABLOCK/test_hexa1.cxx src/HEXABLOCK/test_hexa5.cxx src/HEXABLOCK/test_hexa6.cxx src/HEXABLOCK/test_quads.cxx src/HEXABLOCK_SWIG/hexablock.py src/HEXABLOCK_SWIG/hexablock_swig.i src/HEXABLOCK_SWIG/hexablock_swig.py src/HEXABLOCK_SWIG/hexablock_swig_wrap.cc --- salome_adm/unix/SALOMEconfig.h.in | 2 +- src/HEXABLOCK/HexDocument.cxx | 4 +- src/HEXABLOCK/HexDocument.hxx | 76 +- src/HEXABLOCK/HexDocument_trans.cxx | 1 - src/HEXABLOCK/HexDocument_v6.cxx | 7 +- src/HEXABLOCK/HexElements.cxx | 11 - src/HEXABLOCK/HexElements.hxx | 40 - src/HEXABLOCK/HexElements_ter.cxx | 46 - src/HEXABLOCK/HexHexa.cxx | 32 + src/HEXABLOCK/HexQuad.cxx | 49 +- src/HEXABLOCK/hexa_base.hxx | 3 - src/HEXABLOCK/test_hexa1.cxx | 830 +---- src/HEXABLOCK/test_hexa5.cxx | 43 +- src/HEXABLOCK/test_hexa6.cxx | 19 +- src/HEXABLOCK/test_quads.cxx | 210 +- src/HEXABLOCK_SWIG/hexablock.py | 9 +- src/HEXABLOCK_SWIG/hexablock_swig.i | 2 - src/HEXABLOCK_SWIG/hexablock_swig.py | 43 +- src/HEXABLOCK_SWIG/hexablock_swig_wrap.cc | 3632 +++++++-------------- 19 files changed, 1342 insertions(+), 3717 deletions(-) diff --git a/salome_adm/unix/SALOMEconfig.h.in b/salome_adm/unix/SALOMEconfig.h.in index 8db6100..5df9104 100755 --- a/salome_adm/unix/SALOMEconfig.h.in +++ b/salome_adm/unix/SALOMEconfig.h.in @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/HEXABLOCK/HexDocument.cxx b/src/HEXABLOCK/HexDocument.cxx index 5a1e00c..59a203f 100755 --- a/src/HEXABLOCK/HexDocument.cxx +++ b/src/HEXABLOCK/HexDocument.cxx @@ -29,7 +29,6 @@ #include "HexHexa.hxx" #include "HexElements.hxx" -#include "HexCrossElements.hxx" #include "HexVector.hxx" #include "HexMatrix.hxx" @@ -1121,8 +1120,7 @@ char* Document::makeVarName (char* name) // ======================================================== isEmpty bool Document::isEmpty () { - int nombre = countVertex () + countVector () - + countCylinder() + countPipe(); + int nombre = countVertex () + countVector (); return nombre <= 0 && countLaw () <= 1; } // ======================================================== getNextName diff --git a/src/HEXABLOCK/HexDocument.hxx b/src/HEXABLOCK/HexDocument.hxx index 3f569de..991de22 100755 --- a/src/HEXABLOCK/HexDocument.hxx +++ b/src/HEXABLOCK/HexDocument.hxx @@ -102,7 +102,6 @@ public : int performSymmetryPlane (Elements* elts, Vertex* ver, Vector* vec); // ----------------- Modifications - Elements* cut (Edge* edge, int nbcuts); Elements* disconnectQuad (Hexa* maille, Quad* face); Elements* disconnectEdge (Hexa* maille, Edge* arete); Elements* disconnectVertex (Hexa* maille, Vertex* noeud); @@ -141,9 +140,6 @@ public : int countUsedEdge (); int countUsedVertex (); - int countCylinder () { return doc_cylinder.size(); } - int countPipe () { return doc_pipe.size(); } - // ----------------- get par indice Hexa* getHexa (int nro); Quad* getQuad (int nro); @@ -156,8 +152,6 @@ public : Vertex* getUsedVertex (int nro); Vector* getVector (int nro); - Cylinder* getCylinder (int nro); - Pipe* getPipe (int nro); NewShape* getShape (int nro); Group* getGroup (int nro); Law* getLaw (int nro); @@ -167,6 +161,7 @@ public : Vertex* findVertex (double vx, double vy, double vz); Edge* findEdge (Vertex* va, Vertex* vb); Quad* findQuad (Vertex* va, Vertex* vb); + Quad* findQuad (Edge* ea, Edge* eb); Hexa* findHexa (Vertex* va, Vertex* vb); Group* findGroup (cpchar name); @@ -270,9 +265,6 @@ public : int getLevel () { return doc_db ; } - Elements* makeCartesian (Vertex* v, Vector* v1, // Obsolete - int px, int py, int pz, int mx=0, int my=0, int mz=0); - Vertex* findVertex (int id); int closeQuads (Quad* q1, Quad* q2); @@ -290,66 +282,7 @@ public : #ifndef SWIG // addShape HorsPython NewShape* addShape (TopoDS_Shape& forme, const char* name); - // ----------------- Perimes Hexav6 - Cylinder* addCylinder (Vertex* b, Vector* d, double r, double h); - Pipe* addPipe (Vertex* b, Vector* d, double ri, double re, double h); - Elements* makeCartesian (Vertex* v, Vector* v1, Vector* v2, Vector* v3, - int px, int py, int pz); - - Elements* makeCartesian1 (Vertex* v, Vector* v1, Vector* v2, Vector* v3, - int px, int py, int pz, int mx, int my, int mz); - - Elements* makeCylindrical (Vertex* c, Vector* b, Vector* h, double dr, - double da, double dl, int nr, int na, int nl, - bool fill); - Elements* makeCylindricals (Vertex* c, Vector* b, Vector* h, - RealVector tdr, RealVector tda, RealVector tdh, - bool fill=false); - - Elements* makeCylinder (Cylinder* cyl, Vector* vx, int nr, int na, int nl); - Elements* makePipe (Pipe* pip, Vector* vx, int nr, int na, int nl); - - Elements* makeSpherical (Vertex* center, double rayon, int nb, double k); - - CrossElements* makeCylinders (Cylinder* cyl1, Cylinder* cyl2); - CrossElements* makePipes (Pipe* pipe1, Pipe* pipe2); - BiCylinder* makeBiCylinder (Cylinder* cyl1, Cylinder* cyl2); - BiCylinder* makeBiPipe (Pipe* pipe1, Pipe* pipe2); - - Elements* makeSphere (Vertex* center, Vector* vx, Vector* vz, - double radius, double radhole, - Vertex* plorig, - int nrad, int nang, int nhaut); - - Elements* makePartSphere (Vertex* center, Vector* vx, Vector* vz, - double radius, double radhole, - Vertex* plorig, double angle, - int nrad, int nang, int nhaut); - - Elements* makeRind (Vertex* center, Vector* vx, Vector* vz, - double radext, double radint, double radhole, - Vertex* plorig, - int nrad, int nang, int nhaut); - - Elements* makePartRind (Vertex* center, Vector* vx, Vector* vz, - double radext, double radint, double radhole, - Vertex* plorig, double angle, - int nrad, int nang, int nhaut); - - Elements* prismQuad (Quad* start, Vector* dv, int nb); - Elements* prismQuads (Quads start, Vector* dv, int nb); - Elements* prismQuadsVec (Quads start, Vector* dv, RealVector th, int k); - - Elements* revolutionQuadsVec (Quads start, Vertex* center, Vector* axis, - RealVector angles); - - Elements* joinQuad (Quad* start, Quad* dest, Vertex* v1, Vertex* v2, - Vertex* v3, Vertex* v4, int nb); - - Elements* joinQuads (Quads start, Quad* dest, Vertex* v1, Vertex* v2, - Vertex* v3, Vertex* v4, int nb); - - // ----------------- Perimes (fin) + public : void dumpPropagation (); @@ -368,8 +301,6 @@ public : void clearAssoEdges (); void clearAssoQuads (); - Quad* findQuad (Edge* ea, Edge* eb); - public: ~Document (); @@ -480,10 +411,7 @@ private : std::vector doc_propagation; std::vector doc_group; - std::vector doc_vector; - std::vector doc_cylinder; - std::vector doc_pipe; XmlWriter* doc_xml; // --------------------------------------------------- Evols Hexa3 diff --git a/src/HEXABLOCK/HexDocument_trans.cxx b/src/HEXABLOCK/HexDocument_trans.cxx index 201351f..856d895 100755 --- a/src/HEXABLOCK/HexDocument_trans.cxx +++ b/src/HEXABLOCK/HexDocument_trans.cxx @@ -28,7 +28,6 @@ #include "HexHexa.hxx" #include "HexElements.hxx" -#include "HexCrossElements.hxx" #include "HexVector.hxx" #include "HexMatrix.hxx" diff --git a/src/HEXABLOCK/HexDocument_v6.cxx b/src/HEXABLOCK/HexDocument_v6.cxx index 0b9c2a3..a8ba2e6 100644 --- a/src/HEXABLOCK/HexDocument_v6.cxx +++ b/src/HEXABLOCK/HexDocument_v6.cxx @@ -59,11 +59,11 @@ Elements* Document::makeCartesianTop (int nx, int ny, int nz) // ======================================================== makeCartesianUni Elements* Document::makeCartesianUni (Vertex* orig, Vector* vx, Vector* vy, Vector* vz, - double dx, double dy, double dz, + double lx, double ly, double lz, int nx, int ny, int nz) { DumpStart ("makeCartesianUni", orig << vx << vy << vz - << dx << dy << dz + << lx << ly << lz << nx << ny << nz); Elements* grid = new Elements (this); @@ -76,6 +76,9 @@ Elements* Document::makeCartesianUni (Vertex* orig, if (grid->isValid()) { RealVector tx, ty, tz; + double dx = lx / nx; + double dy = ly / ny; + double dz = lz / nz; for (int nro=1 ; nro<=nx; ++nro) tx.push_back (nro*dx); for (int nro=1 ; nro<=ny; ++nro) ty.push_back (nro*dy); for (int nro=1 ; nro<=nz; ++nro) tz.push_back (nro*dz); diff --git a/src/HEXABLOCK/HexElements.cxx b/src/HEXABLOCK/HexElements.cxx index 5dd09d3..d5d7c9d 100755 --- a/src/HEXABLOCK/HexElements.cxx +++ b/src/HEXABLOCK/HexElements.cxx @@ -475,17 +475,6 @@ int Elements::coupler (int nquad, Quad* dest, StrOrient* orient) } return HOK; } -// ====================================================== makeCylindricalNodes -int Elements::makeCylindricalNodes (Vertex* orig, Vector* base, Vector* haut, - double dr, double da, double dl, int nr, int na, int nl, bool fill) -{ - int ier = makeBasicCylinder (dr, da, dl, nr, na, nl, fill); - if (ier!=HOK) - return ier; - - transfoVertices (orig, base, haut); - return HOK; -} // ====================================================== transform int Elements::transform (Matrix* matrice) { diff --git a/src/HEXABLOCK/HexElements.hxx b/src/HEXABLOCK/HexElements.hxx index 518a71b..0f3aa21 100755 --- a/src/HEXABLOCK/HexElements.hxx +++ b/src/HEXABLOCK/HexElements.hxx @@ -88,34 +88,13 @@ public: int saveVtk (cpchar nomfic, int& nro); - int makeCartesianGrid (Vertex* orig, Vector* v1, Vector* v2, Vector* v3, - int px, int py, int pz, int mx=0, int my=0, int mz=0); - - int makeCylinder (Cylinder* cyl, Vector* base, int nr, int na, int nl); - int makePipe (Cylinder* cyl, Vector* base, int nr, int na, int nl); - - int makeCylindricalGrid (Vertex* c, Vector* b, Vector* h, - double dr, double da, double dl, int nr, int na, int nl, bool fill); - - int makeSphericalGrid (Vertex* v, Vector* dv, int nb, double k=1); // perime - int makeSphericalGrid (Vertex* v, double rayon, int nb, double k=1); // perime - - int joinQuads (Quads& q0, int nb, Vertex* v1, Vertex* v2, Vertex* v3, - Vertex* v4, Quad* dest); int coupler (int nro, Quad* other, StrOrient* orient); - int prismQuads (Quads& start, Vector* dv, int nb); - int prismQuadsVec (Quads& start, Vector* dv, RealVector& tlen, int crit); - int cutHexas (const Edges& edges, int nbcuts); void setVertex (Vertex* node, int nx, int ny, int nz); void transfoVertices (double* orig, double* base, double* haut); - // DELETE les 2 suivants - void transfoVertices (Vertex* orig, Vector* vi, Vector* vj, Vector* vk); - void transfoVertices (Vertex* orig, Vector* base, Vector* haut); - void setVertex (Vertex* node, int nro); void setEdge (Edge* edge, int nro); @@ -127,12 +106,6 @@ public: // Evols Hexa3 int getCylPoint (int nr, int na, int nh, double& px, double& py, double& pz); - int revolutionQuads (Quads& start, Vertex* center, Vector* axis, - RealVector &angles); - - int makeRind (EnumGrid type, Vertex* center, Vector* vx, Vector* vz, - double rext, double rint, double radhole, - Vertex* plorig, double angle, int nrad, int nang, int nhaut); static int controlRind (EnumGrid type, Vertex* cx, Vector* vx, Vector* vz, double rext, double rint, double radhole, @@ -140,10 +113,6 @@ public: int nrad, int nang, int nhaut, double &phi0, double &phi1); - int makeCylindricalGrid (Vertex* c, Vector* b, Vector* h, - RealVector& tdr, RealVector& tda, RealVector& tdh, - bool fill=false); - int replaceHexas (Quads& pattern, Vertex* p1, Vertex* c1, Vertex* p2, Vertex* c2, Vertex* p3, Vertex* c3); @@ -278,18 +247,9 @@ protected : void resize (EnumGrid type, int nx, int ny=0, int nz=0, int nplus=0); - int makeCartesianNodes (Vertex* orig, Vector* v1, Vector* v2, Vector* v3, - int px, int py, int pz, int mx=0, int my=0, int mz=0); - int makeCylindricalNodes (Vertex* c, Vector* b, Vector* h, double dr, double da, double dl, int nr, int na, int nl, bool fill); - int makeBasicCylinder (double dr, double da, double dl, int nr, int na, - int nl, bool fill); - - int addStrate (Quad* i_quad[], Edge* i_edge[], Vertex* i_node[], // DEL - Vertex* center, double lambda); - int addStrate (Quad* i_quad[], Edge* i_edge[], Vertex* i_node[], double* center, double lambda); diff --git a/src/HEXABLOCK/HexElements_ter.cxx b/src/HEXABLOCK/HexElements_ter.cxx index 570b12f..e3f2aa4 100755 --- a/src/HEXABLOCK/HexElements_ter.cxx +++ b/src/HEXABLOCK/HexElements_ter.cxx @@ -39,52 +39,6 @@ BEGIN_NAMESPACE_HEXA // static bool db=false; -// ====================================================== makeRind -int Elements::makeRind (EnumGrid type, Vertex* center, Vector* vx, Vector* vz, - double radext, double radint, double radhole, - Vertex* plorig, double angle, int nr, int na, int nl) -{ - double phi1; - int ier = controlRind (type, center, vx, vz, radext, radint, radhole, - plorig, angle, nr, na, nl, cyl_phi0, phi1); - if (ier!=HOK) - return ier; - - resize (type, nr, na, nl); - - cyl_radext = radext; - cyl_radint = radint; - cyl_radhole = radhole; - cyl_closed = type==GR_HEMISPHERIC || type==GR_RIND; - - double theta = cyl_closed ? 2*M_PI : M_PI*angle/180; - cyl_dphi = (phi1-cyl_phi0)/ size_hz; - cyl_dtheta = theta / size_hy; - - int nb_secteurs = cyl_closed ? size_vy-1 : size_vy; - - for (int ny=0 ; nyaddVertex (px, py, pz); - setVertex (node, nx, ny, nz); - } - if (cyl_closed) - for (int nx=0 ; nxinter (qb); + if (cut != NULL) + { + bool more = true; + for (int nc=2*dd+2 ; more && ncinter (h_quad[nc]); + if (cut==NULL) + { + more = false; + // cout << " ... le quad oppose au quad " << 2*dd + // << " est le " << nc << endl; + qb = h_quad[nc]; + h_quad[nc] = h_quad [2*dd+1]; + h_quad[2*dd+1] = qb; + } + } + if (more) + { + char num [10]; + sprintf (num, "%d", 2*dd+1); + el_root->putError ("addHexa : the %sth quad has no opposed quad", + num); + setError (886); + return ; + } + } + } } // ======================================================== controlerSommets void Hexa::controlerSommets () diff --git a/src/HEXABLOCK/HexQuad.cxx b/src/HEXABLOCK/HexQuad.cxx index f82af4f..0b6b5eb 100755 --- a/src/HEXABLOCK/HexQuad.cxx +++ b/src/HEXABLOCK/HexQuad.cxx @@ -75,22 +75,51 @@ Quad::Quad (Edge* ea, Edge* eb, Edge* ec, Edge* ed) for (int nro=0 ; nro inter (q_edge[prec]); - if (nc>=0) - node = q_edge[nro]->getVertex (nc); - else - setError (888); + setError (887); } + } + + if (isValid()) + { + // Cond necessaire : ea disjoint de ec (opposes) + int nc = ea->inter (ec); + if (nc>=0) + { + nc = ea->inter (eb); + if (nc<0) + { + q_edge [E_C] = eb; + q_edge [E_B] = ec; + } + else + { + nc = ea->inter (ed); + if (nc<0) + { + q_edge [E_C] = ed; + q_edge [E_D] = ec; + } + else + setError (880); + } + } + } + + for (int nro=0 ; nro inter (q_edge[prec]); + if (nc>=0) + node = q_edge[nro]->getVertex (nc); + else + setError (888); q_vertex [prec] = node; } diff --git a/src/HEXABLOCK/hexa_base.hxx b/src/HEXABLOCK/hexa_base.hxx index 3ef8cfd..62220aa 100755 --- a/src/HEXABLOCK/hexa_base.hxx +++ b/src/HEXABLOCK/hexa_base.hxx @@ -195,9 +195,6 @@ class XmlWriter; class XmlTree; class Elements; -class GridElements; -class SphericalGrid; -class CrossElements; class BiCylinder; struct StrOrient; diff --git a/src/HEXABLOCK/test_hexa1.cxx b/src/HEXABLOCK/test_hexa1.cxx index 089b6cc..1d00f93 100755 --- a/src/HEXABLOCK/test_hexa1.cxx +++ b/src/HEXABLOCK/test_hexa1.cxx @@ -25,7 +25,6 @@ #include "Hex.hxx" #include "HexDocument.hxx" #include "HexElements.hxx" -#include "HexCrossElements.hxx" #include "HexHexa.hxx" #include "HexQuad.hxx" @@ -103,12 +102,10 @@ int test_sphere (int nbargs, cpchar tabargs[]) { Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); int ncouches = 2; double k = 1; - double rayon = 1; - Hex::Elements* sphere = doc->makeSpherical (orig, rayon, ncouches, k); + Hex::Elements* sphere = doc->makeSphericalTop (ncouches, k); if (ncouches>0) { @@ -135,10 +132,8 @@ int test_cartesi1 () Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); - Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); // print_propagations (doc); @@ -180,9 +175,7 @@ int test_find () Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); - Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); grid->saveVtk ("mini1.vtk"); doc->dump (); @@ -224,15 +217,12 @@ int test_joint (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig1 = doc->addVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); - - Hex::Elements* grid1 = doc->makeCartesian (orig1, dir, dimx,dimy,dimz); + Hex::Elements* grid1 = doc->makeCartesianTop (dimx,dimy,dimz); Hex::Vertex* orig2 = doc->addVertex (dimx/2.0,0,8); Hex::Vector* vectj = doc->addVector (0,1,0); Hex::Vector* vecti = doc->addVector (1,0,0); - Hex::Elements* grid2 = doc->makeCylindrical (orig2, vecti, vectj, + Hex::Elements* grid2 = doc->makeCylinderUni (orig2, vecti, vectj, 1, 180, 1, dimz,dimy,dimx, true); int mx = dimx/2; @@ -264,7 +254,7 @@ int test_joint (int nbargs, cpchar tabargs[]) doc->saveVtk ("joint1.vtk"); const int hauteur = 5; - Hex::Elements* joint = doc->joinQuads(liste, cible, v1,v2,v3,v4, hauteur); + Hex::Elements* joint = doc->joinQuadsUni(liste,cible, v1,v2,v3,v4, hauteur); // for (int nh=0 ; nhgetHexa(nh)->setScalar (5); int nbr_joint_vertex = joint->countVertex (); @@ -285,297 +275,17 @@ int test_joint (int nbargs, cpchar tabargs[]) doc->saveVtk ("joint2.vtk"); return HOK; } -// ======================================================== test_prism -int test_prism (int nbargs, cpchar tabargs[]) -{ - const int dimx = 11; - const int dimy = 11; - const int dimz = 2; - - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* orig1 = doc->addVertex ( 0,0,0); - Hex::Vector* dir1 = doc->addVector ( 1,1,1); - Hex::Vector* dir2 = doc->addVector ( 1,1,-1); - - Hex::Elements* grid1 = doc->makeCartesian (orig1, dir1, dimx,dimy,dimz); - - int mx = dimx/2; - int my = dimy/2; - Hex::Quads liste1, liste2; - - liste1.push_back (grid1->getQuadIJ (mx, my, dimz)); - liste2.push_back (grid1->getQuadIJ (mx, my, 0)); - for (int nx=0; nxgetQuadIJ (nx, my, dimz)); - liste2.push_back (grid1->getQuadIJ (nx, my, 0)); - } - - for (int ny=0; nygetQuadIJ (mx, ny, dimz)); - liste2.push_back (grid1->getQuadIJ (mx, ny, 0)); - } - - Hex::RealVector tlen; - double dh = 2; - for (int nro=0; nro<5; nro++) - { - dh = 2*dh + 1; - tlen.push_back (dh); - } - - const int nbiter = 5; - doc->saveVtk ("prisme1.vtk"); - Hex::Elements* prisme2 = doc->prismQuads (liste2, dir2, nbiter); - doc->saveVtk ("prisme2.vtk"); - - Hex::Elements* prisme1 = doc->prismQuadsVec (liste1, dir1, tlen, 0); - - PutData (liste1.size()); - PutData (tlen.size()); - PutData (prisme1->countHexa()); - PutData (prisme1->countQuad()); - PutData (prisme1->countEdge()); - PutData (prisme1->countVertex()); - - for (int nro=0 ; nro getHexa (nbiter+nro); - cell->setScalar (5); - } - - doc->saveVtk ("prisme3.vtk"); - return HOK; -} -// ======================================================== test_revolution9 -int test_revolution9 (int nbargs, cpchar tabargs[]) -{ - const int dimx = 11; - const int dimy = 11; - const int dimz = 2; - - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* orig1 = doc->addVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); - - Hex::Elements* grid1 = doc->makeCartesian (orig1, dir, dimx,dimy,dimz); - - int mx = dimx/2; - int my = dimy/2; - Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); - Hex::Quads liste; - - liste.push_back (prems); - prems -> setScalar (5); - for (int nx=0; nxgetQuadIJ (nx, my, dimz); - liste.push_back (cell); - cell -> setScalar (5); - } - - for (int ny=0; nygetQuadIJ (mx, ny, dimz); - liste.push_back (cell); - cell -> setScalar (5); - } - - Hex::Vertex* center = doc->addVertex (0, -10, 0); - Hex::Vector* axis = doc->addVector (1, 0, 0); - Hex::RealVector angles; - - Hex::Vector* dir1 = doc->addVector (10,0.3,0.3); - Hex::Elements* grid2 = doc->makeCartesian (center, dir1, 1,1,1); - Hex::Hexa* cell = grid2->getHexaIJK (0,0,0); - cell->setScalar (5); - - doc->saveVtk ("revolution1.vtk"); - - double alpha = 5; - int niter = 5; - double coeff = 1.5; - for (int na=0 ; narevolutionQuads (liste, center, axis, angles); - if (bloc != NULL) - doc->saveVtk ("revolution2.vtk"); - - return HOK; -} -// ======================================================== test_revolution -int test_revolution (int nbargs, cpchar tabargs[]) -{ - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* ori = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - int dr = 1; - int da = 360; - int dl = 1; - - int nr = 1; - int na = 6; - int nl = 1; - - Hex::Elements* grid = doc->makeCylindrical (ori, vx,vz, dr,da,dl, - nr,na,nl, false); - Hex::Quads liste; - for (int nx=0; nxgetQuadIJ (nx, ny, nl); - liste.push_back (cell); - cell -> setScalar (5); - } - - Hex::Vertex* center = doc->addVertex (0, -10, 0); - Hex::Vector* axis = doc->addVector (1, 0, 0); - Hex::RealVector angles; - - Hex::Vector* dir1 = doc->addVector (10,0.3,0.3); - Hex::Elements* grid2 = doc->makeCartesian (center, dir1, 1,1,1); - Hex::Hexa* cell = grid2->getHexaIJK (0,0,0); - cell->setScalar (5); - - doc->saveVtk ("revolution1.vtk"); - - double alpha = 5; - int niter = 5; - double coeff = 1.5; - for (int na=0 ; narevolutionQuads (liste, center, axis, angles); - if (bloc != NULL) - doc->saveVtk ("revolution2.vtk"); - - return HOK; -} -// ======================================================== test_coude -int test_coude (int nbargs, cpchar tabargs[]) -{ -#if 0 - const int dimx = 11; - const int dimy = 11; - const int dimz = 2; - - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - // grid1 = doc->makeCartesian (orig1, dir, dimx,dimy,dimz); - double dr = 1; - int dl = 5; - int nr = 4; - int na = 8; - - Hex::Elements* grid1 = doc->makeCylindrical (orig1, vx,vz,dr,360, dl, - nr, 10, nl, false); - int mx = dimx/2; - int my = dimy/2; - Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); - Hex::Quads liste; - - liste.push_back (prems); - prems -> setScalar (5); - for (int nx=0; nxgetQuadIJ (nx, my, dimz); - liste.push_back (cell); - cell -> setScalar (5); - } - - for (int ny=0; nygetQuadIJ (mx, ny, dimz); - liste.push_back (cell); - cell -> setScalar (5); - } - - - Hex::Vertex* center = doc->addVertex (0, -10, 0); - Hex::Vector* axis = doc->addVector (1, 0, 0); - Hex::RealVector angles; - - Hex::Vector* dir1 = doc->addVector (10,0.3,0.3); - Hex::Elements* grid2 = doc->makeCartesian (center, dir1, 1,1,1); - Hex::Hexa* cell = grid2->getHexaIJK (0,0,0); - cell->setScalar (5); - - doc->saveVtk ("revolution1.vtk"); - - double alpha = 5; - int niter = 5; - double coeff = 1.5; - for (int na=0 ; narevolutionQuads (liste, center, axis, angles); - if (bloc != NULL) - doc->saveVtk ("revolution2.vtk"); -#endif - return HOK; -} // ======================================================== test_count int test_count (int nbargs, cpchar tabargs[]) { Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig1 = doc->addVertex ( 0, 0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - double dr = 1; - double dl = 1; int nr = 2; int nl = 3; // Hex::Elements* c1 = - doc->makeCylindrical (orig1, vx,vz,dr, 360, dl,nr, 10, nl, false); + doc->makeCylinderTop (nr, 10, nl); HexDisplay (doc->countVertex ()); HexDisplay (doc->countUsedVertex ()); @@ -593,16 +303,13 @@ int test_decoupage (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); - - Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); Hex::Edge* arete = grid->getEdgeK (0, 0, 0); // doc ->dump (); int nvtk=0; doc ->saveVtk ("decoupe", nvtk); -/* Hex::Elements* grid2 = */ doc->cut (arete, 1); +/* Hex::Elements* grid2 = */ doc->cutUni (arete, 1); /// doc ->dump (); doc ->saveVtk ("decoupe", nvtk); @@ -619,10 +326,8 @@ int test_gen_xml (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); // Hex::Elements* grid = - doc->makeCartesian (orig, dir, size_x,size_y,size_z); + doc->makeCartesianTop (size_x,size_y,size_z); // Hex::Hexa* cell = grid->getHexa (0); // Hex::Quad* face = cell->getQuad (0); @@ -672,23 +377,8 @@ int test_string_xml (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); // Hex::Elements* grid = - doc->makeCartesian (orig, dir, size_x,size_y,size_z); - - // Hex::Hexa* cell = grid->getHexa (0); - // Hex::Quad* face = cell->getQuad (0); - // Hex::Edge* arete = cell->getEdge (0); - // Hex::Vertex* noeud = cell->getVertex (0); - - // Hex::Shape* shape1 = new Hex::Shape("riri"); - // Hex::Shape* shape2 = new Hex::Shape("fifi"); - // Hex::Shape* shape3 = new Hex::Shape("loulou"); - - // noeud->setAssociation (shape1); - // arete->setAssociation (shape2); - // face ->setAssociation (shape3); + doc->makeCartesianTop (size_x,size_y,size_z); Hex::Law* law1 = doc->addLaw("loi1", 1); Hex::Law* law2 = doc->addLaw("loi2", 2); @@ -761,10 +451,7 @@ int test_clone () Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); - Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z); - + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); Hex::Vector* bond = doc->addVector (0, 0, 7); Hex::Elements* grid2 = doc->makeTranslation (grid, bond); @@ -787,10 +474,7 @@ int test_separ () Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); - // Hex::Elements* grid = - doc->makeCartesian (orig, dir, size_x,size_y,size_z); + doc->makeCartesianTop (size_x,size_y,size_z); doc ->saveVtk ("separ.vtk"); doc ->dump(); @@ -803,11 +487,9 @@ int test_spherical (int nbargs, const char* tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - double rayon = 1; int nbr = 3; - Hex::Elements* grid = doc->makeSpherical (orig, rayon, nbr, 1); + Hex::Elements* grid = doc->makeSphericalTop (nbr, 1); int nbhexas = grid->countHexa (); HexDisplay (nbhexas); @@ -837,18 +519,19 @@ int test_grille_cyl (int nbargs, cpchar tabargs[]) Hex::Vector* vz = doc->addVector (0,0,1); Hex::Vector* vx = doc->addVector (1,0,0); - double dr = 1; + double rint = 5; + double rext = 1; double dl = 1; int nr = 2; int nl = 3; - doc->makeCylindrical (orig1, vx,vz,dr, 360, dl,nr, 4, nl, true); + doc->makeCylinderUni (orig1, vx,vz, rint,rext, 360,dl,nr, 4, nl); Hex::Elements* c2 = - doc->makeCylindrical (orig2, vx,vz,dr, 360, dl,nr, 8, nl, true); - doc->makeCylindrical (orig3, vx,vz,dr, 270, dl,nr, 8, nl, true); - doc->makeCylindrical (orig4, vx,vz,dr, 270, dl,nr, 7, nl, true); - doc->makeCylindrical (orig5, vx,vz,dr, 360, dl,nr, 5, nl, true); - doc->makeCylindrical (orig6, vx,vz,dr, 360, dl,nr, 6, nl, true); + doc->makeCylinderUni (orig2, vx,vz, rint,rext, 360,dl,nr, 8, nl); + doc->makeCylinderUni (orig3, vx,vz, rint,rext, 270,dl,nr, 8, nl); + doc->makeCylinderUni (orig4, vx,vz, rint,rext, 270,dl,nr, 7, nl); + doc->makeCylinderUni (orig5, vx,vz, rint,rext, 360,dl,nr, 5, nl); + doc->makeCylinderUni (orig6, vx,vz, rint,rext, 360,dl,nr, 6, nl); int base2 = nr*nl*8; c2->getHexa(base2 + 0)->setScalar (5); @@ -872,7 +555,6 @@ int test_cylindrical (int nbargs, cpchar tabargs[]) Hex::Vector* vx = doc->addVector (1, 0, 0); Hex::Vector* vz = doc->addVector (0, 0, 1); - double dr = 1; double da = 360; double dl = 1; @@ -894,133 +576,10 @@ int test_cylindrical (int nbargs, cpchar tabargs[]) HexDisplay (da); } - // Hex::Cylinder* cyl = doc->addCylinder (orig, vz, nr, nl); - // Hex::Elements* grid = doc->makeCylinder (cyl, vx, nr, na, nl); - doc->makeCylindrical (orig,vx, vz, dr,da,dl, nr,na, nl, true); + doc->makeCylinderUni (orig,vx, vz, 5.0,1.0,da,dl, nr,na, nl); doc->saveVtk (fic_vtk, na); return HOK; } -// ===================================================== test_cylinder -int test_cylinder (int nbargs, cpchar tabargs[]) -{ - int nvtk = 1; - cpchar fic_vtk = "cylindre"; - - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* orig = doc->addVertex (0, 0, 0); - Hex::Vector* vx = doc->addVector (1, 0, 0); - Hex::Vector* vz = doc->addVector (0, 0, 1); - - double rayon = 10; - double hauteur = 6; - - int nr = 2; - int na = 8; - int nl = 5; - - Hex::Cylinder* cyl = doc->addCylinder (orig, vz, rayon, hauteur); - doc->makeCylinder (cyl, vx, nr, na, nl); - doc ->saveVtk (fic_vtk, nvtk); - return HOK; -} -// ===================================================== test_xml_cylinder -int test_xml_cylinder (int nbargs, cpchar tabargs[]) -{ - int nvtk = 0; - cpchar fic_vtk = "cylindre"; - - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* orig1 = doc->addVertex (0, 0,0); - Hex::Vertex* orig2 = doc->addVertex (50,0,0); - Hex::Vector* vz = doc->addVector (0,0,1); - Hex::Vector* vx = doc->addVector (1,0,0); - - vx->setName ("vx"); - vz->setName ("vz"); - orig1->setName ("orig1"); - orig2->setName ("orig2"); - - int nr = 4; - int nri = 3; - int nre = nr; - int na = 9; - int nl = 5; - - Hex::Cylinder* cyl = doc->addCylinder (orig1, vz, nr, nl); - Hex::Pipe* pipe = doc->addPipe (orig2, vz, nri, nre, nl); - - Hex::Elements* grid = doc->makeCylinder (cyl, vx, nr, na, nl); - doc ->saveVtk (fic_vtk, nvtk); - - Hex::Group* groupe = doc->addGroup ("GroupeAMA", Hex::HexaCell); - groupe->addElement (grid->getHexaIJK (0,0,0)); - groupe->addElement (grid->getHexaIJK (1,0,0)); - groupe->addElement (grid->getHexaIJK (0,1,0)); - groupe->addElement (grid->getHexaIJK (1,1,0)); - groupe->addElement (grid->getHexaIJK (2,1,0)); - - grid->getHexaIJK (0,0,0)->setName ("Hexa0"); - grid->getQuadIJ (0,0,0)->setName ("QuadIJ0"); - grid->getEdgeK (0,0,0)->setName ("EdgeK0"); - - doc->makePipe (pipe, vx, nr, na, nl); - doc ->saveVtk (fic_vtk, nvtk); - doc->save ("cylindre"); - - return HOK; -} -// ===================================================== test_pipe -int test_pipe (int nbargs, cpchar tabargs[]) -{ - int nvtk = 0; - cpchar fic_vtk = "cylindre"; - - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* orig1 = doc->addVertex (0, 0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); - - int nr = 1; - int nri = 1; - int nre = 2; - int na = 2; - int nl = 1; - - Hex::Pipe* pipe = doc->addPipe (orig1, vx, nri, nre, nl); - doc->makePipe (pipe, vy, nr, na, nl); - doc ->saveVtk (fic_vtk, nvtk); - - return HOK; -} -// ======================================================== del_hexa -void del_hexa (Hex::CrossElements* gr, int cyl, int ni, int nj, int nk, int dr) -{ - Hex::Hexa* hexa = gr->getHexaIJK (cyl, ni, nj, nk); - if (hexa!=NULL) - { - hexa->remove (); - if (dr>1) - save_vtk (); - } -} -// ======================================================== del_tranche -int del_tranche (Hex::CrossElements* grid, int cyl, int ni, int nk, int dr=1) -{ - for (int nj = 0 ; nj < 8 ; nj++) - del_hexa (grid, cyl, ni, nj, nk, dr); - - if (dr==1) - save_vtk (); - printf ("del_tranche (g=%d, i=%d, k=%d) : fic = %d\n", - cyl, ni, nk, nbr_vtk-1); - return nbr_vtk; -} // ======================================================== test_joint2 int test_joint2 (int nbargs, cpchar tabargs[]) { @@ -1033,21 +592,19 @@ int test_joint2 (int nbargs, cpchar tabargs[]) Hex::Vertex* hori = docu->addVertex (0, 0, 0); double da = 360; - double dr = 2; double dl = 1; int nr = 1; int na = 8; int nl = 1; - bool fill = true; Hex::Elements *bgrid=NULL, *hgrid=NULL; - hgrid = docu->makeCylindrical (hori, vx,vz, dr,da,dl, nr,na,nl, fill); + hgrid = docu->makeCylinderUni (hori, vx,vz, 5.0,1.0,da,dl, nr,na,nl); docu->dump (); save_vtk (); Hex::Vertex* bori = docu->addVertex (0, 0, -5); - bgrid = docu->makeCylindrical (bori, vx,vz, dr,da,dl, nr,na,nl, fill); + bgrid = docu->makeCylinderUni (bori, vx,vz, 5.0,1.0,da,dl, nr,na,nl); save_vtk (); Hex::Quads qsource, qdest; @@ -1091,238 +648,9 @@ int test_joint2 (int nbargs, cpchar tabargs[]) Hex::Vertex* vs1 = hgrid->getVertexIJK (0, 0, 0); Hex::Vertex* vs2 = hgrid->getVertexIJK (1, 0, 0); - docu->joinQuads (qsource, cible, vs1, vc1, vs2, vc2, 1); - save_vtk (); - - return HOK; -} -// ======================================================== test_croix -int test_croix (int nbargs, cpchar tabargs[]) -{ - Hex::Hex mon_ex; - case_name = "croix"; - docu = mon_ex.addDocument (case_name); - - Hex::Vertex* ori1 = docu->addVertex ( 0,0,0); - Hex::Vertex* ori2 = docu->addVertex (-5,0,5); - Hex::Vector* vz = docu->addVector ( 0,0,1); - Hex::Vector* vx = docu->addVector ( 1,0,0); - - double r1 = 2; - double r2 = 3; - double l1 = 10; - double l2 = 10; - - Hex::Cylinder* cyl1 = docu->addCylinder (ori1, vz, r1, l1); - Hex::Cylinder* cyl2 = docu->addCylinder (ori2, vx, r2, l2); - Hex::CrossElements* grid = docu->makeCylinders (cyl1, cyl2); - + docu->joinQuadsUni (qsource, cible, vs1, vc1, vs2, vc2, 1); save_vtk (); - PutData ((BadElement (grid))); - - Hex::Edge* pipo = docu->addEdge (ori1, ori1); - PutData (pipo->isValid()); - PutData ((BadElement (pipo))); - return HOK; - - del_tranche (grid, 0, 1, 0); - del_tranche (grid, 0, 1, 5); - - del_tranche (grid, 1, 1, 0); - del_tranche (grid, 1, 1, 3); - - del_tranche (grid, 1, 0, 0); - del_tranche (grid, 1, 0, 3); - // Le trognon - del_tranche (grid, 0, 0, 0); - del_tranche (grid, 0, 0, 5); - del_tranche (grid, 0, 0, 1); - del_tranche (grid, 0, 0, 2); - del_tranche (grid, 0, 0, 3); - del_tranche (grid, 0, 0, 4); - // Partie critique - - del_tranche (grid, 1, 1, 1, 2); - - del_tranche (grid, 0, 1, 1, 2); - del_tranche (grid, 0, 1, 4, 2); - del_tranche (grid, 0, 1, 3, 2); - del_tranche (grid, 0, 1, 2, 2); - - del_tranche (grid, 1, 1, 2, 2); - return HOK; -} -// ======================================================== test_croix2 -int test_croix2 (int nbargs, cpchar tabargs[]) -{ - Hex::Hex mon_ex; - case_name = "croix"; - docu = mon_ex.addDocument (case_name); - - Hex::Vertex* pt1 = docu->addVertex ( 0,0,0); - Hex::Vertex* pt2 = docu->addVertex (10,0,0); - - Hex::Vector* dx = docu->addVector ( 1,0,0); - Hex::Vector* dy = docu->addVector ( 0,1,0); - Hex::Vector* dz = docu->addVector ( 0,0,1); - - double r1 = 4; - double r2 = 2; - double l1 = 20; - double l2 = 15; - - Hex::Cylinder* cyl1 = docu->addCylinder (pt1, dx, r1, l1); - Hex::Cylinder* cyl2 = docu->addCylinder (pt2, dz, r2, l2); - - int nr = 3; - int na = 8; - int nl = 2; - Hex::Elements* grid1 = docu->makeCylinder (cyl1, dy, nr, na, nl); - grid1->saveVtk ("cyl_big.vtk"); - Hex::Elements* grid2 = docu->makeCylinder (cyl2, dy, nr, na, nl); - grid2->saveVtk ("cyl_small.vtk"); - - PutData ((BadElement (grid1))); - PutData ((BadElement (grid2))); - - Hex::CrossElements* grid = docu->makeCylinders (cyl1, cyl2); - - grid->saveVtk ("cyl_all.vtk"); - return HOK; -} -// ======================================================== test_pipes -int test_pipes (int nbargs, cpchar tabargs[]) -{ - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* ori1 = doc->addVertex ( 0,0,0); - Hex::Vertex* ori2 = doc->addVertex (-5,0,5); - Hex::Vector* vz = doc->addVector ( 0,0,1); - Hex::Vector* vx = doc->addVector ( 1,0,0); - -// double h1 = 5, ri1 = 1, re1 = 2; - double h1 = 10, ri1 = 1, re1 = 2; - double h2 = 10, ri2 = 2, re2 = 3; - - Hex::Pipe* pipe1 = doc->addPipe (ori1, vz, ri1, re1, h1); - Hex::Pipe* pipe2 = doc->addPipe (ori2, vx, ri2, re2, h2); - Hex::CrossElements* grid = doc->makePipes (pipe1, pipe2); - - case_name = "pipe"; - docu = doc; - save_vtk (); - - del_tranche (grid, 0, 1, 0); - del_tranche (grid, 0, 1, 5); - - del_tranche (grid, 1, 1, 0); - del_tranche (grid, 1, 1, 3); - // Partie critique - - del_tranche (grid, 1, 1, 1, 2); - - del_tranche (grid, 0, 1, 1, 2); - del_tranche (grid, 0, 1, 4, 2); - del_tranche (grid, 0, 1, 3, 2); - del_tranche (grid, 0, 1, 2, 2); - - del_tranche (grid, 1, 1, 2, 2); - /* *************************************************** - - int nbz [2] = { 8, 4 }; - int ni = 1; - for (int cyl = 0 ; cyl < 2 ; cyl++) - for (int nk = 0 ; nk < nbz[cyl] ; nk++) - for (int nj = 0 ; nj < 4 ; nj++) - { - int jj = nj; - if (cyl==0) jj = (jj+6) MODULO 8 ; - Hex::Hexa* hexa = grid->getHexaIJK (cyl, ni, jj, nk); - if (hexa!=NULL) - { - hexa->remove (); - doc->saveVtk (case_name, nbr_vtk); - } - } - *************************************************** */ - return HOK; -} -// ======================================================== test_lorraine -int test_lorraine(int nbargs, cpchar tabargs[]) -{ - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* ori1 = doc->addVertex ( 0,0,0); - Hex::Vertex* ori2 = doc->addVertex (-5,0,5); - Hex::Vertex* ori3 = doc->addVertex ( 0,0,12); - Hex::Vertex* ori4 = doc->addVertex (-5,0,17); - - Hex::Vector* vz = doc->addVector ( 0,0,1); - Hex::Vector* vx = doc->addVector ( 1,0,0); - - int nl1 = 10; - int nl2 = 10; - - double rsmall = 1; - double rmoy = 2; - double rbig = 3; - - Hex::Cylinder* cyl1 = doc->addCylinder (ori1, vz, rmoy, nl1); - Hex::Cylinder* cyl2 = doc->addCylinder (ori2, vx, rsmall, nl2); - - Hex::Cylinder* cyl3 = doc->addCylinder (ori3, vz, rmoy, nl1); - Hex::Cylinder* cyl4 = doc->addCylinder (ori4, vx, rbig, nl2); - - Hex::CrossElements* grid1 = doc->makeCylinders (cyl1, cyl2); - Hex::CrossElements* grid2 = doc->makeCylinders (cyl4, cyl3); - -#define Imprimer(x) printf (#x " = ") ; if (x) x->dump() ; else printf ("NULL\n") - const int nx_int = 0; - const int nx_ext = 1; - - // vc2 = grid1->getVertexIJK (Hex::CylBig, 0,0,0); - // vc3 = grid2->getVertexIJK (Hex::CylSmall, 0,0,0); - // Cyl i j k - Hex::Quad* qb = grid1-> getQuadIJ (Hex::CylBig, nx_ext, Hex::S_E, 4); - Hex::Quad* qh = grid2-> getQuadIJ (Hex::CylSmall, nx_ext, Hex::S_N, 0); - - Hex::Vertex* vb0 = qb->getVertex (3); - Hex::Vertex* vb1 = qb->getVertex (2); - Hex::Vertex* vh0 = qh->getVertex (0); - Hex::Vertex* vh1 = qh->getVertex (1); - - vb0 = grid1->getVertexIJK (Hex::CylBig, 2, Hex::S_E, 4); // cible - vb1 = grid1->getVertexIJK (Hex::CylBig, 2, Hex::S_NE, 4); - vh0 = grid2->getVertexIJK (Hex::CylSmall, 2, Hex::S_N, 0); // depart - vh1 = grid2->getVertexIJK (Hex::CylSmall, 2, Hex::S_NW, 0); - - Imprimer (vh0); - Imprimer (vh1); - Imprimer (vb0); - Imprimer (vb1); - - // qb->remove (); - // qh->remove (); - Hex::Quads hliste; - - hliste.push_back (qh); - for (int ny=1; nygetQuadIJ (Hex::CylSmall, nx_ext, ns, 0)); - } - - for (int ny=0; ny<4 ; ny++) - hliste.push_back (grid2->getQuadIJ (Hex::CylSmall, nx_int, ny, 0)); - - int hauteur = 3; - doc->joinQuads (hliste, qb, vh0, vb0, vh1, vb1, hauteur); - doc->saveVtk ("lorraine.vtk"); - - // doc->dump (); return HOK; } // ======================================================== test_disconnect2 @@ -1375,11 +703,7 @@ int test_disconnect4 (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig2 = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); - Hex::Vector* vz = doc->addVector (0,0,1); - Hex::Elements* grid2 = doc->makeCartesian (orig2, vx,vy,vz, size_x,size_y,size_z); + Hex::Elements* grid2 = doc->makeCartesianTop (size_x,size_y,size_z); int nvtk = 0; doc->setLevel (1); @@ -1420,9 +744,7 @@ int test_disconnect1 (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig1 = doc->addVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); - Hex::Elements* grid1 = doc->makeCartesian (orig1, dir, size_x,size_y,size_z); + Hex::Elements* grid1 = doc->makeCartesianTop (size_x,size_y,size_z); int nvtk = 0; doc->setLevel (1); @@ -1457,10 +779,7 @@ int test_disconnect3 (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig1 = doc->addVertex (0,0,0); - - Hex::Vector* dir = doc->addVector (1,1,1); - Hex::Elements* grid1 = doc->makeCartesian (orig1, dir, size_x,size_y,size_z); + Hex::Elements* grid1 = doc->makeCartesianTop (size_x,size_y,size_z); int nvtk = 0; doc->setLevel (1); @@ -1584,10 +903,7 @@ int test_propagation () Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); - // Hex::Elements* grid = - doc->makeCartesian (orig, dir, size_x,size_y,size_z); + doc->makeCartesianTop (size_x,size_y,size_z); int nb = doc->countPropagation (); for (int nro=0 ; nroaddVertex (0,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); - Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); Hex::Vector* enhaut = doc->addVector (0, 0, 5); Hex::Vector* devant = doc->addVector (5, 0, 0); @@ -1676,8 +990,7 @@ int test_transfo2 (int nbargs, cpchar tabargs[]) Hex::Vertex* orig = doc->addVertex (0,0,0); Hex::Vector* dir = doc->addVector (1,1,1); - Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x, size_y, - size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x, size_y, size_z); if (grid==NULL) return HERR; @@ -1754,40 +1067,6 @@ int test_transfo2 (int nbargs, cpchar tabargs[]) return HOK; } -// ======================================================== test_transfo -int test_transfo (int nbargs, cpchar tabargs[]) -{ - int nvtk = 0; - cpchar fic_vtk = "transfo"; - - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - doc ->setLevel (1); - - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vz = doc->addVector (0,0,1); - double dr = 1; - double da = 360; - double dl = 1; - int nr = 3; - int na = 8; - int nl = 3; - Hex::Elements* grid = doc->makeCylindrical (orig, vx,vz, dr, da, dl, - nr, na, nl, false); - if (grid==NULL) - return HERR; - - doc ->saveVtk (fic_vtk, nvtk); - Hex::Vector* devant = doc->addVector (10, 0, 0); - - Hex::Elements* grid2 = doc->makeTranslation (grid, devant); - if (grid2==NULL) - return HERR; - doc ->saveVtk (fic_vtk, nvtk); - - return HOK; -} // ======================================================== test_copy_document int test_copy_document (int nbargs, cpchar tabargs[]) { @@ -1810,11 +1089,7 @@ int test_remove () Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vertex* orig1 = doc->addVertex (6,0,0); - Hex::Vector* dir = doc->addVector (1,1,1); - Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z); - doc->makeCartesian (orig1, dir, 1,1,1); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); doc->saveVtk ("removeConn1.vtk"); Echo ("--------- Avant destruction"); @@ -1870,43 +1145,6 @@ void init_vec (Hex::RealVector& tab, double n0=0, double n1=0, double n2=0, if (n15>0.0) tab.push_back (n15); if (n16>0.0) tab.push_back (n16); } -// ================================================== test_cylindricals -int test_cylindricals (int nbargs, cpchar tabargs[]) -{ - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* orig = doc->addVertex (0, 0, 0); - Hex::Vector* vz = doc->addVector (0, 0, 1); - Hex::Vector* vx = doc->addVector (1 ,0, 0); - - Hex::RealVector tdr, tda, tdl; - - /****************** - init_vec (tdr, 2, 1, 0.5); - init_vec (tda, 40, 35, 30, 25, 20, 15, 10, 5, - 5, 10, 15, 20, 25, 30, 35, 40); - init_vec (tdl, 1, 2, 3 ); - - init_vec (tdr, 1, 1, 1, 1); - init_vec (tda, 45,45, 45,45, 45,45, 45,45 ); - init_vec (tdl, 1, 1, 1 ); - - ****************** */ - - - init_vec (tdr, 1, 2, 1, 2); - init_vec (tda, 20, 20, 20 ); - init_vec (tdl, 1 ); - - Hex::Elements* grid=doc->makeCylindricals (orig, vx,vz, tdr,tda,tdl, false); - - doc->saveVtk ("cylindricals.vtk"); - doc->dump(); - grid->clearAssociation(); - doc->clearAssociation(); - return HOK; -} // ======================================================== test_edge int test_edge (int nbargs, cpchar tabargs[]) { @@ -1935,8 +1173,6 @@ int test_hexa (int nbargs, cpchar tabargs[]) goto_workspace (); - ier = test_cylindricals (nbargs, tabargs); - ier = test_transfo (nbargs, tabargs); free_workspace (); return ier; diff --git a/src/HEXABLOCK/test_hexa5.cxx b/src/HEXABLOCK/test_hexa5.cxx index 3a85baf..0added2 100644 --- a/src/HEXABLOCK/test_hexa5.cxx +++ b/src/HEXABLOCK/test_hexa5.cxx @@ -26,7 +26,6 @@ #include "HexDocument.hxx" #include "HexElements.hxx" -#include "HexCrossElements.hxx" #include "HexHexa.hxx" #include "HexQuad.hxx" @@ -43,7 +42,6 @@ int test_replace5 (int nbargs, cpchar tabargs[]) const int size_z = 2; double lgcell = 3; - double cray = lgcell*size_x/2; double decal = lgcell/sqrt (2.0); int nvtk = 0; @@ -52,24 +50,12 @@ int test_replace5 (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (son_nom); - Hex::Vertex* ori1 = doc->addVertex (-cray, -cray, 0); Hex::Vector* vx = doc->addVector (3,0,0); - Hex::Vector* vy = doc->addVector (0,3,0); Hex::Vector* vz = doc->addVector (0,0,1); - Hex::Elements* grid1 = doc->makeCartesian (ori1, vx, vy, vz, - size_x,size_y,size_z); + Hex::Elements* grid1 = doc->makeCartesianTop (size_x,size_y,size_z); doc->saveVtk (son_nom, nvtk); -/************************ - for (int nz=0 ; nzgetHexaIJK (nx,ny,nz)->remove (); - - doc->saveVtk (son_nom, nvtk); -********************/ - for (int nz=0 ; nz<=size_z ; ++nz) { grid1->getVertexIJK (1, 1, nz)->setX (-decal); @@ -89,7 +75,6 @@ int test_replace5 (int nbargs, cpchar tabargs[]) Hex::Vertex* ori0 = doc->addVertex (0,-10,0); Hex::Vertex* ori2 = doc->addVertex (0,0,0); - const double dr = 1; const double da = 360; const double dl = 1; const int nr = 2; @@ -97,13 +82,13 @@ int test_replace5 (int nbargs, cpchar tabargs[]) const int nl = 3; - Hex::Elements* grid0 = doc->makeCylindrical (ori0, vx, vz, - dr, da, dl, nr, na, 1, false); + Hex::Elements* grid0 = doc->makePipeUni (ori0, vx, vz, + 1.0,5.0, da, dl, nr, na, nl); doc->saveVtk (son_nom, nvtk); // Hex::Elements* grid2 = - doc->makeCylindrical (ori2, vx, vz, dr, da, dl, nr, na, nl, false); + doc->makePipeUni (ori2, vx, vz, 1.0,5.0, da, dl, nr, na, nl); doc->saveVtk (son_nom, nvtk); grid0->remove (); @@ -123,13 +108,7 @@ int test_get (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (son_nom); - Hex::Vertex* ori1 = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - Hex::Elements* grid = doc->makeCartesian (ori1, vx, vy, vz, - size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); doc->saveVtk (son_nom, nvtk); grid->getVertexIJK (2, 1, 1)->setColor (4); doc->saveVtk (son_nom, nvtk); @@ -160,23 +139,13 @@ int test_dump (int nbargs, cpchar tabargs[]) const int size_y = 4; const int size_z = 2; - double lgcell = 3; - double cray = lgcell*size_x/2; - // double decal = lgcell/sqrt (2.0); - int nvtk = 0; cpchar son_nom = "test_dump"; Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (son_nom); - Hex::Vertex* ori1 = doc->addVertex (-cray, -cray, 0); - Hex::Vector* vx = doc->addVector (3,0,0); - Hex::Vector* vy = doc->addVector (0,3,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - //Hex::Elements* grid1 = - doc->makeCartesian (ori1, vx, vy, vz, size_x,size_y,size_z); + doc->makeCartesianTop (size_x,size_y,size_z); doc->saveVtk (son_nom, nvtk); return HOK; } diff --git a/src/HEXABLOCK/test_hexa6.cxx b/src/HEXABLOCK/test_hexa6.cxx index 1b95526..3538017 100644 --- a/src/HEXABLOCK/test_hexa6.cxx +++ b/src/HEXABLOCK/test_hexa6.cxx @@ -26,7 +26,6 @@ #include "HexDocument.hxx" #include "HexElements.hxx" #include "HexBiCylinder.hxx" -// #include "HexCrossElements.hxx" #include "HexHexa.hxx" // #include "HexQuad.hxx" @@ -108,20 +107,24 @@ int test_cartesian6 (int nbargs, cpchar tabargs[]) Hex::Document* doc = get_document (); +/*********************** Hex::Elements* grid1 = doc->makeCartesianTop (size_x, size_y, size_z); grid1->saveVtk ("makeCartesianTop.vtk"); PutData (grid1->isValid()); return HOK; +***************************/ - Hex::Vertex* orig2 = doc->addVertex (10, 0, 0); + Hex::Vertex* orig2 = doc->addVertex (0, 0, 0); Hex::Vector* vx = doc->addVector (1, 0, 0); Hex::Vector* vy = doc->addVector (0, 1, 0); Hex::Vector* vz = doc->addVector (0, 0, 1); - double dx =1, dy=1, dz=1; + int nx = 2, ny=1, nz=2; + double dx =nx, dy=ny, dz=nz; Hex::Elements* grid2 = doc->makeCartesianUni (orig2, vx, vy, vz, dx, dy, dz, - size_x, size_y, size_z); + nx, ny, nz); grid2->saveVtk ("makeCartesianUni.vtk"); PutData (grid2->isValid()); + return HOK; Hex::Vertex* orig3 = doc->addVertex (20, 0, 0); Hex::RealVector tx, ty, tz; @@ -183,13 +186,13 @@ int test_cylinder_top (int nbargs, cpchar tabargs[]) int test_cylinder6 (int nbargs, cpchar tabargs[]) { case_name = "cylinders"; + Hex::Document* doc = get_document (); + + /******************** const int size_x = 3; const int size_y = 8; const int size_z = 2; - Hex::Document* doc = get_document (); - - /******************** Hex::Elements* grid1 = doc->makeCylinderTop (size_x, size_y, size_z); grid1->saveVtk ("makeCylinderTop.vtk"); PutData (grid1->isValid()); @@ -501,7 +504,7 @@ int test_revolution6 (int nbargs, cpchar tabargs[]) Hex::Vertex* v4 = doc->addVertex (10, 0, 2); Hex::Quad* quad = doc->addQuadVertices (v1, v2, v3, v4); - Hex::Elements* grid0 = doc->revolutionQuadUni (quad, centre, vz, 180, 8); + doc->revolutionQuadUni (quad, centre, vz, 180, 8); doc->saveVtk ("revolution1.vtk"); return HOK; diff --git a/src/HEXABLOCK/test_quads.cxx b/src/HEXABLOCK/test_quads.cxx index eb431ba..edb4d98 100644 --- a/src/HEXABLOCK/test_quads.cxx +++ b/src/HEXABLOCK/test_quads.cxx @@ -26,7 +26,6 @@ #include "HexDocument.hxx" #include "HexElements.hxx" -#include "HexCrossElements.hxx" #include "HexHexa.hxx" #include "HexQuad.hxx" @@ -45,13 +44,7 @@ int test_hexa_quads_5 (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - Hex::Elements* grid = doc->makeCartesian (orig, vx, vy, vz, - size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); int nvtk = 0; cpchar fic_vtk = "HexaQuad_5"; @@ -94,13 +87,7 @@ int test_hexa_quads_ab (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - Hex::Elements* grid = doc->makeCartesian (orig, vx, vy, vz, - size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); int nvtk = 0; cpchar fic_vtk = "HexaQuad_ab"; @@ -143,13 +130,7 @@ int test_hexa_quads_ac (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - Hex::Elements* grid = doc->makeCartesian (orig, vx, vy, vz, - size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); int nvtk = 0; cpchar fic_vtk = "HexaQuad_ac"; doc->saveVtk (fic_vtk, nvtk); @@ -196,13 +177,7 @@ int test_hexa_quads_ace (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - Hex::Elements* grid = doc->makeCartesian (orig, vx, vy, vz, - size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); int nvtk = 0; cpchar fic_vtk = "HexaQuad_ace"; doc->saveVtk (fic_vtk, nvtk); @@ -248,13 +223,7 @@ int test_hexa_quads_acd (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - Hex::Elements* grid = doc->makeCartesian (orig, vx, vy, vz, - size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); int nvtk = 0; cpchar fic_vtk = "HexaQuad_acd"; doc->saveVtk (fic_vtk, nvtk); @@ -300,13 +269,7 @@ int test_hexa_quads_abcd (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - Hex::Elements* grid = doc->makeCartesian (orig, vx, vy, vz, - size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); int nvtk = 0; cpchar fic_vtk = "HexaQuad_abcd"; doc->saveVtk (fic_vtk, nvtk); @@ -351,13 +314,7 @@ int test_hexa_quads_abce (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - Hex::Elements* grid = doc->makeCartesian (orig, vx, vy, vz, - size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); int nvtk = 0; cpchar fic_vtk = "HexaQuad_abce"; doc->saveVtk (fic_vtk, nvtk); @@ -472,131 +429,6 @@ int test_hexa_quads_ac1 (int nbargs, cpchar tabargs[]) doc->saveVtk ("hexa_quads.vtk"); return HOK; } -// ======================================================== test_part_rind -int test_part_rind (int& nvtk) -{ - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* center = doc->addVertex (0,0,0); - Hex::Real radius = 8; - Hex::Real radint = 7; - Hex::Vertex* orig = NULL; - Hex::Vector* vz = doc->addVector (0,0,1); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Real angle = 90; - Hex::Real radhole = 1; - int nrad = 3; - int nang = 4; - int nhaut = 8; - - Hex::Elements* grid = doc->makePartRind (center, vx, vz, radius, radint, - radhole, orig, angle, nrad, nang, nhaut); - if (grid!=NULL) - doc->saveVtk ("makeSphere", nvtk); - return HOK; -} -// ======================================================== test_rind -int test_rind (int& nvtk) -{ - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* center = doc->addVertex (0,0,0); - Hex::Real radius = 8; - Hex::Real radint = 7; - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vz = doc->addVector (0,1,1); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Real radhole = 1; - int nrad = 3; - int nang = 16; - int nhaut = 8; - - Hex::Elements* grid = doc->makeRind (center, vx, vz, radius, radint, - radhole, orig, nrad, nang, nhaut); - if (grid!=NULL) - doc->saveVtk ("makeSphere", nvtk); - return HOK; -} -// ======================================================== test_part_sphere -int test_part_sphere (int& nvtk) -{ - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* center = doc->addVertex (0,0,0); - Hex::Real radius = 8; - Hex::Vertex* orig = doc->addVertex (0,0,-4); - Hex::Vector* vz = doc->addVector (0,0,1); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Real angle = 90; - Hex::Real radhole = 1; - int nrad = 3; - int nang = 4; - int nhaut = 8; - - Hex::Elements* grid = doc->makePartSphere (center, vx, vz, radius, - radhole, orig, angle, nrad, nang, nhaut); - if (grid!=NULL) - doc->saveVtk ("makeSphere", nvtk); - return HOK; -} -// ======================================================== test_sphere -int test_sphere (int& nvtk) -{ - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* center = doc->addVertex (0,0,0); - Hex::Real radius = 8; - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vz = doc->addVector (0,0,1); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Real radhole = 1; - int nrad = 3; - int nang = 16; - int nhaut = 8; - - Hex::Elements* grid = doc->makeSphere (center, vx, vz, radius, - radhole, orig, nrad, nang, nhaut); - if (grid!=NULL) - doc->saveVtk ("makeSphere", nvtk); - return HOK; -} -// ================================================== test_asso_grid -int test_asso_grid (int nbargs, cpchar tabargs[]) -{ - Hex::Hex mon_ex; - Hex::Document* doc = mon_ex.addDocument (); - - Hex::Vertex* orig1 = doc->addVertex ( 0, 0,0); - - Hex::Vector* vz = doc->addVector (0,0,1); - Hex::Vector* vx = doc->addVector (1,0,0); - - double dr = 1; - double dl = 1; - int nr = 2; - int nl = 3; - int na = 8; - - Hex::Elements *c1 = NULL; - - c1 = doc->makeCylindrical (orig1, vx,vz,dr, 300, dl, nr, na, nl, false); - for (int ned=0 ; nedgetEdgeJ (nr, ned, 1); - if (edge != NULL) - edge->setScalar (5); - else - printf (" ... c1->getEdgeJ (nr, %d, 1) = NULL\n", ned); - } - - doc->saveVtk ("asso_grid.vtk"); - - return HOK; -} // ======================================================== test_piquage int test_piquage (int nbargs, cpchar tabargs[]) { @@ -607,15 +439,11 @@ int test_piquage (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); Hex::Vector* vz = doc->addVector (0,0,1); - Hex::Elements* grid = doc->makeCartesian (orig, vx, vy, vz, - size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); - double dr = 1; double dl = 1; int nr = 1; @@ -623,8 +451,8 @@ int test_piquage (int nbargs, cpchar tabargs[]) int nl = 1; Hex::Vertex* orig2 = doc->addVertex (0,0,5); - Hex::Elements* grid2 = doc->makeCylindrical (orig2, vx,vz, - dr, 360, dl, nr, na, nl, false); + Hex::Elements* grid2 = doc->makeCylinderUni (orig2, vx,vz, 1.0, 5.0, + 360, dl, nr, na, nl); Hex::Vertex* c1 = grid->getVertexIJK (1, 2, size_z); Hex::Vertex* c2 = grid->getVertexIJK (1, 1, size_z); @@ -670,13 +498,7 @@ int test_replace (int nbargs, cpchar tabargs[]) Hex::Hex mon_ex; Hex::Document* doc = mon_ex.addDocument (); - Hex::Vertex* orig = doc->addVertex (0,0,0); - Hex::Vector* vx = doc->addVector (1,0,0); - Hex::Vector* vy = doc->addVector (0,1,0); - Hex::Vector* vz = doc->addVector (0,0,1); - - Hex::Elements* grid = doc->makeCartesian (orig, vx, vy, vz, - size_x,size_y,size_z); + Hex::Elements* grid = doc->makeCartesianTop (size_x,size_y,size_z); Hex::Vertex* c1 = grid->getVertexIJK (1, 2, size_z); Hex::Vertex* c2 = grid->getVertexIJK (1, 1, size_z); @@ -725,16 +547,6 @@ int test_replace (int nbargs, cpchar tabargs[]) return HOK; } -// ======================================================== test_hemispheres -int test_hemispheres (int nbargs, cpchar tabargs[]) -{ - int nvtk = 0; - test_sphere (nvtk); - test_rind (nvtk); - test_part_rind (nvtk); - test_part_sphere (nvtk); - return HOK; -} // ======================================================== test_quads int test_quads (int nbargs, cpchar tabargs[]) { diff --git a/src/HEXABLOCK_SWIG/hexablock.py b/src/HEXABLOCK_SWIG/hexablock.py index e19fb39..531290d 100644 --- a/src/HEXABLOCK_SWIG/hexablock.py +++ b/src/HEXABLOCK_SWIG/hexablock.py @@ -16,7 +16,7 @@ def moduleName () : return "HEXABLOCK" # ======================================================== getEngine -# ### Gives the component +# ### Gives the component def getEngine () : return component @@ -85,7 +85,7 @@ def dump(doc, mesh=None, full=False): print "Model blocks number: ", uh if mesh != None: - print + print print "Mesh nodes number: ", mesh.NbNodes() print "Mesh segments number: ", mesh.NbEdges() print "Mesh quadrangles number: ", mesh.NbQuadrangles() @@ -125,6 +125,8 @@ def mesh (doc, name=None, dim=3, container="FactoryServer"): meshexa.mesh.AddHypothesis(shape, hypo) ### hypo.SetDocument(doc.getXml()) ## Hexa6 TODO et a verifier + print " Maillage du document " + print " Maillage du document ", docname hypo.SetDocument (docname); hypo.SetDimension(dim) @@ -187,5 +189,6 @@ def addToStudy(doc): # ==================================================== addShape # Add a document in the current study def addShape (doc, shape, name): + print "Call addShape" forme = doc.addShape (shape.getShape(), name) - return forme + return forme diff --git a/src/HEXABLOCK_SWIG/hexablock_swig.i b/src/HEXABLOCK_SWIG/hexablock_swig.i index 34f07d7..63fa80a 100644 --- a/src/HEXABLOCK_SWIG/hexablock_swig.i +++ b/src/HEXABLOCK_SWIG/hexablock_swig.i @@ -9,7 +9,6 @@ #include "HexHexa.hxx" #include "HexEdge.hxx" #include "HexVector.hxx" -#include "HexCrossElements.hxx" #include "HexBiCylinder.hxx" #include "HexNewShape.hxx" #include "HexGroup.hxx" @@ -38,7 +37,6 @@ namespace std %include "HexPropagation.hxx" %include "Hex.hxx" %include "HexElements.hxx" -%include "HexCrossElements.hxx" %include "HexBiCylinder.hxx" %include "HexNewShape.hxx" %include "HexGroup.hxx" diff --git a/src/HEXABLOCK_SWIG/hexablock_swig.py b/src/HEXABLOCK_SWIG/hexablock_swig.py index cb4015d..7f174a8 100644 --- a/src/HEXABLOCK_SWIG/hexablock_swig.py +++ b/src/HEXABLOCK_SWIG/hexablock_swig.py @@ -813,8 +813,6 @@ class Document(EltBase): def countUsedQuad(*args): return _hexablock_swig.Document_countUsedQuad(*args) def countUsedEdge(*args): return _hexablock_swig.Document_countUsedEdge(*args) def countUsedVertex(*args): return _hexablock_swig.Document_countUsedVertex(*args) - def countCylinder(*args): return _hexablock_swig.Document_countCylinder(*args) - def countPipe(*args): return _hexablock_swig.Document_countPipe(*args) def getHexa(*args): return _hexablock_swig.Document_getHexa(*args) def getQuad(*args): return _hexablock_swig.Document_getQuad(*args) def getEdge(*args): return _hexablock_swig.Document_getEdge(*args) @@ -824,8 +822,6 @@ class Document(EltBase): def getUsedEdge(*args): return _hexablock_swig.Document_getUsedEdge(*args) def getUsedVertex(*args): return _hexablock_swig.Document_getUsedVertex(*args) def getVector(*args): return _hexablock_swig.Document_getVector(*args) - def getCylinder(*args): return _hexablock_swig.Document_getCylinder(*args) - def getPipe(*args): return _hexablock_swig.Document_getPipe(*args) def getShape(*args): return _hexablock_swig.Document_getShape(*args) def getGroup(*args): return _hexablock_swig.Document_getGroup(*args) def getLaw(*args): return _hexablock_swig.Document_getLaw(*args) @@ -844,6 +840,7 @@ class Document(EltBase): def removeLaw(*args): return _hexablock_swig.Document_removeLaw(*args) def makeCartesianTop(*args): return _hexablock_swig.Document_makeCartesianTop(*args) def makeCartesianUni(*args): return _hexablock_swig.Document_makeCartesianUni(*args) + def makeCartesian(*args): return _hexablock_swig.Document_makeCartesian(*args) def makeCylinderTop(*args): return _hexablock_swig.Document_makeCylinderTop(*args) def makeCylinderUni(*args): return _hexablock_swig.Document_makeCylinderUni(*args) def makeCylinder(*args): return _hexablock_swig.Document_makeCylinder(*args) @@ -882,7 +879,6 @@ class Document(EltBase): def appendXml(*args): return _hexablock_swig.Document_appendXml(*args) def getXml(*args): return _hexablock_swig.Document_getXml(*args) def getLevel(*args): return _hexablock_swig.Document_getLevel(*args) - def makeCartesian(*args): return _hexablock_swig.Document_makeCartesian(*args) def findVertex(*args): return _hexablock_swig.Document_findVertex(*args) def closeQuads(*args): return _hexablock_swig.Document_closeQuads(*args) def addLaw(*args): return _hexablock_swig.Document_addLaw(*args) @@ -984,43 +980,6 @@ class Elements(EltBase): Elements_swigregister = _hexablock_swig.Elements_swigregister Elements_swigregister(Elements) -NbrSlices1 = _hexablock_swig.NbrSlices1 -NbrSlices2 = _hexablock_swig.NbrSlices2 -SizeRay = _hexablock_swig.SizeRay -BiCyl = _hexablock_swig.BiCyl -NbrVSlices1 = _hexablock_swig.NbrVSlices1 -NbrVSlices2 = _hexablock_swig.NbrVSlices2 -MiddleSlice1 = _hexablock_swig.MiddleSlice1 -Cyl1 = _hexablock_swig.Cyl1 -Cyl2 = _hexablock_swig.Cyl2 -NO_CYL = _hexablock_swig.NO_CYL -NO_PIPE = _hexablock_swig.NO_PIPE -IS_HERE = _hexablock_swig.IS_HERE -class CrossElements(Elements): - __swig_setmethods__ = {} - for _s in [Elements]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, CrossElements, name, value) - __swig_getmethods__ = {} - for _s in [Elements]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, CrossElements, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _hexablock_swig.new_CrossElements(*args) - try: self.this.append(this) - except: self.this = this - def getHexaIJK(*args): return _hexablock_swig.CrossElements_getHexaIJK(*args) - def getQuadIJ(*args): return _hexablock_swig.CrossElements_getQuadIJ(*args) - def getQuadJK(*args): return _hexablock_swig.CrossElements_getQuadJK(*args) - def getQuadIK(*args): return _hexablock_swig.CrossElements_getQuadIK(*args) - def getEdgeI(*args): return _hexablock_swig.CrossElements_getEdgeI(*args) - def getEdgeJ(*args): return _hexablock_swig.CrossElements_getEdgeJ(*args) - def getEdgeK(*args): return _hexablock_swig.CrossElements_getEdgeK(*args) - def getVertexIJK(*args): return _hexablock_swig.CrossElements_getVertexIJK(*args) - __swig_destroy__ = _hexablock_swig.delete_CrossElements - __del__ = lambda self : None; -CrossElements_swigregister = _hexablock_swig.CrossElements_swigregister -CrossElements_swigregister(CrossElements) - class BiCylinder(Elements): __swig_setmethods__ = {} for _s in [Elements]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) diff --git a/src/HEXABLOCK_SWIG/hexablock_swig_wrap.cc b/src/HEXABLOCK_SWIG/hexablock_swig_wrap.cc index e09a7cd..9c10fbe 100644 --- a/src/HEXABLOCK_SWIG/hexablock_swig_wrap.cc +++ b/src/HEXABLOCK_SWIG/hexablock_swig_wrap.cc @@ -2470,67 +2470,64 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_FILE swig_types[0] #define SWIGTYPE_p_Hex__BiCylinder swig_types[1] -#define SWIGTYPE_p_Hex__CrossElements swig_types[2] -#define SWIGTYPE_p_Hex__Cylinder swig_types[3] -#define SWIGTYPE_p_Hex__Document swig_types[4] -#define SWIGTYPE_p_Hex__Edge swig_types[5] -#define SWIGTYPE_p_Hex__Elements swig_types[6] -#define SWIGTYPE_p_Hex__EltBase swig_types[7] -#define SWIGTYPE_p_Hex__Group swig_types[8] -#define SWIGTYPE_p_Hex__Hex swig_types[9] -#define SWIGTYPE_p_Hex__Hex__EltBase swig_types[10] -#define SWIGTYPE_p_Hex__Hexa swig_types[11] -#define SWIGTYPE_p_Hex__Law swig_types[12] -#define SWIGTYPE_p_Hex__NewShape swig_types[13] -#define SWIGTYPE_p_Hex__Pipe swig_types[14] -#define SWIGTYPE_p_Hex__Propagation swig_types[15] -#define SWIGTYPE_p_Hex__Quad swig_types[16] -#define SWIGTYPE_p_Hex__Shape swig_types[17] -#define SWIGTYPE_p_Hex__Vector swig_types[18] -#define SWIGTYPE_p_Hex__Vertex swig_types[19] -#define SWIGTYPE_p_Hex__XmlWriter swig_types[20] -#define SWIGTYPE_p_a_Hex__DIM3__double swig_types[21] -#define SWIGTYPE_p_allocator_type swig_types[22] -#define SWIGTYPE_p_char swig_types[23] -#define SWIGTYPE_p_const_reference swig_types[24] -#define SWIGTYPE_p_difference_type swig_types[25] -#define SWIGTYPE_p_double swig_types[26] -#define SWIGTYPE_p_int swig_types[27] -#define SWIGTYPE_p_p_PyObject swig_types[28] -#define SWIGTYPE_p_reference swig_types[29] -#define SWIGTYPE_p_size_type swig_types[30] -#define SWIGTYPE_p_std__invalid_argument swig_types[31] -#define SWIGTYPE_p_std__vectorTHex__AssoEdge_p_std__allocatorTHex__AssoEdge_p_t_t swig_types[32] -#define SWIGTYPE_p_std__vectorTHex__EdgeShape_p_std__allocatorTHex__EdgeShape_p_t_t swig_types[33] -#define SWIGTYPE_p_std__vectorTHex__Edge_p_std__allocatorTHex__Edge_p_t_t swig_types[34] -#define SWIGTYPE_p_std__vectorTHex__Edge_p_std__allocatorTHex__Edge_p_t_t__allocator_type swig_types[35] -#define SWIGTYPE_p_std__vectorTHex__EltBase_p_std__allocatorTHex__EltBase_p_t_t swig_types[36] -#define SWIGTYPE_p_std__vectorTHex__FaceShape_p_std__allocatorTHex__FaceShape_p_t_t swig_types[37] -#define SWIGTYPE_p_std__vectorTHex__Hexa_p_std__allocatorTHex__Hexa_p_t_t swig_types[38] -#define SWIGTYPE_p_std__vectorTHex__Hexa_p_std__allocatorTHex__Hexa_p_t_t__allocator_type swig_types[39] -#define SWIGTYPE_p_std__vectorTHex__NewShape_p_std__allocatorTHex__NewShape_p_t_t swig_types[40] -#define SWIGTYPE_p_std__vectorTHex__NewShape_p_std__allocatorTHex__NewShape_p_t_t__allocator_type swig_types[41] -#define SWIGTYPE_p_std__vectorTHex__Quad_p_std__allocatorTHex__Quad_p_t_t swig_types[42] -#define SWIGTYPE_p_std__vectorTHex__Quad_p_std__allocatorTHex__Quad_p_t_t__allocator_type swig_types[43] -#define SWIGTYPE_p_std__vectorTHex__Shape_p_std__allocatorTHex__Shape_p_t_t swig_types[44] -#define SWIGTYPE_p_std__vectorTHex__SubShape_p_std__allocatorTHex__SubShape_p_t_t swig_types[45] -#define SWIGTYPE_p_std__vectorTHex__Vertex_p_std__allocatorTHex__Vertex_p_t_t swig_types[46] -#define SWIGTYPE_p_std__vectorTHex__Vertex_p_std__allocatorTHex__Vertex_p_t_t__allocator_type swig_types[47] -#define SWIGTYPE_p_std__vectorTdouble_std__allocatorTdouble_t_t swig_types[48] -#define SWIGTYPE_p_std__vectorTdouble_std__allocatorTdouble_t_t__allocator_type swig_types[49] -#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t swig_types[50] -#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t__allocator_type swig_types[51] -#define SWIGTYPE_p_std__vectorTstd__string_std__allocatorTstd__string_t_t swig_types[52] -#define SWIGTYPE_p_string swig_types[53] -#define SWIGTYPE_p_swig__PySwigIterator swig_types[54] -#define SWIGTYPE_p_value_type swig_types[55] -#define SWIGTYPE_std__vectorTHex__Edge_p_std__allocatorTHex__Edge_p_t_t__value_type swig_types[56] -#define SWIGTYPE_std__vectorTHex__Hexa_p_std__allocatorTHex__Hexa_p_t_t__value_type swig_types[57] -#define SWIGTYPE_std__vectorTHex__NewShape_p_std__allocatorTHex__NewShape_p_t_t__value_type swig_types[58] -#define SWIGTYPE_std__vectorTHex__Quad_p_std__allocatorTHex__Quad_p_t_t__value_type swig_types[59] -#define SWIGTYPE_std__vectorTHex__Vertex_p_std__allocatorTHex__Vertex_p_t_t__value_type swig_types[60] -static swig_type_info *swig_types[62]; -static swig_module_info swig_module = {swig_types, 61, 0, 0, 0, 0}; +#define SWIGTYPE_p_Hex__Document swig_types[2] +#define SWIGTYPE_p_Hex__Edge swig_types[3] +#define SWIGTYPE_p_Hex__Elements swig_types[4] +#define SWIGTYPE_p_Hex__EltBase swig_types[5] +#define SWIGTYPE_p_Hex__Group swig_types[6] +#define SWIGTYPE_p_Hex__Hex swig_types[7] +#define SWIGTYPE_p_Hex__Hex__EltBase swig_types[8] +#define SWIGTYPE_p_Hex__Hexa swig_types[9] +#define SWIGTYPE_p_Hex__Law swig_types[10] +#define SWIGTYPE_p_Hex__NewShape swig_types[11] +#define SWIGTYPE_p_Hex__Propagation swig_types[12] +#define SWIGTYPE_p_Hex__Quad swig_types[13] +#define SWIGTYPE_p_Hex__Shape swig_types[14] +#define SWIGTYPE_p_Hex__Vector swig_types[15] +#define SWIGTYPE_p_Hex__Vertex swig_types[16] +#define SWIGTYPE_p_Hex__XmlWriter swig_types[17] +#define SWIGTYPE_p_a_Hex__DIM3__double swig_types[18] +#define SWIGTYPE_p_allocator_type swig_types[19] +#define SWIGTYPE_p_char swig_types[20] +#define SWIGTYPE_p_const_reference swig_types[21] +#define SWIGTYPE_p_difference_type swig_types[22] +#define SWIGTYPE_p_double swig_types[23] +#define SWIGTYPE_p_int swig_types[24] +#define SWIGTYPE_p_p_PyObject swig_types[25] +#define SWIGTYPE_p_reference swig_types[26] +#define SWIGTYPE_p_size_type swig_types[27] +#define SWIGTYPE_p_std__invalid_argument swig_types[28] +#define SWIGTYPE_p_std__vectorTHex__AssoEdge_p_std__allocatorTHex__AssoEdge_p_t_t swig_types[29] +#define SWIGTYPE_p_std__vectorTHex__EdgeShape_p_std__allocatorTHex__EdgeShape_p_t_t swig_types[30] +#define SWIGTYPE_p_std__vectorTHex__Edge_p_std__allocatorTHex__Edge_p_t_t swig_types[31] +#define SWIGTYPE_p_std__vectorTHex__Edge_p_std__allocatorTHex__Edge_p_t_t__allocator_type swig_types[32] +#define SWIGTYPE_p_std__vectorTHex__EltBase_p_std__allocatorTHex__EltBase_p_t_t swig_types[33] +#define SWIGTYPE_p_std__vectorTHex__FaceShape_p_std__allocatorTHex__FaceShape_p_t_t swig_types[34] +#define SWIGTYPE_p_std__vectorTHex__Hexa_p_std__allocatorTHex__Hexa_p_t_t swig_types[35] +#define SWIGTYPE_p_std__vectorTHex__Hexa_p_std__allocatorTHex__Hexa_p_t_t__allocator_type swig_types[36] +#define SWIGTYPE_p_std__vectorTHex__NewShape_p_std__allocatorTHex__NewShape_p_t_t swig_types[37] +#define SWIGTYPE_p_std__vectorTHex__NewShape_p_std__allocatorTHex__NewShape_p_t_t__allocator_type swig_types[38] +#define SWIGTYPE_p_std__vectorTHex__Quad_p_std__allocatorTHex__Quad_p_t_t swig_types[39] +#define SWIGTYPE_p_std__vectorTHex__Quad_p_std__allocatorTHex__Quad_p_t_t__allocator_type swig_types[40] +#define SWIGTYPE_p_std__vectorTHex__Shape_p_std__allocatorTHex__Shape_p_t_t swig_types[41] +#define SWIGTYPE_p_std__vectorTHex__SubShape_p_std__allocatorTHex__SubShape_p_t_t swig_types[42] +#define SWIGTYPE_p_std__vectorTHex__Vertex_p_std__allocatorTHex__Vertex_p_t_t swig_types[43] +#define SWIGTYPE_p_std__vectorTHex__Vertex_p_std__allocatorTHex__Vertex_p_t_t__allocator_type swig_types[44] +#define SWIGTYPE_p_std__vectorTdouble_std__allocatorTdouble_t_t swig_types[45] +#define SWIGTYPE_p_std__vectorTdouble_std__allocatorTdouble_t_t__allocator_type swig_types[46] +#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t swig_types[47] +#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t__allocator_type swig_types[48] +#define SWIGTYPE_p_std__vectorTstd__string_std__allocatorTstd__string_t_t swig_types[49] +#define SWIGTYPE_p_string swig_types[50] +#define SWIGTYPE_p_swig__PySwigIterator swig_types[51] +#define SWIGTYPE_p_value_type swig_types[52] +#define SWIGTYPE_std__vectorTHex__Edge_p_std__allocatorTHex__Edge_p_t_t__value_type swig_types[53] +#define SWIGTYPE_std__vectorTHex__Hexa_p_std__allocatorTHex__Hexa_p_t_t__value_type swig_types[54] +#define SWIGTYPE_std__vectorTHex__NewShape_p_std__allocatorTHex__NewShape_p_t_t__value_type swig_types[55] +#define SWIGTYPE_std__vectorTHex__Quad_p_std__allocatorTHex__Quad_p_t_t__value_type swig_types[56] +#define SWIGTYPE_std__vectorTHex__Vertex_p_std__allocatorTHex__Vertex_p_t_t__value_type swig_types[57] +static swig_type_info *swig_types[59]; +static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -2629,7 +2626,6 @@ namespace swig { #include "HexHexa.hxx" #include "HexEdge.hxx" #include "HexVector.hxx" -#include "HexCrossElements.hxx" #include "HexBiCylinder.hxx" #include "HexNewShape.hxx" #include "HexGroup.hxx" @@ -23178,46 +23174,6 @@ fail: } -SWIGINTERN PyObject *_wrap_Document_cut__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - Hex::Edge *arg2 = (Hex::Edge *) 0 ; - int arg3 ; - Hex::Elements *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Document_cut",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_cut" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Edge, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_cut" "', argument " "2"" of type '" "Hex::Edge *""'"); - } - arg2 = reinterpret_cast< Hex::Edge * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Document_cut" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Hex::Elements *)(arg1)->cut(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Elements, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_Document_disconnectQuad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Document *arg1 = (Hex::Document *) 0 ; @@ -24105,50 +24061,6 @@ fail: } -SWIGINTERN PyObject *_wrap_Document_countCylinder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Document_countCylinder",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_countCylinder" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - result = (int)(arg1)->countCylinder(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Document_countPipe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Document_countPipe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_countPipe" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - result = (int)(arg1)->countPipe(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_Document_getHexa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Document *arg1 = (Hex::Document *) 0 ; @@ -24428,68 +24340,6 @@ fail: } -SWIGINTERN PyObject *_wrap_Document_getCylinder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - int arg2 ; - Hex::Cylinder *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Document_getCylinder",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_getCylinder" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_getCylinder" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Hex::Cylinder *)(arg1)->getCylinder(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Cylinder, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Document_getPipe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - int arg2 ; - Hex::Pipe *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Document_getPipe",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_getPipe" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_getPipe" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Hex::Pipe *)(arg1)->getPipe(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Pipe, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_Document_getShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Document *arg1 = (Hex::Document *) 0 ; @@ -24703,7 +24553,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Document_findQuad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Document_findQuad__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Document *arg1 = (Hex::Document *) 0 ; Hex::Vertex *arg2 = (Hex::Vertex *) 0 ; @@ -24743,6 +24593,101 @@ fail: } +SWIGINTERN PyObject *_wrap_Document_findQuad__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Hex::Document *arg1 = (Hex::Document *) 0 ; + Hex::Edge *arg2 = (Hex::Edge *) 0 ; + Hex::Edge *arg3 = (Hex::Edge *) 0 ; + Hex::Quad *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Document_findQuad",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_findQuad" "', argument " "1"" of type '" "Hex::Document *""'"); + } + arg1 = reinterpret_cast< Hex::Document * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Edge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_findQuad" "', argument " "2"" of type '" "Hex::Edge *""'"); + } + arg2 = reinterpret_cast< Hex::Edge * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Hex__Edge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Document_findQuad" "', argument " "3"" of type '" "Hex::Edge *""'"); + } + arg3 = reinterpret_cast< Hex::Edge * >(argp3); + result = (Hex::Quad *)(arg1)->findQuad(arg2,arg3); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Document_findQuad(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Hex__Vertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Hex__Vertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Document_findQuad__SWIG_0(self, args); + } + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Hex__Edge, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Hex__Edge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Document_findQuad__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Document_findQuad'.\n Possible C/C++ prototypes are:\n findQuad(Hex::Vertex *,Hex::Vertex *)\n findQuad(Hex::Edge *,Hex::Edge *)\n"); + return NULL; +} + + SWIGINTERN PyObject *_wrap_Document_findHexa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Document *arg1 = (Hex::Document *) 0 ; @@ -25229,7 +25174,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Document_makeCartesian__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Document_makeCartesian(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Document *arg1 = (Hex::Document *) 0 ; Hex::Vertex *arg2 = (Hex::Vertex *) 0 ; @@ -28029,7 +27974,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Document_cut__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Document_cut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Document *arg1 = (Hex::Document *) 0 ; Hex::Edge *arg2 = (Hex::Edge *) 0 ; @@ -28072,88 +28017,32 @@ fail: } -SWIGINTERN PyObject *_wrap_Document_cut(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; +SWIGINTERN PyObject *_wrap_Document_addGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Hex::Document *arg1 = (Hex::Document *) 0 ; + cpchar arg2 = (cpchar) 0 ; + Hex::EnumGroup arg3 ; + Hex::Group *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 3); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); + if (!PyArg_ParseTuple(args,(char *)"OOO:Document_addGroup",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_addGroup" "', argument " "1"" of type '" "Hex::Document *""'"); } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Hex__Edge, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_std__vectorTdouble_std__allocatorTdouble_t_t, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Document_cut__SWIG_1(self, args); - } - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Hex__Edge, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Document_cut__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Document_cut'.\n Possible C/C++ prototypes are:\n cut(Hex::Edge *,int)\n cut(Hex::Edge *,Hex::RealVector &)\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Document_addGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - cpchar arg2 = (cpchar) 0 ; - Hex::EnumGroup arg3 ; - Hex::Group *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Document_addGroup",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_addGroup" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_addGroup" "', argument " "2"" of type '" "cpchar""'"); + arg1 = reinterpret_cast< Hex::Document * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_addGroup" "', argument " "2"" of type '" "cpchar""'"); } arg2 = reinterpret_cast< cpchar >(buf2); ecode3 = SWIG_AsVal_int(obj2, &val3); @@ -28268,770 +28157,206 @@ fail: } -SWIGINTERN PyObject *_wrap_Document_makeCartesian__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Document_findVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Document *arg1 = (Hex::Document *) 0 ; - Hex::Vertex *arg2 = (Hex::Vertex *) 0 ; - Hex::Vector *arg3 = (Hex::Vector *) 0 ; - int arg4 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - int arg9 ; - Hex::Elements *result = 0 ; + int arg2 ; + Hex::Vertex *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; - int val9 ; - int ecode9 = 0 ; + int val2 ; + int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - PyObject * obj8 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:Document_makeCartesian",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Document_findVertex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_makeCartesian" "', argument " "1"" of type '" "Hex::Document *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_findVertex" "', argument " "1"" of type '" "Hex::Document *""'"); } arg1 = reinterpret_cast< Hex::Document * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Vertex, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_makeCartesian" "', argument " "2"" of type '" "Hex::Vertex *""'"); - } - arg2 = reinterpret_cast< Hex::Vertex * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Hex__Vector, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Document_makeCartesian" "', argument " "3"" of type '" "Hex::Vector *""'"); - } - arg3 = reinterpret_cast< Hex::Vector * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Document_makeCartesian" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Document_makeCartesian" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Document_makeCartesian" "', argument " "6"" of type '" "int""'"); - } - arg6 = static_cast< int >(val6); - ecode7 = SWIG_AsVal_int(obj6, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Document_makeCartesian" "', argument " "7"" of type '" "int""'"); - } - arg7 = static_cast< int >(val7); - ecode8 = SWIG_AsVal_int(obj7, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Document_makeCartesian" "', argument " "8"" of type '" "int""'"); - } - arg8 = static_cast< int >(val8); - ecode9 = SWIG_AsVal_int(obj8, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Document_makeCartesian" "', argument " "9"" of type '" "int""'"); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_findVertex" "', argument " "2"" of type '" "int""'"); } - arg9 = static_cast< int >(val9); - result = (Hex::Elements *)(arg1)->makeCartesian(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Elements, 0 | 0 ); + arg2 = static_cast< int >(val2); + result = (Hex::Vertex *)(arg1)->findVertex(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Vertex, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Document_makeCartesian__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Document_findVertex(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Document_findVertex__SWIG_1(self, args); + } + } + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Document_findVertex__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Document_findVertex'.\n Possible C/C++ prototypes are:\n findVertex(double,double,double)\n findVertex(int)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Document_closeQuads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Document *arg1 = (Hex::Document *) 0 ; - Hex::Vertex *arg2 = (Hex::Vertex *) 0 ; - Hex::Vector *arg3 = (Hex::Vector *) 0 ; - int arg4 ; - int arg5 ; - int arg6 ; - int arg7 ; - int arg8 ; - Hex::Elements *result = 0 ; + Hex::Quad *arg2 = (Hex::Quad *) 0 ; + Hex::Quad *arg3 = (Hex::Quad *) 0 ; + int result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - int val8 ; - int ecode8 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - PyObject * obj7 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:Document_makeCartesian",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:Document_closeQuads",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_makeCartesian" "', argument " "1"" of type '" "Hex::Document *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_closeQuads" "', argument " "1"" of type '" "Hex::Document *""'"); } arg1 = reinterpret_cast< Hex::Document * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Vertex, 0 | 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Quad, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_makeCartesian" "', argument " "2"" of type '" "Hex::Vertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_closeQuads" "', argument " "2"" of type '" "Hex::Quad *""'"); } - arg2 = reinterpret_cast< Hex::Vertex * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Hex__Vector, 0 | 0 ); + arg2 = reinterpret_cast< Hex::Quad * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Hex__Quad, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Document_makeCartesian" "', argument " "3"" of type '" "Hex::Vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Document_closeQuads" "', argument " "3"" of type '" "Hex::Quad *""'"); } - arg3 = reinterpret_cast< Hex::Vector * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Document_makeCartesian" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Document_makeCartesian" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Document_makeCartesian" "', argument " "6"" of type '" "int""'"); - } - arg6 = static_cast< int >(val6); - ecode7 = SWIG_AsVal_int(obj6, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Document_makeCartesian" "', argument " "7"" of type '" "int""'"); - } - arg7 = static_cast< int >(val7); - ecode8 = SWIG_AsVal_int(obj7, &val8); - if (!SWIG_IsOK(ecode8)) { - SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Document_makeCartesian" "', argument " "8"" of type '" "int""'"); - } - arg8 = static_cast< int >(val8); - result = (Hex::Elements *)(arg1)->makeCartesian(arg2,arg3,arg4,arg5,arg6,arg7,arg8); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Elements, 0 | 0 ); + arg3 = reinterpret_cast< Hex::Quad * >(argp3); + result = (int)(arg1)->closeQuads(arg2,arg3); + resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Document_makeCartesian__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - Hex::Vertex *arg2 = (Hex::Vertex *) 0 ; - Hex::Vector *arg3 = (Hex::Vector *) 0 ; - int arg4 ; - int arg5 ; - int arg6 ; - int arg7 ; - Hex::Elements *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - int val7 ; - int ecode7 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:Document_makeCartesian",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_makeCartesian" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Vertex, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_makeCartesian" "', argument " "2"" of type '" "Hex::Vertex *""'"); - } - arg2 = reinterpret_cast< Hex::Vertex * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Hex__Vector, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Document_makeCartesian" "', argument " "3"" of type '" "Hex::Vector *""'"); - } - arg3 = reinterpret_cast< Hex::Vector * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Document_makeCartesian" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Document_makeCartesian" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Document_makeCartesian" "', argument " "6"" of type '" "int""'"); - } - arg6 = static_cast< int >(val6); - ecode7 = SWIG_AsVal_int(obj6, &val7); - if (!SWIG_IsOK(ecode7)) { - SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Document_makeCartesian" "', argument " "7"" of type '" "int""'"); - } - arg7 = static_cast< int >(val7); - result = (Hex::Elements *)(arg1)->makeCartesian(arg2,arg3,arg4,arg5,arg6,arg7); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Elements, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Document_makeCartesian__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Document_addLaw__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Document *arg1 = (Hex::Document *) 0 ; - Hex::Vertex *arg2 = (Hex::Vertex *) 0 ; - Hex::Vector *arg3 = (Hex::Vector *) 0 ; - int arg4 ; - int arg5 ; - int arg6 ; - Hex::Elements *result = 0 ; + Hex::Law *arg2 = (Hex::Law *) 0 ; + Hex::Law *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:Document_makeCartesian",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Document_addLaw",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_makeCartesian" "', argument " "1"" of type '" "Hex::Document *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_addLaw" "', argument " "1"" of type '" "Hex::Document *""'"); } arg1 = reinterpret_cast< Hex::Document * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Vertex, 0 | 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Law, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_makeCartesian" "', argument " "2"" of type '" "Hex::Vertex *""'"); - } - arg2 = reinterpret_cast< Hex::Vertex * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Hex__Vector, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Document_makeCartesian" "', argument " "3"" of type '" "Hex::Vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_addLaw" "', argument " "2"" of type '" "Hex::Law *""'"); } - arg3 = reinterpret_cast< Hex::Vector * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Document_makeCartesian" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Document_makeCartesian" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Document_makeCartesian" "', argument " "6"" of type '" "int""'"); - } - arg6 = static_cast< int >(val6); - result = (Hex::Elements *)(arg1)->makeCartesian(arg2,arg3,arg4,arg5,arg6); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Elements, 0 | 0 ); + arg2 = reinterpret_cast< Hex::Law * >(argp2); + result = (Hex::Law *)(arg1)->addLaw(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Law, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Document_makeCartesian(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_Document_addLaw(PyObject *self, PyObject *args) { int argc; - PyObject *argv[10]; + PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 9); ii++) { + for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } - if (argc == 6) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Hex__Vertex, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Hex__Vector, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[5], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Document_makeCartesian__SWIG_4(self, args); - } - } - } - } - } - } - } - if (argc == 7) { + if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Hex__Vertex, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Hex__Law, 0); _v = SWIG_CheckState(res); if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Hex__Vector, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[5], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[6], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Document_makeCartesian__SWIG_3(self, args); - } - } - } - } - } + return _wrap_Document_addLaw__SWIG_1(self, args); } } } - if (argc == 8) { + if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); _v = SWIG_CheckState(res); if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Hex__Vertex, 0); + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Hex__Vector, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Hex__Vector, 0); + { + int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Hex__Vector, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[5], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[6], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - int res = swig::asptr(argv[7], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Document_makeCartesian__SWIG_0(self, args); - } - } - } - } - } } - } - } - } - if (argc == 8) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Hex__Vertex, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Hex__Vector, 0); - _v = SWIG_CheckState(res); if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[5], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[6], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[7], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Document_makeCartesian__SWIG_2(self, args); - } - } - } - } - } - } - } - } - } - if (argc == 9) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Hex__Vertex, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Hex__Vector, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[5], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[6], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[7], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[8], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Document_makeCartesian__SWIG_1(self, args); - } - } - } - } - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Document_makeCartesian'.\n Possible C/C++ prototypes are:\n makeCartesian(Hex::Vertex *,Hex::Vector *,Hex::Vector *,Hex::Vector *,Hex::RealVector,Hex::RealVector,Hex::RealVector)\n makeCartesian(Hex::Vertex *,Hex::Vector *,int,int,int,int,int,int)\n makeCartesian(Hex::Vertex *,Hex::Vector *,int,int,int,int,int)\n makeCartesian(Hex::Vertex *,Hex::Vector *,int,int,int,int)\n makeCartesian(Hex::Vertex *,Hex::Vector *,int,int,int)\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Document_findVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - int arg2 ; - Hex::Vertex *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Document_findVertex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_findVertex" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_findVertex" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Hex::Vertex *)(arg1)->findVertex(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Vertex, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Document_findVertex(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 4); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Document_findVertex__SWIG_1(self, args); - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_double(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_double(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Document_findVertex__SWIG_0(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Document_findVertex'.\n Possible C/C++ prototypes are:\n findVertex(double,double,double)\n findVertex(int)\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Document_closeQuads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - Hex::Quad *arg2 = (Hex::Quad *) 0 ; - Hex::Quad *arg3 = (Hex::Quad *) 0 ; - int result; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Document_closeQuads",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_closeQuads" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Quad, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_closeQuads" "', argument " "2"" of type '" "Hex::Quad *""'"); - } - arg2 = reinterpret_cast< Hex::Quad * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Hex__Quad, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Document_closeQuads" "', argument " "3"" of type '" "Hex::Quad *""'"); - } - arg3 = reinterpret_cast< Hex::Quad * >(argp3); - result = (int)(arg1)->closeQuads(arg2,arg3); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Document_addLaw__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - Hex::Law *arg2 = (Hex::Law *) 0 ; - Hex::Law *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Document_addLaw",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_addLaw" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Law, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_addLaw" "', argument " "2"" of type '" "Hex::Law *""'"); - } - arg2 = reinterpret_cast< Hex::Law * >(argp2); - result = (Hex::Law *)(arg1)->addLaw(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Law, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Document_addLaw(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 3); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Hex__Law, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Document_addLaw__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Document, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Document_addLaw__SWIG_0(self, args); + return _wrap_Document_addLaw__SWIG_0(self, args); } } } @@ -29053,801 +28378,336 @@ SWIGINTERN PyObject *_wrap_Document_checkAssociations(PyObject *SWIGUNUSEDPARM(s if (!PyArg_ParseTuple(args,(char *)"O:Document_checkAssociations",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_checkAssociations" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - result = (int)(arg1)->checkAssociations(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Document_addShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - long arg2 ; - char *arg3 = (char *) 0 ; - Hex::NewShape *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Document_addShape",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_addShape" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_addShape" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Document_addShape" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = reinterpret_cast< char * >(buf3); - result = (Hex::NewShape *)(arg1)->addShape(arg2,(char const *)arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__NewShape, 0 | 0 ); - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return resultobj; -fail: - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Document(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_Document",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Document" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - delete arg1; - - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Document_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Hex__Document, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_Propagation_getEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; - Hex::Edges *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Propagation_getEdges",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_getEdges" "', argument " "1"" of type '" "Hex::Propagation *""'"); - } - arg1 = reinterpret_cast< Hex::Propagation * >(argp1); - { - Hex::Edges const &_result_ref = (arg1)->getEdges(); - result = (Hex::Edges *) &_result_ref; - } - resultobj = swig::from(static_cast< std::vector > >(*result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Propagation_getLaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; - Hex::Law *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Propagation_getLaw",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_getLaw" "', argument " "1"" of type '" "Hex::Propagation *""'"); - } - arg1 = reinterpret_cast< Hex::Propagation * >(argp1); - result = (Hex::Law *)(arg1)->getLaw(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Law, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Propagation_getWay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; - bool result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Propagation_getWay",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_getWay" "', argument " "1"" of type '" "Hex::Propagation *""'"); - } - arg1 = reinterpret_cast< Hex::Propagation * >(argp1); - result = (bool)(arg1)->getWay(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Propagation_setWay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Propagation_setWay",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_setWay" "', argument " "1"" of type '" "Hex::Propagation *""'"); - } - arg1 = reinterpret_cast< Hex::Propagation * >(argp1); - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Propagation_setWay" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - (arg1)->setWay(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Propagation_setLaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; - Hex::Law *arg2 = (Hex::Law *) 0 ; - int result; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Propagation_setLaw",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_setLaw" "', argument " "1"" of type '" "Hex::Propagation *""'"); - } - arg1 = reinterpret_cast< Hex::Propagation * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Law, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Propagation_setLaw" "', argument " "2"" of type '" "Hex::Law *""'"); - } - arg2 = reinterpret_cast< Hex::Law * >(argp2); - result = (int)(arg1)->setLaw(arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Propagation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - Hex::Propagation *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_Propagation",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Propagation" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - result = (Hex::Propagation *)new Hex::Propagation(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Propagation, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Propagation_saveXml(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; - Hex::XmlWriter *arg2 = (Hex::XmlWriter *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Propagation_saveXml",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_saveXml" "', argument " "1"" of type '" "Hex::Propagation *""'"); - } - arg1 = reinterpret_cast< Hex::Propagation * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__XmlWriter, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Propagation_saveXml" "', argument " "2"" of type '" "Hex::XmlWriter *""'"); - } - arg2 = reinterpret_cast< Hex::XmlWriter * >(argp2); - (arg1)->saveXml(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Propagation_addEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; - Hex::Edge *arg2 = (Hex::Edge *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Propagation_addEdge",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_addEdge" "', argument " "1"" of type '" "Hex::Propagation *""'"); - } - arg1 = reinterpret_cast< Hex::Propagation * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Edge, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Propagation_addEdge" "', argument " "2"" of type '" "Hex::Edge *""'"); - } - arg2 = reinterpret_cast< Hex::Edge * >(argp2); - (arg1)->addEdge(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Propagation_majLaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Propagation_majLaw",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_majLaw" "', argument " "1"" of type '" "Hex::Propagation *""'"); - } - arg1 = reinterpret_cast< Hex::Propagation * >(argp1); - (arg1)->majLaw(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Propagation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_Propagation",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Propagation" "', argument " "1"" of type '" "Hex::Propagation *""'"); - } - arg1 = reinterpret_cast< Hex::Propagation * >(argp1); - delete arg1; - - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Propagation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Hex__Propagation, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_hex_instance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Hex *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":hex_instance")) SWIG_fail; - result = (Hex::Hex *)Hex::hex_instance(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Hex, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Hex_getInstance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Hex *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":Hex_getInstance")) SWIG_fail; - result = (Hex::Hex *)Hex::Hex::getInstance(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Hex, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Hex_countDocument(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; - int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:Hex_countDocument",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_countDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); - } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); - result = (int)(arg1)->countDocument(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Hex_getDocument(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; - int arg2 ; - Hex::Document *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Hex_getDocument",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_getDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); - } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Hex_getDocument" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Hex::Document *)(arg1)->getDocument(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Hex_removeDocument(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; - Hex::Document *arg2 = (Hex::Document *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Hex_removeDocument",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_removeDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); - } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Hex_removeDocument" "', argument " "2"" of type '" "Hex::Document *""'"); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_checkAssociations" "', argument " "1"" of type '" "Hex::Document *""'"); } - arg2 = reinterpret_cast< Hex::Document * >(argp2); - (arg1)->removeDocument(arg2); - resultobj = SWIG_Py_Void(); + arg1 = reinterpret_cast< Hex::Document * >(argp1); + result = (int)(arg1)->checkAssociations(); + resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Hex_addDocument__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Document_addShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; - cpchar arg2 = (cpchar) 0 ; - Hex::Document *result = 0 ; + Hex::Document *arg1 = (Hex::Document *) 0 ; + long arg2 ; + char *arg3 = (char *) 0 ; + Hex::NewShape *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; + long val2 ; + int ecode2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Hex_addDocument",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OOO:Document_addShape",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_addDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_addShape" "', argument " "1"" of type '" "Hex::Document *""'"); } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Hex_addDocument" "', argument " "2"" of type '" "cpchar""'"); + arg1 = reinterpret_cast< Hex::Document * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_addShape" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Document_addShape" "', argument " "3"" of type '" "char const *""'"); } - arg2 = reinterpret_cast< cpchar >(buf2); - result = (Hex::Document *)(arg1)->addDocument(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + arg3 = reinterpret_cast< char * >(buf3); + result = (Hex::NewShape *)(arg1)->addShape(arg2,(char const *)arg3); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__NewShape, 0 | 0 ); + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return NULL; } -SWIGINTERN PyObject *_wrap_Hex_addDocument__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_Document(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; - Hex::Document *result = 0 ; + Hex::Document *arg1 = (Hex::Document *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:Hex_addDocument",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:delete_Document",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_addDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Document" "', argument " "1"" of type '" "Hex::Document *""'"); } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); - result = (Hex::Document *)(arg1)->addDocument(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Document * >(argp1); + delete arg1; + + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Hex_addDocument(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; +SWIGINTERN PyObject *Document_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Hex__Document, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Propagation_getEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; + Hex::Edges *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 2); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Hex, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Hex_addDocument__SWIG_1(self, args); - } + if (!PyArg_ParseTuple(args,(char *)"O:Propagation_getEdges",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_getEdges" "', argument " "1"" of type '" "Hex::Propagation *""'"); } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Hex, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Hex_addDocument__SWIG_0(self, args); - } - } + arg1 = reinterpret_cast< Hex::Propagation * >(argp1); + { + Hex::Edges const &_result_ref = (arg1)->getEdges(); + result = (Hex::Edges *) &_result_ref; } - + resultobj = swig::from(static_cast< std::vector > >(*result)); + return resultobj; fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Hex_addDocument'.\n Possible C/C++ prototypes are:\n addDocument(cpchar)\n addDocument()\n"); return NULL; } -SWIGINTERN PyObject *_wrap_Hex_loadDocument(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Propagation_getLaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; - cpchar arg2 = (cpchar) 0 ; - Hex::Document *result = 0 ; + Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; + Hex::Law *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Hex_loadDocument",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:Propagation_getLaw",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_loadDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); - } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Hex_loadDocument" "', argument " "2"" of type '" "cpchar""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_getLaw" "', argument " "1"" of type '" "Hex::Propagation *""'"); } - arg2 = reinterpret_cast< cpchar >(buf2); - result = (Hex::Document *)(arg1)->loadDocument(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + arg1 = reinterpret_cast< Hex::Propagation * >(argp1); + result = (Hex::Law *)(arg1)->getLaw(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Law, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } -SWIGINTERN PyObject *_wrap_Hex_findDocument__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Propagation_getWay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; - cpchar arg2 = (cpchar) 0 ; - Hex::Document *result = 0 ; + Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; + bool result; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Hex_findDocument",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:Propagation_getWay",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_findDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); - } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Hex_findDocument" "', argument " "2"" of type '" "cpchar""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_getWay" "', argument " "1"" of type '" "Hex::Propagation *""'"); } - arg2 = reinterpret_cast< cpchar >(buf2); - result = (Hex::Document *)(arg1)->findDocument(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + arg1 = reinterpret_cast< Hex::Propagation * >(argp1); + result = (bool)(arg1)->getWay(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } -SWIGINTERN PyObject *_wrap_Hex_findDocument__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Propagation_setWay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; - string *arg2 = 0 ; - Hex::Document *result = 0 ; + Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; + bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; + bool val2 ; + int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Hex_findDocument",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Propagation_setWay",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_findDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); - } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_string, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Hex_findDocument" "', argument " "2"" of type '" "string const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Hex_findDocument" "', argument " "2"" of type '" "string const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_setWay" "', argument " "1"" of type '" "Hex::Propagation *""'"); } - arg2 = reinterpret_cast< string * >(argp2); - result = (Hex::Document *)(arg1)->findDocument((string const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Propagation * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Propagation_setWay" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + (arg1)->setWay(arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Hex_findDocument(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 2); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Hex, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_string, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Hex_findDocument__SWIG_1(self, args); - } - } +SWIGINTERN PyObject *_wrap_Propagation_setLaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; + Hex::Law *arg2 = (Hex::Law *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Propagation_setLaw",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_setLaw" "', argument " "1"" of type '" "Hex::Propagation *""'"); } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Hex, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Hex_findDocument__SWIG_0(self, args); - } - } + arg1 = reinterpret_cast< Hex::Propagation * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Law, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Propagation_setLaw" "', argument " "2"" of type '" "Hex::Law *""'"); } - + arg2 = reinterpret_cast< Hex::Law * >(argp2); + result = (int)(arg1)->setLaw(arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Hex_findDocument'.\n Possible C/C++ prototypes are:\n findDocument(cpchar)\n findDocument(string const &)\n"); return NULL; } -SWIGINTERN PyObject *_wrap_Hex_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_new_Propagation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; + Hex::Document *arg1 = (Hex::Document *) 0 ; + Hex::Propagation *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:Hex_what",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:new_Propagation",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_what" "', argument " "1"" of type '" "Hex::Hex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Propagation" "', argument " "1"" of type '" "Hex::Document *""'"); } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); - (arg1)->what(); - resultobj = SWIG_Py_Void(); + arg1 = reinterpret_cast< Hex::Document * >(argp1); + result = (Hex::Propagation *)new Hex::Propagation(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Propagation, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Hex_sizeofMessage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Propagation_saveXml(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; - int result; + Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; + Hex::XmlWriter *arg2 = (Hex::XmlWriter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:Hex_sizeofMessage",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Propagation_saveXml",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_sizeofMessage" "', argument " "1"" of type '" "Hex::Hex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_saveXml" "', argument " "1"" of type '" "Hex::Propagation *""'"); } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); - result = (int)(arg1)->sizeofMessage(); - resultobj = SWIG_From_int(static_cast< int >(result)); + arg1 = reinterpret_cast< Hex::Propagation * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__XmlWriter, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Propagation_saveXml" "', argument " "2"" of type '" "Hex::XmlWriter *""'"); + } + arg2 = reinterpret_cast< Hex::XmlWriter * >(argp2); + (arg1)->saveXml(arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Hex_getMessageLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Propagation_addEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; - int arg2 ; - cpchar result; + Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; + Hex::Edge *arg2 = (Hex::Edge *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Hex_getMessageLine",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Propagation_addEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_getMessageLine" "', argument " "1"" of type '" "Hex::Hex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_addEdge" "', argument " "1"" of type '" "Hex::Propagation *""'"); } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Hex_getMessageLine" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (cpchar)(arg1)->getMessageLine(arg2); - resultobj = SWIG_FromCharPtr((const char *)result); + arg1 = reinterpret_cast< Hex::Propagation * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Edge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Propagation_addEdge" "', argument " "2"" of type '" "Hex::Edge *""'"); + } + arg2 = reinterpret_cast< Hex::Edge * >(argp2); + (arg1)->addEdge(arg2); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_new_Hex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Propagation_majLaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Hex *result = 0 ; + Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)":new_Hex")) SWIG_fail; - result = (Hex::Hex *)new Hex::Hex(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Hex, SWIG_POINTER_NEW | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:Propagation_majLaw",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Propagation_majLaw" "', argument " "1"" of type '" "Hex::Propagation *""'"); + } + arg1 = reinterpret_cast< Hex::Propagation * >(argp1); + (arg1)->majLaw(); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_Hex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_Propagation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Hex *arg1 = (Hex::Hex *) 0 ; + Hex::Propagation *arg1 = (Hex::Propagation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:delete_Hex",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, SWIG_POINTER_DISOWN | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:delete_Propagation",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Propagation, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Hex" "', argument " "1"" of type '" "Hex::Hex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Propagation" "', argument " "1"" of type '" "Hex::Propagation *""'"); } - arg1 = reinterpret_cast< Hex::Hex * >(argp1); + arg1 = reinterpret_cast< Hex::Propagation * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); @@ -29857,30 +28717,66 @@ fail: } -SWIGINTERN PyObject *Hex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *Propagation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Hex__Hex, SWIG_NewClientData(obj)); + SWIG_TypeNewClientData(SWIGTYPE_p_Hex__Propagation, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } -SWIGINTERN PyObject *_wrap_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_hex_instance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; + Hex::Hex *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)":what")) SWIG_fail; - Hex::what(); - resultobj = SWIG_Py_Void(); + if (!PyArg_ParseTuple(args,(char *)":hex_instance")) SWIG_fail; + result = (Hex::Hex *)Hex::hex_instance(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Hex, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getHexa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Hex_getInstance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; + Hex::Hex *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":Hex_getInstance")) SWIG_fail; + result = (Hex::Hex *)Hex::Hex::getInstance(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Hex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Hex_countDocument(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Hex_countDocument",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_countDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); + } + arg1 = reinterpret_cast< Hex::Hex * >(argp1); + result = (int)(arg1)->countDocument(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Hex_getDocument(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; int arg2 ; - Hex::Hexa *result = 0 ; + Hex::Document *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -29888,805 +28784,799 @@ SWIGINTERN PyObject *_wrap_Elements_getHexa(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Elements_getHexa",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Hex_getDocument",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getHexa" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_getDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); + arg1 = reinterpret_cast< Hex::Hex * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getHexa" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Hex_getDocument" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); - result = (Hex::Hexa *)(arg1)->getHexa(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Hexa, 0 | 0 ); + result = (Hex::Document *)(arg1)->getDocument(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getQuad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Hex_removeDocument(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int arg2 ; - Hex::Quad *result = 0 ; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; + Hex::Document *arg2 = (Hex::Document *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Elements_getQuad",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Hex_removeDocument",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getQuad" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_removeDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); + } + arg1 = reinterpret_cast< Hex::Hex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Document, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Hex_removeDocument" "', argument " "2"" of type '" "Hex::Document *""'"); + } + arg2 = reinterpret_cast< Hex::Document * >(argp2); + (arg1)->removeDocument(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Hex_addDocument__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; + cpchar arg2 = (cpchar) 0 ; + Hex::Document *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Hex_addDocument",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_addDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); + } + arg1 = reinterpret_cast< Hex::Hex * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Hex_addDocument" "', argument " "2"" of type '" "cpchar""'"); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getQuad" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Hex::Quad *)(arg1)->getQuad(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); + arg2 = reinterpret_cast< cpchar >(buf2); + result = (Hex::Document *)(arg1)->addDocument(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Hex_addDocument__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int arg2 ; - Hex::Edge *result = 0 ; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; + Hex::Document *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Elements_getEdge",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:Hex_addDocument",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getEdge" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_addDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getEdge" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Hex::Edge *)(arg1)->getEdge(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Edge, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Hex * >(argp1); + result = (Hex::Document *)(arg1)->addDocument(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int arg2 ; - Hex::Vertex *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; +SWIGINTERN PyObject *_wrap_Hex_addDocument(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; - if (!PyArg_ParseTuple(args,(char *)"OO:Elements_getVertex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getVertex" "', argument " "1"" of type '" "Hex::Elements *""'"); + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getVertex" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Hex::Vertex *)(arg1)->getVertex(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Vertex, 0 | 0 ); - return resultobj; + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Hex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Hex_addDocument__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Hex, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Hex_addDocument__SWIG_0(self, args); + } + } + } + fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Hex_addDocument'.\n Possible C/C++ prototypes are:\n addDocument(cpchar)\n addDocument()\n"); return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getHexaIJK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Hex_loadDocument(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - Hex::Hexa *result = 0 ; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; + cpchar arg2 = (cpchar) 0 ; + Hex::Document *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getHexaIJK",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Hex_loadDocument",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getHexaIJK" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_loadDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getHexaIJK" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getHexaIJK" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getHexaIJK" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (Hex::Hexa *)(arg1)->getHexaIJK(arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Hexa, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Hex * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Hex_loadDocument" "', argument " "2"" of type '" "cpchar""'"); + } + arg2 = reinterpret_cast< cpchar >(buf2); + result = (Hex::Document *)(arg1)->loadDocument(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getQuadIJ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Hex_findDocument__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - Hex::Quad *result = 0 ; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; + cpchar arg2 = (cpchar) 0 ; + Hex::Document *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getQuadIJ",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Hex_findDocument",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getQuadIJ" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_findDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getQuadIJ" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getQuadIJ" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getQuadIJ" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (Hex::Quad *)(arg1)->getQuadIJ(arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Hex * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Hex_findDocument" "', argument " "2"" of type '" "cpchar""'"); + } + arg2 = reinterpret_cast< cpchar >(buf2); + result = (Hex::Document *)(arg1)->findDocument(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getQuadJK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Hex_findDocument__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - Hex::Quad *result = 0 ; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; + string *arg2 = 0 ; + Hex::Document *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getQuadJK",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Hex_findDocument",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getQuadJK" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_findDocument" "', argument " "1"" of type '" "Hex::Hex *""'"); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getQuadJK" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getQuadJK" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getQuadJK" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (Hex::Quad *)(arg1)->getQuadJK(arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Hex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_string, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Hex_findDocument" "', argument " "2"" of type '" "string const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Hex_findDocument" "', argument " "2"" of type '" "string const &""'"); + } + arg2 = reinterpret_cast< string * >(argp2); + result = (Hex::Document *)(arg1)->findDocument((string const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getQuadIK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - Hex::Quad *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; +SWIGINTERN PyObject *_wrap_Hex_findDocument(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; - if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getQuadIK",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getQuadIK" "', argument " "1"" of type '" "Hex::Elements *""'"); + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getQuadIK" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getQuadIK" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getQuadIK" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (Hex::Quad *)(arg1)->getQuadIK(arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); - return resultobj; + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Hex, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_string, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Hex_findDocument__SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Hex__Hex, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Hex_findDocument__SWIG_0(self, args); + } + } + } + fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Hex_findDocument'.\n Possible C/C++ prototypes are:\n findDocument(cpchar)\n findDocument(string const &)\n"); return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getEdgeI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Hex_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - Hex::Edge *result = 0 ; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getEdgeI",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:Hex_what",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getEdgeI" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_what" "', argument " "1"" of type '" "Hex::Hex *""'"); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getEdgeI" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getEdgeI" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getEdgeI" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (Hex::Edge *)(arg1)->getEdgeI(arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Edge, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Hex * >(argp1); + (arg1)->what(); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getEdgeJ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Hex_sizeofMessage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - Hex::Edge *result = 0 ; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; + int result; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getEdgeJ",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:Hex_sizeofMessage",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getEdgeJ" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_sizeofMessage" "', argument " "1"" of type '" "Hex::Hex *""'"); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getEdgeJ" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getEdgeJ" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getEdgeJ" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (Hex::Edge *)(arg1)->getEdgeJ(arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Edge, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Hex * >(argp1); + result = (int)(arg1)->sizeofMessage(); + resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getEdgeK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Hex_getMessageLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; int arg2 ; - int arg3 ; - int arg4 ; - Hex::Edge *result = 0 ; + cpchar result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getEdgeK",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Hex_getMessageLine",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getEdgeK" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Hex_getMessageLine" "', argument " "1"" of type '" "Hex::Hex *""'"); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); + arg1 = reinterpret_cast< Hex::Hex * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getEdgeK" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Hex_getMessageLine" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getEdgeK" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getEdgeK" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (Hex::Edge *)(arg1)->getEdgeK(arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Edge, 0 | 0 ); + result = (cpchar)(arg1)->getMessageLine(arg2); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_getVertexIJK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_new_Hex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - Hex::Vertex *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; + Hex::Hex *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getVertexIJK",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getVertexIJK" "', argument " "1"" of type '" "Hex::Elements *""'"); - } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getVertexIJK" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getVertexIJK" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getVertexIJK" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (Hex::Vertex *)(arg1)->getVertexIJK(arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Vertex, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)":new_Hex")) SWIG_fail; + result = (Hex::Hex *)new Hex::Hex(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Hex, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_countHexa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_Hex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int result; + Hex::Hex *arg1 = (Hex::Hex *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:Elements_countHexa",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:delete_Hex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Hex, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_countHexa" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Hex" "', argument " "1"" of type '" "Hex::Hex *""'"); } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - result = (int)(arg1)->countHexa(); - resultobj = SWIG_From_int(static_cast< int >(result)); + arg1 = reinterpret_cast< Hex::Hex * >(argp1); + delete arg1; + + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_countQuad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *Hex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Hex__Hex, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_what(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:Elements_countQuad",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_countQuad" "', argument " "1"" of type '" "Hex::Elements *""'"); - } - arg1 = reinterpret_cast< Hex::Elements * >(argp1); - result = (int)(arg1)->countQuad(); - resultobj = SWIG_From_int(static_cast< int >(result)); + if (!PyArg_ParseTuple(args,(char *)":what")) SWIG_fail; + Hex::what(); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_countEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getHexa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int result; + int arg2 ; + Hex::Hexa *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:Elements_countEdge",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Elements_getHexa",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_countEdge" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getHexa" "', argument " "1"" of type '" "Hex::Elements *""'"); } arg1 = reinterpret_cast< Hex::Elements * >(argp1); - result = (int)(arg1)->countEdge(); - resultobj = SWIG_From_int(static_cast< int >(result)); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getHexa" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (Hex::Hexa *)(arg1)->getHexa(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Hexa, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_countVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getQuad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Elements *arg1 = (Hex::Elements *) 0 ; - int result; + int arg2 ; + Hex::Quad *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:Elements_countVertex",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Elements_getQuad",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_countVertex" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getQuad" "', argument " "1"" of type '" "Hex::Elements *""'"); } arg1 = reinterpret_cast< Hex::Elements * >(argp1); - result = (int)(arg1)->countVertex(); - resultobj = SWIG_From_int(static_cast< int >(result)); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getQuad" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (Hex::Quad *)(arg1)->getQuad(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_nearestVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Elements *arg1 = (Hex::Elements *) 0 ; - Hex::Vertex *arg2 = (Hex::Vertex *) 0 ; - Hex::Vertex *result = 0 ; + int arg2 ; + Hex::Edge *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; + int val2 ; + int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Elements_nearestVertex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Elements_getEdge",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_nearestVertex" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getEdge" "', argument " "1"" of type '" "Hex::Elements *""'"); } arg1 = reinterpret_cast< Hex::Elements * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Vertex, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Elements_nearestVertex" "', argument " "2"" of type '" "Hex::Vertex *""'"); - } - arg2 = reinterpret_cast< Hex::Vertex * >(argp2); - result = (Hex::Vertex *)(arg1)->nearestVertex(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Vertex, 0 | 0 ); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getEdge" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (Hex::Edge *)(arg1)->getEdge(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Edge, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_findVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Elements *arg1 = (Hex::Elements *) 0 ; - Hex::Vertex *arg2 = (Hex::Vertex *) 0 ; - int result; + int arg2 ; + Hex::Vertex *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; + int val2 ; + int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Elements_findVertex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Elements_getVertex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_findVertex" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getVertex" "', argument " "1"" of type '" "Hex::Elements *""'"); } arg1 = reinterpret_cast< Hex::Elements * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Vertex, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Elements_findVertex" "', argument " "2"" of type '" "Hex::Vertex *""'"); - } - arg2 = reinterpret_cast< Hex::Vertex * >(argp2); - result = (int)(arg1)->findVertex(arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getVertex" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (Hex::Vertex *)(arg1)->getVertex(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Vertex, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_clearAssociation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getHexaIJK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Elements *arg1 = (Hex::Elements *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + Hex::Hexa *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:Elements_clearAssociation",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getHexaIJK",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_clearAssociation" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getHexaIJK" "', argument " "1"" of type '" "Hex::Elements *""'"); } arg1 = reinterpret_cast< Hex::Elements * >(argp1); - (arg1)->clearAssociation(); - resultobj = SWIG_Py_Void(); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getHexaIJK" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getHexaIJK" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getHexaIJK" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (Hex::Hexa *)(arg1)->getHexaIJK(arg2,arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Hexa, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Elements_saveVtk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getQuadIJ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Elements *arg1 = (Hex::Elements *) 0 ; - cpchar arg2 = (cpchar) 0 ; - int result; + int arg2 ; + int arg3 ; + int arg4 ; + Hex::Quad *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Elements_saveVtk",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getQuadIJ",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_saveVtk" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getQuadIJ" "', argument " "1"" of type '" "Hex::Elements *""'"); } arg1 = reinterpret_cast< Hex::Elements * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Elements_saveVtk" "', argument " "2"" of type '" "cpchar""'"); - } - arg2 = reinterpret_cast< cpchar >(buf2); - result = (int)(arg1)->saveVtk(arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getQuadIJ" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getQuadIJ" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getQuadIJ" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (Hex::Quad *)(arg1)->getQuadIJ(arg2,arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); return resultobj; fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } -SWIGINTERN PyObject *_wrap_new_Elements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getQuadJK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - Hex::Elements *result = 0 ; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + Hex::Quad *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:new_Elements",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getQuadJK",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Elements" "', argument " "1"" of type '" "Hex::Document *""'"); - } - arg1 = reinterpret_cast< Hex::Document * >(argp1); - result = (Hex::Elements *)new Hex::Elements(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Elements, SWIG_POINTER_NEW | 0 ); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getQuadJK" "', argument " "1"" of type '" "Hex::Elements *""'"); + } + arg1 = reinterpret_cast< Hex::Elements * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getQuadJK" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getQuadJK" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getQuadJK" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (Hex::Quad *)(arg1)->getQuadJK(arg2,arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_Elements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getQuadIK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Hex::Elements *arg1 = (Hex::Elements *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + Hex::Quad *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:delete_Elements",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, SWIG_POINTER_DISOWN | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getQuadIK",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Elements" "', argument " "1"" of type '" "Hex::Elements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getQuadIK" "', argument " "1"" of type '" "Hex::Elements *""'"); } arg1 = reinterpret_cast< Hex::Elements * >(argp1); - delete arg1; - - resultobj = SWIG_Py_Void(); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getQuadIK" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getQuadIK" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getQuadIK" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (Hex::Quad *)(arg1)->getQuadIK(arg2,arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *Elements_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Hex__Elements, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_CrossElements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getEdgeI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::Document *arg1 = (Hex::Document *) 0 ; - Hex::EnumGrid arg2 ; - Hex::CrossElements *result = 0 ; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + Hex::Edge *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:new_CrossElements",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getEdgeI",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CrossElements" "', argument " "1"" of type '" "Hex::Document *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getEdgeI" "', argument " "1"" of type '" "Hex::Elements *""'"); } - arg1 = reinterpret_cast< Hex::Document * >(argp1); + arg1 = reinterpret_cast< Hex::Elements * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CrossElements" "', argument " "2"" of type '" "Hex::EnumGrid""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getEdgeI" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getEdgeI" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getEdgeI" "', argument " "4"" of type '" "int""'"); } - arg2 = static_cast< Hex::EnumGrid >(val2); - result = (Hex::CrossElements *)new Hex::CrossElements(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__CrossElements, SWIG_POINTER_NEW | 0 ); + arg4 = static_cast< int >(val4); + result = (Hex::Edge *)(arg1)->getEdgeI(arg2,arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Edge, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_CrossElements_getHexaIJK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getEdgeJ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::CrossElements *arg1 = (Hex::CrossElements *) 0 ; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; int arg2 ; int arg3 ; int arg4 ; - int arg5 ; - Hex::Hexa *result = 0 ; + Hex::Edge *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -30695,56 +29585,47 @@ SWIGINTERN PyObject *_wrap_CrossElements_getHexaIJK(PyObject *SWIGUNUSEDPARM(sel int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:CrossElements_getHexaIJK",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__CrossElements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getEdgeJ",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CrossElements_getHexaIJK" "', argument " "1"" of type '" "Hex::CrossElements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getEdgeJ" "', argument " "1"" of type '" "Hex::Elements *""'"); } - arg1 = reinterpret_cast< Hex::CrossElements * >(argp1); + arg1 = reinterpret_cast< Hex::Elements * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CrossElements_getHexaIJK" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getEdgeJ" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CrossElements_getHexaIJK" "', argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getEdgeJ" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CrossElements_getHexaIJK" "', argument " "4"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getEdgeJ" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CrossElements_getHexaIJK" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - result = (Hex::Hexa *)(arg1)->getHexaIJK(arg2,arg3,arg4,arg5); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Hexa, 0 | 0 ); + result = (Hex::Edge *)(arg1)->getEdgeJ(arg2,arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Edge, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_CrossElements_getQuadIJ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getEdgeK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::CrossElements *arg1 = (Hex::CrossElements *) 0 ; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; int arg2 ; int arg3 ; int arg4 ; - int arg5 ; - Hex::Quad *result = 0 ; + Hex::Edge *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -30753,56 +29634,47 @@ SWIGINTERN PyObject *_wrap_CrossElements_getQuadIJ(PyObject *SWIGUNUSEDPARM(self int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:CrossElements_getQuadIJ",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__CrossElements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getEdgeK",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CrossElements_getQuadIJ" "', argument " "1"" of type '" "Hex::CrossElements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getEdgeK" "', argument " "1"" of type '" "Hex::Elements *""'"); } - arg1 = reinterpret_cast< Hex::CrossElements * >(argp1); + arg1 = reinterpret_cast< Hex::Elements * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CrossElements_getQuadIJ" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getEdgeK" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CrossElements_getQuadIJ" "', argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getEdgeK" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CrossElements_getQuadIJ" "', argument " "4"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getEdgeK" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CrossElements_getQuadIJ" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - result = (Hex::Quad *)(arg1)->getQuadIJ(arg2,arg3,arg4,arg5); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); + result = (Hex::Edge *)(arg1)->getEdgeK(arg2,arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Edge, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_CrossElements_getQuadJK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_getVertexIJK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::CrossElements *arg1 = (Hex::CrossElements *) 0 ; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; int arg2 ; int arg3 ; int arg4 ; - int arg5 ; - Hex::Quad *result = 0 ; + Hex::Vertex *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -30811,351 +29683,280 @@ SWIGINTERN PyObject *_wrap_CrossElements_getQuadJK(PyObject *SWIGUNUSEDPARM(self int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:CrossElements_getQuadJK",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__CrossElements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OOOO:Elements_getVertexIJK",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CrossElements_getQuadJK" "', argument " "1"" of type '" "Hex::CrossElements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_getVertexIJK" "', argument " "1"" of type '" "Hex::Elements *""'"); } - arg1 = reinterpret_cast< Hex::CrossElements * >(argp1); + arg1 = reinterpret_cast< Hex::Elements * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CrossElements_getQuadJK" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Elements_getVertexIJK" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CrossElements_getQuadJK" "', argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Elements_getVertexIJK" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CrossElements_getQuadJK" "', argument " "4"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Elements_getVertexIJK" "', argument " "4"" of type '" "int""'"); } arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CrossElements_getQuadJK" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - result = (Hex::Quad *)(arg1)->getQuadJK(arg2,arg3,arg4,arg5); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); + result = (Hex::Vertex *)(arg1)->getVertexIJK(arg2,arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Vertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Elements_countHexa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Elements_countHexa",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_countHexa" "', argument " "1"" of type '" "Hex::Elements *""'"); + } + arg1 = reinterpret_cast< Hex::Elements * >(argp1); + result = (int)(arg1)->countHexa(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Elements_countQuad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Elements_countQuad",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_countQuad" "', argument " "1"" of type '" "Hex::Elements *""'"); + } + arg1 = reinterpret_cast< Hex::Elements * >(argp1); + result = (int)(arg1)->countQuad(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Elements_countEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Elements_countEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_countEdge" "', argument " "1"" of type '" "Hex::Elements *""'"); + } + arg1 = reinterpret_cast< Hex::Elements * >(argp1); + result = (int)(arg1)->countEdge(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Elements_countVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Elements_countVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_countVertex" "', argument " "1"" of type '" "Hex::Elements *""'"); + } + arg1 = reinterpret_cast< Hex::Elements * >(argp1); + result = (int)(arg1)->countVertex(); + resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_CrossElements_getQuadIK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_nearestVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::CrossElements *arg1 = (Hex::CrossElements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - int arg5 ; - Hex::Quad *result = 0 ; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; + Hex::Vertex *arg2 = (Hex::Vertex *) 0 ; + Hex::Vertex *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:CrossElements_getQuadIK",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__CrossElements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Elements_nearestVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CrossElements_getQuadIK" "', argument " "1"" of type '" "Hex::CrossElements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_nearestVertex" "', argument " "1"" of type '" "Hex::Elements *""'"); } - arg1 = reinterpret_cast< Hex::CrossElements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CrossElements_getQuadIK" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CrossElements_getQuadIK" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CrossElements_getQuadIK" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CrossElements_getQuadIK" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - result = (Hex::Quad *)(arg1)->getQuadIK(arg2,arg3,arg4,arg5); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Quad, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Elements * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Vertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Elements_nearestVertex" "', argument " "2"" of type '" "Hex::Vertex *""'"); + } + arg2 = reinterpret_cast< Hex::Vertex * >(argp2); + result = (Hex::Vertex *)(arg1)->nearestVertex(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Vertex, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_CrossElements_getEdgeI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_findVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::CrossElements *arg1 = (Hex::CrossElements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - int arg5 ; - Hex::Edge *result = 0 ; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; + Hex::Vertex *arg2 = (Hex::Vertex *) 0 ; + int result; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:CrossElements_getEdgeI",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__CrossElements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Elements_findVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CrossElements_getEdgeI" "', argument " "1"" of type '" "Hex::CrossElements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_findVertex" "', argument " "1"" of type '" "Hex::Elements *""'"); } - arg1 = reinterpret_cast< Hex::CrossElements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CrossElements_getEdgeI" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CrossElements_getEdgeI" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CrossElements_getEdgeI" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CrossElements_getEdgeI" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - result = (Hex::Edge *)(arg1)->getEdgeI(arg2,arg3,arg4,arg5); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Edge, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Elements * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Hex__Vertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Elements_findVertex" "', argument " "2"" of type '" "Hex::Vertex *""'"); + } + arg2 = reinterpret_cast< Hex::Vertex * >(argp2); + result = (int)(arg1)->findVertex(arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_CrossElements_getEdgeJ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_clearAssociation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::CrossElements *arg1 = (Hex::CrossElements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - int arg5 ; - Hex::Edge *result = 0 ; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:CrossElements_getEdgeJ",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__CrossElements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:Elements_clearAssociation",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CrossElements_getEdgeJ" "', argument " "1"" of type '" "Hex::CrossElements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_clearAssociation" "', argument " "1"" of type '" "Hex::Elements *""'"); } - arg1 = reinterpret_cast< Hex::CrossElements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CrossElements_getEdgeJ" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CrossElements_getEdgeJ" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CrossElements_getEdgeJ" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CrossElements_getEdgeJ" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - result = (Hex::Edge *)(arg1)->getEdgeJ(arg2,arg3,arg4,arg5); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Edge, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Elements * >(argp1); + (arg1)->clearAssociation(); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_CrossElements_getEdgeK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Elements_saveVtk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::CrossElements *arg1 = (Hex::CrossElements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - int arg5 ; - Hex::Edge *result = 0 ; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; + cpchar arg2 = (cpchar) 0 ; + int result; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:CrossElements_getEdgeK",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__CrossElements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"OO:Elements_saveVtk",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CrossElements_getEdgeK" "', argument " "1"" of type '" "Hex::CrossElements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Elements_saveVtk" "', argument " "1"" of type '" "Hex::Elements *""'"); } - arg1 = reinterpret_cast< Hex::CrossElements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CrossElements_getEdgeK" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CrossElements_getEdgeK" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CrossElements_getEdgeK" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CrossElements_getEdgeK" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - result = (Hex::Edge *)(arg1)->getEdgeK(arg2,arg3,arg4,arg5); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Edge, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Elements * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Elements_saveVtk" "', argument " "2"" of type '" "cpchar""'"); + } + arg2 = reinterpret_cast< cpchar >(buf2); + result = (int)(arg1)->saveVtk(arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } -SWIGINTERN PyObject *_wrap_CrossElements_getVertexIJK(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_new_Elements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::CrossElements *arg1 = (Hex::CrossElements *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - int arg5 ; - Hex::Vertex *result = 0 ; + Hex::Document *arg1 = (Hex::Document *) 0 ; + Hex::Elements *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:CrossElements_getVertexIJK",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__CrossElements, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:new_Elements",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Document, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CrossElements_getVertexIJK" "', argument " "1"" of type '" "Hex::CrossElements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Elements" "', argument " "1"" of type '" "Hex::Document *""'"); } - arg1 = reinterpret_cast< Hex::CrossElements * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CrossElements_getVertexIJK" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CrossElements_getVertexIJK" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CrossElements_getVertexIJK" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CrossElements_getVertexIJK" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - result = (Hex::Vertex *)(arg1)->getVertexIJK(arg2,arg3,arg4,arg5); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Vertex, 0 | 0 ); + arg1 = reinterpret_cast< Hex::Document * >(argp1); + result = (Hex::Elements *)new Hex::Elements(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Elements, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_delete_CrossElements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_delete_Elements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - Hex::CrossElements *arg1 = (Hex::CrossElements *) 0 ; + Hex::Elements *arg1 = (Hex::Elements *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:delete_CrossElements",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__CrossElements, SWIG_POINTER_DISOWN | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:delete_Elements",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Elements, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CrossElements" "', argument " "1"" of type '" "Hex::CrossElements *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Elements" "', argument " "1"" of type '" "Hex::Elements *""'"); } - arg1 = reinterpret_cast< Hex::CrossElements * >(argp1); + arg1 = reinterpret_cast< Hex::Elements * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); @@ -31165,10 +29966,10 @@ fail: } -SWIGINTERN PyObject *CrossElements_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *Elements_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Hex__CrossElements, SWIG_NewClientData(obj)); + SWIG_TypeNewClientData(SWIGTYPE_p_Hex__Elements, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -32801,8 +31602,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Document_countUsedQuad", _wrap_Document_countUsedQuad, METH_VARARGS, NULL}, { (char *)"Document_countUsedEdge", _wrap_Document_countUsedEdge, METH_VARARGS, NULL}, { (char *)"Document_countUsedVertex", _wrap_Document_countUsedVertex, METH_VARARGS, NULL}, - { (char *)"Document_countCylinder", _wrap_Document_countCylinder, METH_VARARGS, NULL}, - { (char *)"Document_countPipe", _wrap_Document_countPipe, METH_VARARGS, NULL}, { (char *)"Document_getHexa", _wrap_Document_getHexa, METH_VARARGS, NULL}, { (char *)"Document_getQuad", _wrap_Document_getQuad, METH_VARARGS, NULL}, { (char *)"Document_getEdge", _wrap_Document_getEdge, METH_VARARGS, NULL}, @@ -32812,8 +31611,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Document_getUsedEdge", _wrap_Document_getUsedEdge, METH_VARARGS, NULL}, { (char *)"Document_getUsedVertex", _wrap_Document_getUsedVertex, METH_VARARGS, NULL}, { (char *)"Document_getVector", _wrap_Document_getVector, METH_VARARGS, NULL}, - { (char *)"Document_getCylinder", _wrap_Document_getCylinder, METH_VARARGS, NULL}, - { (char *)"Document_getPipe", _wrap_Document_getPipe, METH_VARARGS, NULL}, { (char *)"Document_getShape", _wrap_Document_getShape, METH_VARARGS, NULL}, { (char *)"Document_getGroup", _wrap_Document_getGroup, METH_VARARGS, NULL}, { (char *)"Document_getLaw", _wrap_Document_getLaw, METH_VARARGS, NULL}, @@ -32832,6 +31629,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Document_removeLaw", _wrap_Document_removeLaw, METH_VARARGS, NULL}, { (char *)"Document_makeCartesianTop", _wrap_Document_makeCartesianTop, METH_VARARGS, NULL}, { (char *)"Document_makeCartesianUni", _wrap_Document_makeCartesianUni, METH_VARARGS, NULL}, + { (char *)"Document_makeCartesian", _wrap_Document_makeCartesian, METH_VARARGS, NULL}, { (char *)"Document_makeCylinderTop", _wrap_Document_makeCylinderTop, METH_VARARGS, NULL}, { (char *)"Document_makeCylinderUni", _wrap_Document_makeCylinderUni, METH_VARARGS, NULL}, { (char *)"Document_makeCylinder", _wrap_Document_makeCylinder, METH_VARARGS, NULL}, @@ -32870,7 +31668,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Document_appendXml", _wrap_Document_appendXml, METH_VARARGS, NULL}, { (char *)"Document_getXml", _wrap_Document_getXml, METH_VARARGS, NULL}, { (char *)"Document_getLevel", _wrap_Document_getLevel, METH_VARARGS, NULL}, - { (char *)"Document_makeCartesian", _wrap_Document_makeCartesian, METH_VARARGS, NULL}, { (char *)"Document_findVertex", _wrap_Document_findVertex, METH_VARARGS, NULL}, { (char *)"Document_closeQuads", _wrap_Document_closeQuads, METH_VARARGS, NULL}, { (char *)"Document_addLaw", _wrap_Document_addLaw, METH_VARARGS, NULL}, @@ -32927,17 +31724,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"new_Elements", _wrap_new_Elements, METH_VARARGS, NULL}, { (char *)"delete_Elements", _wrap_delete_Elements, METH_VARARGS, NULL}, { (char *)"Elements_swigregister", Elements_swigregister, METH_VARARGS, NULL}, - { (char *)"new_CrossElements", _wrap_new_CrossElements, METH_VARARGS, NULL}, - { (char *)"CrossElements_getHexaIJK", _wrap_CrossElements_getHexaIJK, METH_VARARGS, NULL}, - { (char *)"CrossElements_getQuadIJ", _wrap_CrossElements_getQuadIJ, METH_VARARGS, NULL}, - { (char *)"CrossElements_getQuadJK", _wrap_CrossElements_getQuadJK, METH_VARARGS, NULL}, - { (char *)"CrossElements_getQuadIK", _wrap_CrossElements_getQuadIK, METH_VARARGS, NULL}, - { (char *)"CrossElements_getEdgeI", _wrap_CrossElements_getEdgeI, METH_VARARGS, NULL}, - { (char *)"CrossElements_getEdgeJ", _wrap_CrossElements_getEdgeJ, METH_VARARGS, NULL}, - { (char *)"CrossElements_getEdgeK", _wrap_CrossElements_getEdgeK, METH_VARARGS, NULL}, - { (char *)"CrossElements_getVertexIJK", _wrap_CrossElements_getVertexIJK, METH_VARARGS, NULL}, - { (char *)"delete_CrossElements", _wrap_delete_CrossElements, METH_VARARGS, NULL}, - { (char *)"CrossElements_swigregister", CrossElements_swigregister, METH_VARARGS, NULL}, { (char *)"new_BiCylinder", _wrap_new_BiCylinder, METH_VARARGS, NULL}, { (char *)"BiCylinder_getHexaIJK", _wrap_BiCylinder_getHexaIJK, METH_VARARGS, NULL}, { (char *)"BiCylinder_getQuadIJ", _wrap_BiCylinder_getQuadIJ, METH_VARARGS, NULL}, @@ -33003,25 +31789,17 @@ static void *_p_Hex__QuadTo_p_Hex__EltBase(void *x) { static void *_p_Hex__ElementsTo_p_Hex__EltBase(void *x) { return (void *)((Hex::EltBase *) ((Hex::Elements *) x)); } -static void *_p_Hex__CrossElementsTo_p_Hex__EltBase(void *x) { - return (void *)((Hex::EltBase *) (Hex::Elements *) ((Hex::CrossElements *) x)); -} static void *_p_Hex__DocumentTo_p_Hex__EltBase(void *x) { return (void *)((Hex::EltBase *) ((Hex::Document *) x)); } static void *_p_Hex__BiCylinderTo_p_Hex__EltBase(void *x) { return (void *)((Hex::EltBase *) (Hex::Elements *) ((Hex::BiCylinder *) x)); } -static void *_p_Hex__CrossElementsTo_p_Hex__Elements(void *x) { - return (void *)((Hex::Elements *) ((Hex::CrossElements *) x)); -} static void *_p_Hex__BiCylinderTo_p_Hex__Elements(void *x) { return (void *)((Hex::Elements *) ((Hex::BiCylinder *) x)); } static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *|pfile", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Hex__BiCylinder = {"_p_Hex__BiCylinder", "Hex::BiCylinder *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Hex__CrossElements = {"_p_Hex__CrossElements", "Hex::CrossElements *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Hex__Cylinder = {"_p_Hex__Cylinder", "Hex::Cylinder *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Hex__Document = {"_p_Hex__Document", "Hex::Document *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Hex__Edge = {"_p_Hex__Edge", "Hex::Edge *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Hex__Elements = {"_p_Hex__Elements", "Hex::Elements *", 0, 0, (void*)0, 0}; @@ -33032,7 +31810,6 @@ static swig_type_info _swigt__p_Hex__Hex__EltBase = {"_p_Hex__Hex__EltBase", "He static swig_type_info _swigt__p_Hex__Hexa = {"_p_Hex__Hexa", "Hex::Hexa *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Hex__Law = {"_p_Hex__Law", "Hex::Law *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Hex__NewShape = {"_p_Hex__NewShape", "Hex::NewShape *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Hex__Pipe = {"_p_Hex__Pipe", "Hex::Pipe *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Hex__Propagation = {"_p_Hex__Propagation", "Hex::Propagation *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Hex__Quad = {"_p_Hex__Quad", "Hex::Quad *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Hex__Shape = {"_p_Hex__Shape", "Hex::Shape *|Hex::OldShape *", 0, 0, (void*)0, 0}; @@ -33083,8 +31860,6 @@ static swig_type_info _swigt__std__vectorTHex__Vertex_p_std__allocatorTHex__Vert static swig_type_info *swig_type_initial[] = { &_swigt__p_FILE, &_swigt__p_Hex__BiCylinder, - &_swigt__p_Hex__CrossElements, - &_swigt__p_Hex__Cylinder, &_swigt__p_Hex__Document, &_swigt__p_Hex__Edge, &_swigt__p_Hex__Elements, @@ -33095,7 +31870,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Hex__Hexa, &_swigt__p_Hex__Law, &_swigt__p_Hex__NewShape, - &_swigt__p_Hex__Pipe, &_swigt__p_Hex__Propagation, &_swigt__p_Hex__Quad, &_swigt__p_Hex__Shape, @@ -33146,19 +31920,16 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Hex__BiCylinder[] = { {&_swigt__p_Hex__BiCylinder, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Hex__CrossElements[] = { {&_swigt__p_Hex__CrossElements, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Hex__Cylinder[] = { {&_swigt__p_Hex__Cylinder, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Hex__Document[] = { {&_swigt__p_Hex__Document, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Hex__Edge[] = { {&_swigt__std__vectorTHex__Edge_p_std__allocatorTHex__Edge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Hex__Edge, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Hex__Elements[] = { {&_swigt__p_Hex__Elements, 0, 0, 0}, {&_swigt__p_Hex__CrossElements, _p_Hex__CrossElementsTo_p_Hex__Elements, 0, 0}, {&_swigt__p_Hex__BiCylinder, _p_Hex__BiCylinderTo_p_Hex__Elements, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Hex__EltBase[] = { {&_swigt__p_Hex__Group, _p_Hex__GroupTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Vertex, _p_Hex__VertexTo_p_Hex__EltBase, 0, 0}, {&_swigt__std__vectorTHex__NewShape_p_std__allocatorTHex__NewShape_p_t_t__value_type, _p_Hex__NewShapeTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__CrossElements, _p_Hex__CrossElementsTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Elements, _p_Hex__ElementsTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__NewShape, _p_Hex__NewShapeTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Hexa, _p_Hex__HexaTo_p_Hex__EltBase, 0, 0}, {&_swigt__std__vectorTHex__Hexa_p_std__allocatorTHex__Hexa_p_t_t__value_type, _p_Hex__HexaTo_p_Hex__EltBase, 0, 0}, {&_swigt__std__vectorTHex__Vertex_p_std__allocatorTHex__Vertex_p_t_t__value_type, _p_Hex__VertexTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Propagation, _p_Hex__PropagationTo_p_Hex__EltBase, 0, 0}, {&_swigt__std__vectorTHex__Quad_p_std__allocatorTHex__Quad_p_t_t__value_type, _p_Hex__QuadTo_p_Hex__EltBase, 0, 0}, {&_swigt__std__vectorTHex__Edge_p_std__allocatorTHex__Edge_p_t_t__value_type, _p_Hex__EdgeTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Hex__EltBase, 0, 0, 0}, {&_swigt__p_Hex__EltBase, 0, 0, 0}, {&_swigt__p_Hex__Vector, _p_Hex__VectorTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__BiCylinder, _p_Hex__BiCylinderTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Document, _p_Hex__DocumentTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Quad, _p_Hex__QuadTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Edge, _p_Hex__EdgeTo_p_Hex__EltBase, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Hex__Elements[] = { {&_swigt__p_Hex__Elements, 0, 0, 0}, {&_swigt__p_Hex__BiCylinder, _p_Hex__BiCylinderTo_p_Hex__Elements, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Hex__EltBase[] = { {&_swigt__p_Hex__Group, _p_Hex__GroupTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Vertex, _p_Hex__VertexTo_p_Hex__EltBase, 0, 0}, {&_swigt__std__vectorTHex__NewShape_p_std__allocatorTHex__NewShape_p_t_t__value_type, _p_Hex__NewShapeTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Elements, _p_Hex__ElementsTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__NewShape, _p_Hex__NewShapeTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Hexa, _p_Hex__HexaTo_p_Hex__EltBase, 0, 0}, {&_swigt__std__vectorTHex__Hexa_p_std__allocatorTHex__Hexa_p_t_t__value_type, _p_Hex__HexaTo_p_Hex__EltBase, 0, 0}, {&_swigt__std__vectorTHex__Vertex_p_std__allocatorTHex__Vertex_p_t_t__value_type, _p_Hex__VertexTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Propagation, _p_Hex__PropagationTo_p_Hex__EltBase, 0, 0}, {&_swigt__std__vectorTHex__Quad_p_std__allocatorTHex__Quad_p_t_t__value_type, _p_Hex__QuadTo_p_Hex__EltBase, 0, 0}, {&_swigt__std__vectorTHex__Edge_p_std__allocatorTHex__Edge_p_t_t__value_type, _p_Hex__EdgeTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Hex__EltBase, 0, 0, 0}, {&_swigt__p_Hex__EltBase, 0, 0, 0}, {&_swigt__p_Hex__Vector, _p_Hex__VectorTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__BiCylinder, _p_Hex__BiCylinderTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Document, _p_Hex__DocumentTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Quad, _p_Hex__QuadTo_p_Hex__EltBase, 0, 0}, {&_swigt__p_Hex__Edge, _p_Hex__EdgeTo_p_Hex__EltBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Hex__Group[] = { {&_swigt__p_Hex__Group, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Hex__Hex[] = { {&_swigt__p_Hex__Hex, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Hex__Hex__EltBase[] = { {&_swigt__p_Hex__Group, 0, 0, 0}, {&_swigt__p_Hex__Vertex, 0, 0, 0}, {&_swigt__std__vectorTHex__NewShape_p_std__allocatorTHex__NewShape_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Hex__CrossElements, 0, 0, 0}, {&_swigt__p_Hex__Elements, 0, 0, 0}, {&_swigt__p_Hex__NewShape, 0, 0, 0}, {&_swigt__p_Hex__Hexa, 0, 0, 0}, {&_swigt__std__vectorTHex__Hexa_p_std__allocatorTHex__Hexa_p_t_t__value_type, 0, 0, 0}, {&_swigt__std__vectorTHex__Vertex_p_std__allocatorTHex__Vertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Hex__Propagation, 0, 0, 0}, {&_swigt__std__vectorTHex__Quad_p_std__allocatorTHex__Quad_p_t_t__value_type, 0, 0, 0}, {&_swigt__std__vectorTHex__Edge_p_std__allocatorTHex__Edge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Hex__EltBase, 0, 0, 0}, {&_swigt__p_Hex__Hex__EltBase, 0, 0, 0}, {&_swigt__p_Hex__Vector, 0, 0, 0}, {&_swigt__p_Hex__BiCylinder, 0, 0, 0}, {&_swigt__p_Hex__Document, 0, 0, 0}, {&_swigt__p_Hex__Quad, 0, 0, 0}, {&_swigt__p_Hex__Edge, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Hex__Hex__EltBase[] = { {&_swigt__p_Hex__Group, 0, 0, 0}, {&_swigt__p_Hex__Vertex, 0, 0, 0}, {&_swigt__std__vectorTHex__NewShape_p_std__allocatorTHex__NewShape_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Hex__Elements, 0, 0, 0}, {&_swigt__p_Hex__NewShape, 0, 0, 0}, {&_swigt__p_Hex__Hexa, 0, 0, 0}, {&_swigt__std__vectorTHex__Hexa_p_std__allocatorTHex__Hexa_p_t_t__value_type, 0, 0, 0}, {&_swigt__std__vectorTHex__Vertex_p_std__allocatorTHex__Vertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Hex__Propagation, 0, 0, 0}, {&_swigt__std__vectorTHex__Quad_p_std__allocatorTHex__Quad_p_t_t__value_type, 0, 0, 0}, {&_swigt__std__vectorTHex__Edge_p_std__allocatorTHex__Edge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Hex__EltBase, 0, 0, 0}, {&_swigt__p_Hex__Hex__EltBase, 0, 0, 0}, {&_swigt__p_Hex__Vector, 0, 0, 0}, {&_swigt__p_Hex__BiCylinder, 0, 0, 0}, {&_swigt__p_Hex__Document, 0, 0, 0}, {&_swigt__p_Hex__Quad, 0, 0, 0}, {&_swigt__p_Hex__Edge, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Hex__Hexa[] = { {&_swigt__std__vectorTHex__Hexa_p_std__allocatorTHex__Hexa_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Hex__Hexa, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Hex__Law[] = { {&_swigt__p_Hex__Law, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Hex__NewShape[] = { {&_swigt__p_Hex__NewShape, 0, 0, 0}, {&_swigt__std__vectorTHex__NewShape_p_std__allocatorTHex__NewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Hex__Pipe[] = { {&_swigt__p_Hex__Pipe, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Hex__Propagation[] = { {&_swigt__p_Hex__Propagation, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Hex__Quad[] = { {&_swigt__std__vectorTHex__Quad_p_std__allocatorTHex__Quad_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Hex__Quad, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Hex__Shape[] = { {&_swigt__p_Hex__Shape, 0, 0, 0},{0, 0, 0, 0}}; @@ -33209,8 +31980,6 @@ static swig_cast_info _swigc__std__vectorTHex__Vertex_p_std__allocatorTHex__Vert static swig_cast_info *swig_cast_initial[] = { _swigc__p_FILE, _swigc__p_Hex__BiCylinder, - _swigc__p_Hex__CrossElements, - _swigc__p_Hex__Cylinder, _swigc__p_Hex__Document, _swigc__p_Hex__Edge, _swigc__p_Hex__Elements, @@ -33221,7 +31990,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Hex__Hexa, _swigc__p_Hex__Law, _swigc__p_Hex__NewShape, - _swigc__p_Hex__Pipe, _swigc__p_Hex__Propagation, _swigc__p_Hex__Quad, _swigc__p_Hex__Shape, @@ -33925,17 +32693,5 @@ SWIGEXPORT void SWIG_init(void) { SWIG_addvarlink(SWIG_globals(),(char*)"Epsil",Epsil_get, Epsil_set); SWIG_addvarlink(SWIG_globals(),(char*)"UnEpsil",UnEpsil_get, UnEpsil_set); SWIG_addvarlink(SWIG_globals(),(char*)"Epsil2",Epsil2_get, Epsil2_set); - SWIG_Python_SetConstant(d, "NbrSlices1",SWIG_From_int(static_cast< int >(Hex::NbrSlices1))); - SWIG_Python_SetConstant(d, "NbrSlices2",SWIG_From_int(static_cast< int >(Hex::NbrSlices2))); - SWIG_Python_SetConstant(d, "SizeRay",SWIG_From_int(static_cast< int >(Hex::SizeRay))); - SWIG_Python_SetConstant(d, "BiCyl",SWIG_From_int(static_cast< int >(Hex::BiCyl))); - SWIG_Python_SetConstant(d, "NbrVSlices1",SWIG_From_int(static_cast< int >(Hex::NbrVSlices1))); - SWIG_Python_SetConstant(d, "NbrVSlices2",SWIG_From_int(static_cast< int >(Hex::NbrVSlices2))); - SWIG_Python_SetConstant(d, "MiddleSlice1",SWIG_From_int(static_cast< int >(Hex::MiddleSlice1))); - SWIG_Python_SetConstant(d, "Cyl1",SWIG_From_int(static_cast< int >(Hex::Cyl1))); - SWIG_Python_SetConstant(d, "Cyl2",SWIG_From_int(static_cast< int >(Hex::Cyl2))); - SWIG_Python_SetConstant(d, "NO_CYL",SWIG_From_int(static_cast< int >(Hex::NO_CYL))); - SWIG_Python_SetConstant(d, "NO_PIPE",SWIG_From_int(static_cast< int >(Hex::NO_PIPE))); - SWIG_Python_SetConstant(d, "IS_HERE",SWIG_From_int(static_cast< int >(Hex::IS_HERE))); } -- 2.39.2