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
4d167a2d
Commit
4d167a2d
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
return error if trying to use view based on current model for bg mesh
parent
1b9cc743
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Mesh/Field.cpp
+10
-4
10 additions, 4 deletions
Mesh/Field.cpp
with
10 additions
and
4 deletions
Mesh/Field.cpp
+
10
−
4
View file @
4d167a2d
...
...
@@ -1065,12 +1065,19 @@ class PostViewField : public Field
bool
crop_negative_values
;
double
operator
()
(
double
x
,
double
y
,
double
z
,
GEntity
*
ge
=
0
)
{
// FIXME: should test unique view num instead, but that would be slower
// we should maybe test the unique view num instead, but that
// would be slower
if
(
view_index
<
0
||
view_index
>=
(
int
)
PView
::
list
.
size
())
return
MAX_LC
;
PView
*
v
=
PView
::
list
[
view_index
];
if
(
v
->
getData
()
->
hasModel
(
GModel
::
current
())){
Msg
::
Error
(
"Cannot use view based on current model for background mesh"
);
Msg
::
Error
(
"Use a list-based view (.pos file) instead?"
);
return
MAX_LC
;
}
if
(
update_needed
){
if
(
octree
)
delete
octree
;
octree
=
new
OctreePost
(
PView
::
list
[
view_index
]
);
octree
=
new
OctreePost
(
v
);
update_needed
=
false
;
}
double
l
=
0.
;
...
...
@@ -1096,8 +1103,7 @@ class PostViewField : public Field
crop_negative_values
=
true
;
options
[
"CropNegativeValues"
]
=
new
FieldOptionBool
(
crop_negative_values
,
"return LC_MAX instead of a negative value (this "
"option is needed for backward compatibility with the BackgroundMesh option"
,
&
update_needed
);
"option is needed for backward compatibility with the BackgroundMesh option"
);
}
~
PostViewField
()
{
...
...
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