Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
3c0c2ee5
Commit
3c0c2ee5
authored
14 years ago
by
Jean-François Remacle
Browse files
Options
Downloads
Patches
Plain Diff
fixed a bug in linearSystemPetSC<fullMatrix<PetscScalar> >
base class was not defined try it again ...
parent
8f8a7b3e
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Geo/GModelIO_OCC.cpp
+0
-22
0 additions, 22 deletions
Geo/GModelIO_OCC.cpp
Geo/GModelIO_OCC.h
+0
-1
0 additions, 1 deletion
Geo/GModelIO_OCC.h
Solver/linearSystemCSR.h
+1
-1
1 addition, 1 deletion
Solver/linearSystemCSR.h
Solver/linearSystemPETSc.cpp
+7
-2
7 additions, 2 deletions
Solver/linearSystemPETSc.cpp
with
8 additions
and
26 deletions
Geo/GModelIO_OCC.cpp
+
0
−
22
View file @
3c0c2ee5
...
@@ -52,22 +52,6 @@ void OCC_Internals::buildShapeFromLists(TopoDS_Shape _shape)
...
@@ -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
)
void
OCC_Internals
::
addShapeToLists
(
TopoDS_Shape
_shape
)
{
{
TopExp_Explorer
exp0
,
exp1
,
exp2
,
exp3
,
exp4
,
exp5
;
TopExp_Explorer
exp0
,
exp1
,
exp2
,
exp3
,
exp4
,
exp5
;
...
@@ -483,7 +467,6 @@ GVertex *OCC_Internals::addVertexToModel(GModel *model, TopoDS_Vertex vertex)
...
@@ -483,7 +467,6 @@ GVertex *OCC_Internals::addVertexToModel(GModel *model, TopoDS_Vertex vertex)
if
(
gv
)
return
gv
;
if
(
gv
)
return
gv
;
addShapeToLists
(
vertex
);
addShapeToLists
(
vertex
);
buildShapeFromLists
(
vertex
);
buildShapeFromLists
(
vertex
);
// buildLists();
buildGModel
(
model
);
buildGModel
(
model
);
return
getOCCVertexByNativePtr
(
model
,
vertex
);
return
getOCCVertexByNativePtr
(
model
,
vertex
);
}
}
...
@@ -494,7 +477,6 @@ GEdge *OCC_Internals::addEdgeToModel(GModel *model, TopoDS_Edge edge)
...
@@ -494,7 +477,6 @@ GEdge *OCC_Internals::addEdgeToModel(GModel *model, TopoDS_Edge edge)
if
(
ge
)
return
ge
;
if
(
ge
)
return
ge
;
addShapeToLists
(
edge
);
addShapeToLists
(
edge
);
buildShapeFromLists
(
edge
);
buildShapeFromLists
(
edge
);
// buildLists();
buildGModel
(
model
);
buildGModel
(
model
);
return
getOCCEdgeByNativePtr
(
model
,
edge
);
return
getOCCEdgeByNativePtr
(
model
,
edge
);
}
}
...
@@ -504,7 +486,6 @@ GFace* OCC_Internals::addFaceToModel(GModel *model, TopoDS_Face face){
...
@@ -504,7 +486,6 @@ GFace* OCC_Internals::addFaceToModel(GModel *model, TopoDS_Face face){
if
(
gf
)
return
gf
;
if
(
gf
)
return
gf
;
addShapeToLists
(
face
);
addShapeToLists
(
face
);
buildShapeFromLists
(
face
);
buildShapeFromLists
(
face
);
// buildLists();
buildGModel
(
model
);
buildGModel
(
model
);
return
getOCCFaceByNativePtr
(
model
,
face
);
return
getOCCFaceByNativePtr
(
model
,
face
);
}
}
...
@@ -515,9 +496,6 @@ GRegion* OCC_Internals::addRegionToModel(GModel *model, TopoDS_Solid region){
...
@@ -515,9 +496,6 @@ GRegion* OCC_Internals::addRegionToModel(GModel *model, TopoDS_Solid region){
if
(
gr
)
return
gr
;
if
(
gr
)
return
gr
;
addShapeToLists
(
region
);
addShapeToLists
(
region
);
buildShapeFromLists
(
region
);
buildShapeFromLists
(
region
);
//buildLists();
// buildLists();
// TEST
buildGModel
(
model
);
buildGModel
(
model
);
return
getOCCRegionByNativePtr
(
model
,
region
);
return
getOCCRegionByNativePtr
(
model
,
region
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Geo/GModelIO_OCC.h
+
0
−
1
View file @
3c0c2ee5
...
@@ -31,7 +31,6 @@ class OCC_Internals {
...
@@ -31,7 +31,6 @@ class OCC_Internals {
TopoDS_Shape
getShape
()
{
return
shape
;
}
TopoDS_Shape
getShape
()
{
return
shape
;
}
void
buildLists
();
void
buildLists
();
void
buildShapeFromLists
(
TopoDS_Shape
_shape
);
void
buildShapeFromLists
(
TopoDS_Shape
_shape
);
const
TopoDS_Shape
*
lookupInLists
(
TopoDS_Shape
_shape
);
void
addShapeToLists
(
TopoDS_Shape
shape
);
void
addShapeToLists
(
TopoDS_Shape
shape
);
void
healGeometry
(
double
tolerance
,
bool
fixsmalledges
,
void
healGeometry
(
double
tolerance
,
bool
fixsmalledges
,
bool
fixspotstripfaces
,
bool
sewfaces
,
bool
fixspotstripfaces
,
bool
sewfaces
,
...
...
This diff is collapsed.
Click to expand it.
Solver/linearSystemCSR.h
+
1
−
1
View file @
3c0c2ee5
...
@@ -46,7 +46,7 @@ class linearSystemCSR : public linearSystem<scalar> {
...
@@ -46,7 +46,7 @@ class linearSystemCSR : public linearSystem<scalar> {
{
{
allocate
(
0
);
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
*
jptr
=
(
INDEX_TYPE
*
)
_jptr
->
array
;
INDEX_TYPE
*
ptr
=
(
INDEX_TYPE
*
)
_ptr
->
array
;
INDEX_TYPE
*
ptr
=
(
INDEX_TYPE
*
)
_ptr
->
array
;
...
...
This diff is collapsed.
Click to expand it.
Solver/linearSystemPETSc.cpp
+
7
−
2
View file @
3c0c2ee5
...
@@ -98,7 +98,7 @@ void linearSystemPETSc<fullMatrix<PetscScalar> >::allocate(int nbRows)
...
@@ -98,7 +98,7 @@ void linearSystemPETSc<fullMatrix<PetscScalar> >::allocate(int nbRows)
void
linearSystemPETScRegisterBindings
(
binding
*
b
)
void
linearSystemPETScRegisterBindings
(
binding
*
b
)
{
{
// FIXME on complex arithmetic this crashes
// FIXME on complex arithmetic this crashes
#if !defined(PETSC_USE_COMPLEX)
//
#if !defined(PETSC_USE_COMPLEX)
classBinding
*
cb
;
classBinding
*
cb
;
methodBinding
*
cm
;
methodBinding
*
cm
;
cb
=
b
->
addClass
<
linearSystemPETSc
<
PetscScalar
>
>
(
"linearSystemPETSc"
);
cb
=
b
->
addClass
<
linearSystemPETSc
<
PetscScalar
>
>
(
"linearSystemPETSc"
);
...
@@ -109,14 +109,19 @@ void linearSystemPETScRegisterBindings(binding *b)
...
@@ -109,14 +109,19 @@ void linearSystemPETScRegisterBindings(binding *b)
cm
->
setArgNames
(
NULL
);
cm
->
setArgNames
(
NULL
);
cm
=
cb
->
addMethod
(
"systemSolve"
,
&
linearSystem
<
fullMatrix
<
PetscScalar
>
>::
systemSolve
);
cm
=
cb
->
addMethod
(
"systemSolve"
,
&
linearSystem
<
fullMatrix
<
PetscScalar
>
>::
systemSolve
);
cm
->
setDescription
(
"compute x = A^{-1}b"
);
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
=
b
->
addClass
<
linearSystemPETSc
<
fullMatrix
<
PetscScalar
>
>
>
(
"linearSystemPETScBlock"
);
cb
->
setDescription
(
"A linear system solver, based on PETSc"
);
cb
->
setDescription
(
"A linear system solver, based on PETSc"
);
cm
=
cb
->
setConstructor
<
linearSystemPETSc
<
fullMatrix
<
PetscScalar
>
>
,
int
>
();
cm
=
cb
->
setConstructor
<
linearSystemPETSc
<
fullMatrix
<
PetscScalar
>
>
,
int
>
();
cm
->
setDescription
(
"A new PETScBlock<PetscScalar> solver (we probably should get rid of the blockSize argument)"
);
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
->
setArgNames
(
"blockSize"
,
NULL
);
cm
=
cb
->
addMethod
(
"systemSolve"
,
&
linearSystem
<
fullMatrix
<
PetscScalar
>
>::
systemSolve
);
cm
=
cb
->
addMethod
(
"systemSolve"
,
&
linearSystem
<
fullMatrix
<
PetscScalar
>
>::
systemSolve
);
cm
->
setDescription
(
"compute x = A^{-1}b"
);
cm
->
setDescription
(
"compute x = A^{-1}b"
);
#endif // FIXME
//
#endif // FIXME
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment