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
fb3a943d
Commit
fb3a943d
authored
16 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
avoid uninitialized param
parent
d5dcebc0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/MVertex.cpp
+7
-3
7 additions, 3 deletions
Geo/MVertex.cpp
Geo/MVertex.h
+7
-18
7 additions, 18 deletions
Geo/MVertex.h
with
14 additions
and
21 deletions
Geo/MVertex.cpp
+
7
−
3
View file @
fb3a943d
...
@@ -31,9 +31,13 @@ void MVertex::writeMSH(FILE *fp, bool binary, bool saveParametric, double scalin
...
@@ -31,9 +31,13 @@ void MVertex::writeMSH(FILE *fp, bool binary, bool saveParametric, double scalin
if
(
_index
<
0
)
return
;
// negative index vertices are never saved
if
(
_index
<
0
)
return
;
// negative index vertices are never saved
int
myDim
=
0
,
myTag
=
0
;
int
myDim
=
0
,
myTag
=
0
;
if
(
saveParametric
&&
onWhat
()){
if
(
saveParametric
){
myDim
=
onWhat
()
->
dim
();
if
(
onWhat
()){
myTag
=
onWhat
()
->
tag
();
myDim
=
onWhat
()
->
dim
();
myTag
=
onWhat
()
->
tag
();
}
else
saveParametric
=
false
;
}
}
if
(
!
binary
){
if
(
!
binary
){
...
...
This diff is collapsed.
Click to expand it.
Geo/MVertex.h
+
7
−
18
View file @
fb3a943d
...
@@ -91,7 +91,7 @@ class MVertex{
...
@@ -91,7 +91,7 @@ class MVertex{
inline
void
setIndex
(
int
index
)
{
_index
=
index
;
}
inline
void
setIndex
(
int
index
)
{
_index
=
index
;
}
// get/set ith parameter
// get/set ith parameter
virtual
bool
getParameter
(
int
i
,
double
&
par
)
const
{
return
false
;
}
virtual
bool
getParameter
(
int
i
,
double
&
par
)
const
{
par
=
0.
;
return
false
;
}
virtual
bool
setParameter
(
int
i
,
double
par
){
return
false
;
}
virtual
bool
setParameter
(
int
i
,
double
par
){
return
false
;
}
// measure distance to another vertex
// measure distance to another vertex
...
@@ -123,21 +123,14 @@ class MEdgeVertex : public MVertex{
...
@@ -123,21 +123,14 @@ class MEdgeVertex : public MVertex{
protected:
protected:
double
_u
,
_lc
;
double
_u
,
_lc
;
public
:
public
:
MEdgeVertex
(
double
x
,
double
y
,
double
z
,
GEntity
*
ge
,
double
u
,
double
lc
=
-
1.0
,
int
num
=
0
)
MEdgeVertex
(
double
x
,
double
y
,
double
z
,
GEntity
*
ge
,
double
u
,
double
lc
=
-
1.0
,
int
num
=
0
)
:
MVertex
(
x
,
y
,
z
,
ge
,
num
),
_u
(
u
),
_lc
(
lc
)
:
MVertex
(
x
,
y
,
z
,
ge
,
num
),
_u
(
u
),
_lc
(
lc
)
{
{
}
}
virtual
~
MEdgeVertex
(){}
virtual
~
MEdgeVertex
(){}
virtual
bool
getParameter
(
int
i
,
double
&
par
)
const
virtual
bool
getParameter
(
int
i
,
double
&
par
)
const
{
par
=
_u
;
return
true
;
}
{
virtual
bool
setParameter
(
int
i
,
double
par
){
_u
=
par
;
return
true
;
}
par
=
_u
;
return
true
;
}
virtual
bool
setParameter
(
int
i
,
double
par
)
{
_u
=
par
;
return
true
;
}
double
getLc
()
const
{
return
_lc
;
}
double
getLc
()
const
{
return
_lc
;
}
};
};
...
@@ -145,16 +138,12 @@ class MFaceVertex : public MVertex{
...
@@ -145,16 +138,12 @@ class MFaceVertex : public MVertex{
protected:
protected:
double
_u
,
_v
;
double
_u
,
_v
;
public
:
public
:
MFaceVertex
(
double
x
,
double
y
,
double
z
,
GEntity
*
ge
,
double
u
,
double
v
,
int
num
=
0
)
MFaceVertex
(
double
x
,
double
y
,
double
z
,
GEntity
*
ge
,
double
u
,
double
v
,
int
num
=
0
)
:
MVertex
(
x
,
y
,
z
,
ge
,
num
),
_u
(
u
),
_v
(
v
)
:
MVertex
(
x
,
y
,
z
,
ge
,
num
),
_u
(
u
),
_v
(
v
)
{
{
}
}
virtual
~
MFaceVertex
(){}
virtual
~
MFaceVertex
(){}
virtual
bool
getParameter
(
int
i
,
double
&
par
)
const
virtual
bool
getParameter
(
int
i
,
double
&
par
)
const
{
par
=
(
i
?
_v
:
_u
);
return
true
;
}
{
par
=
(
i
?
_v
:
_u
);
return
true
;
}
virtual
bool
setParameter
(
int
i
,
double
par
)
virtual
bool
setParameter
(
int
i
,
double
par
)
{
{
if
(
!
i
)
if
(
!
i
)
...
...
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