diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp index 207289749460edd3a80be31d579edc20657868ea..b2b73bd7afc14e5a0cfa24862d44f2c2d462cec9 100644 --- a/Geo/GModelIO_OCC.cpp +++ b/Geo/GModelIO_OCC.cpp @@ -52,22 +52,6 @@ void OCC_Internals::buildShapeFromLists(TopoDS_Shape _shape) } -const TopoDS_Shape *OCC_Internals::lookupInLists(TopoDS_Shape _shape) -{ - if (_shape.ShapeType() == TopAbs_VERTEX) { - TopoDS_Vertex vertex = TopoDS::Vertex(_shape); - int i = vmap.FindIndex(vertex); - if( i < 1)return NULL; - else return &vmap(i); - } - else if (_shape.ShapeType() == TopAbs_EDGE) { - TopoDS_Edge edge = TopoDS::Edge(_shape); - int i = emap.FindIndex(edge); - if( i < 1)return 0; - else return &emap(i); - } -} - void OCC_Internals::addShapeToLists(TopoDS_Shape _shape) { TopExp_Explorer exp0, exp1, exp2, exp3, exp4, exp5; @@ -483,7 +467,6 @@ GVertex *OCC_Internals::addVertexToModel(GModel *model, TopoDS_Vertex vertex) if (gv) return gv; addShapeToLists(vertex); buildShapeFromLists(vertex); - // buildLists(); buildGModel(model); return getOCCVertexByNativePtr (model,vertex); } @@ -494,7 +477,6 @@ GEdge *OCC_Internals::addEdgeToModel(GModel *model, TopoDS_Edge edge) if (ge) return ge; addShapeToLists(edge); buildShapeFromLists(edge); - // buildLists(); buildGModel(model); return getOCCEdgeByNativePtr(model,edge); } @@ -504,7 +486,6 @@ GFace* OCC_Internals::addFaceToModel(GModel *model, TopoDS_Face face){ if (gf) return gf; addShapeToLists(face); buildShapeFromLists(face); - // buildLists(); buildGModel(model); return getOCCFaceByNativePtr(model,face); } @@ -515,9 +496,6 @@ GRegion* OCC_Internals::addRegionToModel(GModel *model, TopoDS_Solid region){ if (gr) return gr; addShapeToLists(region); buildShapeFromLists(region); - //buildLists(); - // buildLists(); - // TEST buildGModel(model); return getOCCRegionByNativePtr(model,region); } diff --git a/Geo/GModelIO_OCC.h b/Geo/GModelIO_OCC.h index d649d33f70896bdc110c4db4e8747203faaf9c46..e81946f09e1cec9f9094a45886f87a3ecb39eaef 100644 --- a/Geo/GModelIO_OCC.h +++ b/Geo/GModelIO_OCC.h @@ -31,7 +31,6 @@ class OCC_Internals { TopoDS_Shape getShape () { return shape; } void buildLists(); void buildShapeFromLists(TopoDS_Shape _shape); - const TopoDS_Shape *lookupInLists(TopoDS_Shape _shape); void addShapeToLists(TopoDS_Shape shape); void healGeometry(double tolerance, bool fixsmalledges, bool fixspotstripfaces, bool sewfaces, diff --git a/Solver/linearSystemCSR.h b/Solver/linearSystemCSR.h index 4dc0f47ceb931333a73881a7a0155f15438e9bfa..5e9f325a35b2ba962cd1a2b4565aaebafdd5f4ba 100644 --- a/Solver/linearSystemCSR.h +++ b/Solver/linearSystemCSR.h @@ -46,7 +46,7 @@ class linearSystemCSR : public linearSystem<scalar> { { allocate(0); } - virtual void addToMatrix(int il, int ic, const double &val) + virtual void addToMatrix(int il, int ic, const scalar &val) { INDEX_TYPE *jptr = (INDEX_TYPE*) _jptr->array; INDEX_TYPE *ptr = (INDEX_TYPE*) _ptr->array; diff --git a/Solver/linearSystemPETSc.cpp b/Solver/linearSystemPETSc.cpp index 0ae4212d39ce044383a9736c20407deb22966465..6a4f8b6f840ad2550f615aa0c9244afeed18f9d5 100644 --- a/Solver/linearSystemPETSc.cpp +++ b/Solver/linearSystemPETSc.cpp @@ -98,7 +98,7 @@ void linearSystemPETSc<fullMatrix<PetscScalar> >::allocate(int nbRows) void linearSystemPETScRegisterBindings(binding *b) { // FIXME on complex arithmetic this crashes -#if !defined(PETSC_USE_COMPLEX) + //#if !defined(PETSC_USE_COMPLEX) classBinding *cb; methodBinding *cm; cb = b->addClass<linearSystemPETSc<PetscScalar> >("linearSystemPETSc"); @@ -109,14 +109,19 @@ void linearSystemPETScRegisterBindings(binding *b) cm->setArgNames(NULL); cm = cb->addMethod("systemSolve", &linearSystem<fullMatrix<PetscScalar> >::systemSolve); cm->setDescription("compute x = A^{-1}b"); + + cb = b->addClass<linearSystem<fullMatrix<double> > >("linearSystemBlock"); + cb->setDescription("A linear system solver with blocks"); + cb = b->addClass<linearSystemPETSc<fullMatrix<PetscScalar> > >("linearSystemPETScBlock"); cb->setDescription("A linear system solver, based on PETSc"); cm = cb->setConstructor<linearSystemPETSc<fullMatrix<PetscScalar> >, int>(); cm->setDescription ("A new PETScBlock<PetscScalar> solver (we probably should get rid of the blockSize argument)"); + cb->setParentClass<linearSystem<fullMatrix<PetscScalar> > >(); cm->setArgNames("blockSize", NULL); cm = cb->addMethod("systemSolve", &linearSystem<fullMatrix<PetscScalar> >::systemSolve); cm->setDescription("compute x = A^{-1}b"); -#endif // FIXME + //#endif // FIXME }