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
1465069e
Commit
1465069e
authored
17 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
- complain if gunzip failed
- better tol in checkMeshCoherence()
parent
93fd9252
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Common/OS.cpp
+5
-4
5 additions, 4 deletions
Common/OS.cpp
Common/OS.h
+1
-1
1 addition, 1 deletion
Common/OS.h
Geo/GModel.cpp
+7
-3
7 additions, 3 deletions
Geo/GModel.cpp
Parser/OpenFile.cpp
+3
-2
3 additions, 2 deletions
Parser/OpenFile.cpp
doc/TODO
+6
-1
6 additions, 1 deletion
doc/TODO
with
22 additions
and
11 deletions
Common/OS.cpp
+
5
−
4
View file @
1465069e
// $Id: OS.cpp,v 1.
7
2007-0
3-19 21:48:1
3 geuzaine Exp $
// $Id: OS.cpp,v 1.
8
2007-0
5-23 15:35:3
3 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -160,7 +160,7 @@ int KillProcess(int pid)
return
1
;
}
void
SystemCall
(
char
*
command
)
int
SystemCall
(
char
*
command
)
{
#if defined(WIN32)
STARTUPINFO
suInfo
;
...
...
@@ -170,12 +170,13 @@ void SystemCall(char *command)
Msg
(
INFO
,
"Calling '%s'"
,
command
);
CreateProcess
(
NULL
,
command
,
NULL
,
NULL
,
FALSE
,
NORMAL_PRIORITY_CLASS
,
NULL
,
NULL
,
&
suInfo
,
&
prInfo
);
return
0
;
#else
if
(
!
system
(
NULL
))
{
Msg
(
GERROR
,
"Could not find /bin/sh: aborting system call"
);
return
;
return
1
;
}
Msg
(
INFO
,
"Calling '%s'"
,
command
);
system
(
command
);
return
system
(
command
);
#endif
}
This diff is collapsed.
Click to expand it.
Common/OS.h
+
1
−
1
View file @
1465069e
...
...
@@ -29,6 +29,6 @@ int GetProcessId();
int
UnlinkFile
(
char
*
name
);
int
StatFile
(
char
*
filename
);
int
KillProcess
(
int
pid
);
void
SystemCall
(
char
*
command
);
int
SystemCall
(
char
*
command
);
#endif
This diff is collapsed.
Click to expand it.
Geo/GModel.cpp
+
7
−
3
View file @
1465069e
// $Id: GModel.cpp,v 1.4
1
2007-05-
02 07:59:27
geuzaine Exp $
// $Id: GModel.cpp,v 1.4
2
2007-05-
23 15:35:33
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -494,10 +494,14 @@ void GModel::checkMeshCoherence()
Msg
(
INFO
,
"Checking mesh coherence (%d elements)"
,
numEle
);
SBoundingBox3d
bb
=
bounds
();
double
lc
=
bb
.
empty
()
?
1.
:
norm
(
SVector3
(
bb
.
max
(),
bb
.
min
()));
double
tol
=
CTX
.
geom
.
tolerance
*
lc
;
// check for duplicate mesh vertices
{
double
old_tol
=
MVertexLessThanLexicographic
::
tolerance
;
MVertexLessThanLexicographic
::
tolerance
=
CTX
.
geom
.
tolerance
;
MVertexLessThanLexicographic
::
tolerance
=
tol
;
std
::
set
<
MVertex
*
,
MVertexLessThanLexicographic
>
pos
;
int
num
=
0
;
for
(
viter
it
=
firstVertex
();
it
!=
lastVertex
();
++
it
)
...
...
@@ -515,7 +519,7 @@ void GModel::checkMeshCoherence()
// check for duplicate elements
{
double
old_tol
=
MElementLessThanLexicographic
::
tolerance
;
MElementLessThanLexicographic
::
tolerance
=
CTX
.
geom
.
tolerance
;
MElementLessThanLexicographic
::
tolerance
=
tol
;
std
::
set
<
MElement
*
,
MElementLessThanLexicographic
>
pos
;
int
num
=
0
;
for
(
eiter
it
=
firstEdge
();
it
!=
lastEdge
();
++
it
)
...
...
This diff is collapsed.
Click to expand it.
Parser/OpenFile.cpp
+
3
−
2
View file @
1465069e
// $Id: OpenFile.cpp,v 1.14
7
2007-05-
05
1
2
:35:
19
geuzaine Exp $
// $Id: OpenFile.cpp,v 1.14
8
2007-05-
23
1
5
:35:
33
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -311,7 +311,8 @@ int MergeFile(char *name, int warn_if_missing)
"Cancel"
,
"Uncompress"
,
NULL
,
name
)){
char
tmp
[
256
];
sprintf
(
tmp
,
"gunzip -c %s > %s"
,
name
,
base
);
SystemCall
(
tmp
);
if
(
SystemCall
(
tmp
))
Msg
(
GERROR
,
"Failed to uncompress `%s': check directory permissions"
,
name
);
if
(
!
strcmp
(
CTX
.
filename
,
name
))
// this is the project file
SetProjectName
(
base
);
return
MergeFile
(
base
);
...
...
This diff is collapsed.
Click to expand it.
doc/TODO
+
6
−
1
View file @
1465069e
$Id: TODO,v 1.58 2007-05-10 22:08:06 geuzaine Exp $
$Id: TODO,v 1.59 2007-05-23 15:35:33 geuzaine Exp $
********************************************************************
add cleanup fct to remove duplicate elements in
GModel->checkMeshCoherence
********************************************************************
...
...
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