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
d4b88015
Commit
d4b88015
authored
13 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fine-tuning
parent
13a5bad2
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
Fltk/onelabWindow.cpp
+1
-1
1 addition, 1 deletion
Fltk/onelabWindow.cpp
Post/PView.cpp
+10
-9
10 additions, 9 deletions
Post/PView.cpp
with
11 additions
and
10 deletions
Fltk/onelabWindow.cpp
+
1
−
1
View file @
d4b88015
...
@@ -127,8 +127,8 @@ static void mergePostProcessingFile(const std::string &fileName)
...
@@ -127,8 +127,8 @@ static void mergePostProcessingFile(const std::string &fileName)
GModel
*
old
=
GModel
::
current
();
GModel
*
old
=
GModel
::
current
();
if
(
haveMesh
){
if
(
haveMesh
){
GModel
*
m
=
new
GModel
();
GModel
*
m
=
new
GModel
();
m
->
setVisibility
(
0
);
GModel
::
setCurrent
(
m
);
GModel
::
setCurrent
(
m
);
m
->
setVisibility
(
false
);
}
}
MergeFile
(
fileName
);
MergeFile
(
fileName
);
GModel
::
setCurrent
(
old
);
GModel
::
setCurrent
(
old
);
...
...
This diff is collapsed.
Click to expand it.
Post/PView.cpp
+
10
−
9
View file @
d4b88015
...
@@ -102,7 +102,7 @@ PView::PView(std::string xname, std::string yname,
...
@@ -102,7 +102,7 @@ PView::PView(std::string xname, std::string yname,
_options
->
axesLabel
[
0
]
=
xname
;
_options
->
axesLabel
[
0
]
=
xname
;
}
}
PView
::
PView
(
std
::
string
name
,
std
::
string
type
,
PView
::
PView
(
std
::
string
name
,
std
::
string
type
,
GModel
*
model
,
std
::
map
<
int
,
std
::
vector
<
double
>
>
&
data
,
GModel
*
model
,
std
::
map
<
int
,
std
::
vector
<
double
>
>
&
data
,
double
time
,
int
numComp
)
double
time
,
int
numComp
)
{
{
...
@@ -129,7 +129,7 @@ PView::PView(std::string name, std::string type,
...
@@ -129,7 +129,7 @@ PView::PView(std::string name, std::string type,
_options
->
targetError
);
_options
->
targetError
);
}
}
void
PView
::
addStep
(
GModel
*
model
,
std
::
map
<
int
,
std
::
vector
<
double
>
>
&
data
,
void
PView
::
addStep
(
GModel
*
model
,
std
::
map
<
int
,
std
::
vector
<
double
>
>
&
data
,
double
time
,
int
numComp
)
double
time
,
int
numComp
)
{
{
PViewDataGModel
*
d
=
dynamic_cast
<
PViewDataGModel
*>
(
_data
);
PViewDataGModel
*
d
=
dynamic_cast
<
PViewDataGModel
*>
(
_data
);
...
@@ -153,14 +153,14 @@ PView::~PView()
...
@@ -153,14 +153,14 @@ PView::~PView()
for
(
unsigned
int
i
=
0
;
i
<
list
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
list
.
size
();
i
++
)
if
(
list
[
i
]
->
getAliasOf
()
==
_num
)
if
(
list
[
i
]
->
getAliasOf
()
==
_num
)
return
;
return
;
// do not delete if this view is an alias and 1) if the original
// do not delete if this view is an alias and 1) if the original
// still exists, or 2) if there are other aliases to the same view
// still exists, or 2) if there are other aliases to the same view
if
(
_aliasOf
)
if
(
_aliasOf
)
for
(
unsigned
int
i
=
0
;
i
<
list
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
list
.
size
();
i
++
)
if
(
list
[
i
]
->
getNum
()
==
_aliasOf
||
list
[
i
]
->
getAliasOf
()
==
_aliasOf
)
if
(
list
[
i
]
->
getNum
()
==
_aliasOf
||
list
[
i
]
->
getAliasOf
()
==
_aliasOf
)
return
;
return
;
Msg
::
Debug
(
"Deleting data in View[%d] (unique num = %d)"
,
_index
,
_num
);
Msg
::
Debug
(
"Deleting data in View[%d] (unique num = %d)"
,
_index
,
_num
);
delete
_data
;
delete
_data
;
}
}
...
@@ -183,7 +183,7 @@ void PView::setOptions(PViewOptions *val)
...
@@ -183,7 +183,7 @@ void PView::setOptions(PViewOptions *val)
}
}
PViewData
*
PView
::
getData
(
bool
useAdaptiveIfAvailable
)
PViewData
*
PView
::
getData
(
bool
useAdaptiveIfAvailable
)
{
{
if
(
useAdaptiveIfAvailable
&&
_data
->
getAdaptiveData
()
&&
!
_data
->
isRemote
())
if
(
useAdaptiveIfAvailable
&&
_data
->
getAdaptiveData
()
&&
!
_data
->
isRemote
())
return
_data
->
getAdaptiveData
()
->
getData
();
return
_data
->
getAdaptiveData
()
->
getData
();
else
else
...
@@ -191,11 +191,11 @@ PViewData *PView::getData(bool useAdaptiveIfAvailable)
...
@@ -191,11 +191,11 @@ PViewData *PView::getData(bool useAdaptiveIfAvailable)
}
}
void
PView
::
setChanged
(
bool
val
)
void
PView
::
setChanged
(
bool
val
)
{
{
_changed
=
val
;
_changed
=
val
;
// reset the eye position everytime we change the view so that the
// reset the eye position everytime we change the view so that the
// arrays get resorted for transparency
// arrays get resorted for transparency
if
(
_changed
)
_eye
=
SPoint3
(
0.
,
0.
,
0.
);
if
(
_changed
)
_eye
=
SPoint3
(
0.
,
0.
,
0.
);
}
}
void
PView
::
combine
(
bool
time
,
int
how
,
bool
remove
)
void
PView
::
combine
(
bool
time
,
int
how
,
bool
remove
)
...
@@ -284,7 +284,8 @@ void PView::combine(bool time, int how, bool remove)
...
@@ -284,7 +284,8 @@ void PView::combine(bool time, int how, bool remove)
PView
*
PView
::
getViewByName
(
std
::
string
name
,
int
timeStep
,
int
partition
)
PView
*
PView
::
getViewByName
(
std
::
string
name
,
int
timeStep
,
int
partition
)
{
{
for
(
unsigned
int
i
=
0
;
i
<
list
.
size
();
i
++
){
// search views from most recently to least recently added
for
(
int
i
=
list
.
size
()
-
1
;
i
>=
0
;
i
--
){
if
(
list
[
i
]
->
getData
()
->
getName
()
==
name
&&
if
(
list
[
i
]
->
getData
()
->
getName
()
==
name
&&
((
timeStep
<
0
||
!
list
[
i
]
->
getData
()
->
hasTimeStep
(
timeStep
))
||
((
timeStep
<
0
||
!
list
[
i
]
->
getData
()
->
hasTimeStep
(
timeStep
))
||
(
partition
<
0
||
!
list
[
i
]
->
getData
()
->
hasPartition
(
timeStep
,
partition
))))
(
partition
<
0
||
!
list
[
i
]
->
getData
()
->
hasPartition
(
timeStep
,
partition
))))
...
...
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