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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
59866e26
Commit
59866e26
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
don't need "forceDestroy" anymore: synchronize takes care of business
parent
3ee66a06
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/GeoStringInterface.cpp
+15
-20
15 additions, 20 deletions
Geo/GeoStringInterface.cpp
Geo/GeoStringInterface.h
+3
-4
3 additions, 4 deletions
Geo/GeoStringInterface.h
with
18 additions
and
24 deletions
Geo/GeoStringInterface.cpp
+
15
−
20
View file @
59866e26
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#include
"onelab.h"
#include
"onelab.h"
#endif
#endif
void
add_infile
(
const
std
::
string
&
text
,
const
std
::
string
&
fileName
,
bool
forceDestroy
)
void
add_infile
(
const
std
::
string
&
text
,
const
std
::
string
&
fileName
)
{
{
Msg
::
Debug
(
"Adding `%s' to file `%s'"
,
text
.
c_str
(),
fileName
.
c_str
());
Msg
::
Debug
(
"Adding `%s' to file `%s'"
,
text
.
c_str
(),
fileName
.
c_str
());
std
::
vector
<
std
::
string
>
split
=
SplitFileName
(
fileName
);
std
::
vector
<
std
::
string
>
split
=
SplitFileName
(
fileName
);
...
@@ -97,11 +97,6 @@ void add_infile(const std::string &text, const std::string &fileName, bool force
...
@@ -97,11 +97,6 @@ void add_infile(const std::string &text, const std::string &fileName, bool force
gmshclose
(
gmsh_yyin
);
gmshclose
(
gmsh_yyin
);
gmsh_yyin
=
gmsh_yyin_old
;
gmsh_yyin
=
gmsh_yyin_old
;
if
(
forceDestroy
){
// we need to start from scratch (e.g. if the command just parsed
// could have deleted some entities)
GModel
::
current
()
->
destroy
();
}
GModel
::
current
()
->
getGEOInternals
()
->
synchronize
(
GModel
::
current
());
GModel
::
current
()
->
getGEOInternals
()
->
synchronize
(
GModel
::
current
());
if
(
GModel
::
current
()
->
getOCCInternals
())
if
(
GModel
::
current
()
->
getOCCInternals
())
GModel
::
current
()
->
getOCCInternals
()
->
synchronize
(
GModel
::
current
());
GModel
::
current
()
->
getOCCInternals
()
->
synchronize
(
GModel
::
current
());
...
@@ -159,11 +154,6 @@ void add_infile(const std::string &text, const std::string &fileName, bool force
...
@@ -159,11 +154,6 @@ void add_infile(const std::string &text, const std::string &fileName, bool force
}
}
}
}
void
coherence
(
const
std
::
string
&
fileName
)
{
add_infile
(
"Coherence;"
,
fileName
,
true
);
}
static
std
::
string
list2string
(
List_T
*
list
)
static
std
::
string
list2string
(
List_T
*
list
)
{
{
std
::
ostringstream
sstream
;
std
::
ostringstream
sstream
;
...
@@ -176,13 +166,6 @@ static std::string list2string(List_T *list)
...
@@ -176,13 +166,6 @@ static std::string list2string(List_T *list)
return
sstream
.
str
();
return
sstream
.
str
();
}
}
void
delet
(
List_T
*
list
,
const
std
::
string
&
fileName
,
const
std
::
string
&
what
)
{
std
::
ostringstream
sstream
;
sstream
<<
"Delete {
\n
"
<<
what
<<
"{"
<<
list2string
(
list
)
<<
"};
\n
}"
;
add_infile
(
sstream
.
str
(),
fileName
,
true
);
}
void
add_charlength
(
List_T
*
list
,
const
std
::
string
&
fileName
,
const
std
::
string
&
lc
)
void
add_charlength
(
List_T
*
list
,
const
std
::
string
&
fileName
,
const
std
::
string
&
lc
)
{
{
std
::
ostringstream
sstream
;
std
::
ostringstream
sstream
;
...
@@ -254,7 +237,7 @@ void add_embedded(const std::string &what, std::vector<int> &l,
...
@@ -254,7 +237,7 @@ void add_embedded(const std::string &what, std::vector<int> &l,
sstream
<<
l
[
i
];
sstream
<<
l
[
i
];
}
}
sstream
<<
"} In Surface{"
<<
l
[
0
]
<<
"};"
;
sstream
<<
"} In Surface{"
<<
l
[
0
]
<<
"};"
;
add_infile
(
sstream
.
str
(),
fileName
,
true
);
add_infile
(
sstream
.
str
(),
fileName
);
}
}
void
add_param
(
const
std
::
string
&
par
,
const
std
::
string
&
value
,
void
add_param
(
const
std
::
string
&
par
,
const
std
::
string
&
value
,
...
@@ -628,7 +611,7 @@ void split_edge(int edge_id, List_T *vertices, const std::string &fileName)
...
@@ -628,7 +611,7 @@ void split_edge(int edge_id, List_T *vertices, const std::string &fileName)
{
{
std
::
ostringstream
sstream
;
std
::
ostringstream
sstream
;
sstream
<<
"Split Line("
<<
edge_id
<<
") {"
<<
list2string
(
vertices
)
<<
"};"
;
sstream
<<
"Split Line("
<<
edge_id
<<
") {"
<<
list2string
(
vertices
)
<<
"};"
;
add_infile
(
sstream
.
str
(),
fileName
,
true
);
add_infile
(
sstream
.
str
(),
fileName
);
}
}
void
apply_boolean
(
const
std
::
string
&
fileName
,
const
std
::
string
&
op
,
void
apply_boolean
(
const
std
::
string
&
fileName
,
const
std
::
string
&
op
,
...
@@ -655,3 +638,15 @@ void apply_boolean(const std::string &fileName, const std::string &op,
...
@@ -655,3 +638,15 @@ void apply_boolean(const std::string &fileName, const std::string &op,
sstream
<<
"Delete; }"
;
sstream
<<
"Delete; }"
;
add_infile
(
sstream
.
str
(),
fileName
);
add_infile
(
sstream
.
str
(),
fileName
);
}
}
void
coherence
(
const
std
::
string
&
fileName
)
{
add_infile
(
"Coherence;"
,
fileName
);
}
void
delet
(
List_T
*
list
,
const
std
::
string
&
fileName
,
const
std
::
string
&
what
)
{
std
::
ostringstream
sstream
;
sstream
<<
"Delete {
\n
"
<<
what
<<
"{"
<<
list2string
(
list
)
<<
"};
\n
}"
;
add_infile
(
sstream
.
str
(),
fileName
);
}
This diff is collapsed.
Click to expand it.
Geo/GeoStringInterface.h
+
3
−
4
View file @
59866e26
...
@@ -12,10 +12,7 @@
...
@@ -12,10 +12,7 @@
class
GEntity
;
class
GEntity
;
void
coherence
(
const
std
::
string
&
fileName
);
void
add_infile
(
const
std
::
string
&
text
,
const
std
::
string
&
fileName
);
void
delet
(
List_T
*
list
,
const
std
::
string
&
fileName
,
const
std
::
string
&
what
);
void
add_infile
(
const
std
::
string
&
text
,
const
std
::
string
&
fileName
,
bool
deleted_something
=
false
);
void
add_charlength
(
List_T
*
list
,
const
std
::
string
&
fileName
,
const
std
::
string
&
lc
);
void
add_charlength
(
List_T
*
list
,
const
std
::
string
&
fileName
,
const
std
::
string
&
lc
);
void
add_recosurf
(
List_T
*
list
,
const
std
::
string
&
fileName
);
void
add_recosurf
(
List_T
*
list
,
const
std
::
string
&
fileName
);
void
add_trsfline
(
std
::
vector
<
int
>
&
l
,
const
std
::
string
&
fileName
,
void
add_trsfline
(
std
::
vector
<
int
>
&
l
,
const
std
::
string
&
fileName
,
...
@@ -105,5 +102,7 @@ void split_edge(int edge_id, List_T *vertices, const std::string &fileName);
...
@@ -105,5 +102,7 @@ void split_edge(int edge_id, List_T *vertices, const std::string &fileName);
void
apply_boolean
(
const
std
::
string
&
fileName
,
const
std
::
string
&
op
,
void
apply_boolean
(
const
std
::
string
&
fileName
,
const
std
::
string
&
op
,
const
std
::
vector
<
GEntity
*>
&
object
,
const
std
::
vector
<
GEntity
*>
&
object
,
const
std
::
vector
<
GEntity
*>
&
tool
);
const
std
::
vector
<
GEntity
*>
&
tool
);
void
coherence
(
const
std
::
string
&
fileName
);
void
delet
(
List_T
*
list
,
const
std
::
string
&
fileName
,
const
std
::
string
&
what
);
#endif
#endif
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