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
011ec862
Commit
011ec862
authored
11 years ago
by
Jonathan Lambrechts
Browse files
Options
Downloads
Patches
Plain Diff
add some "const"
parent
328920bd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Geo/GModel.cpp
+2
-2
2 additions, 2 deletions
Geo/GModel.cpp
Geo/GModel.h
+1
-1
1 addition, 1 deletion
Geo/GModel.h
Geo/MElementOctree.cpp
+1
-1
1 addition, 1 deletion
Geo/MElementOctree.cpp
Geo/MElementOctree.h
+1
-1
1 addition, 1 deletion
Geo/MElementOctree.h
with
5 additions
and
5 deletions
Geo/GModel.cpp
+
2
−
2
View file @
011ec862
...
@@ -450,7 +450,7 @@ int GModel::setPhysicalName(std::string name, int dim, int number)
...
@@ -450,7 +450,7 @@ int GModel::setPhysicalName(std::string name, int dim, int number)
return
number
;
return
number
;
}
}
std
::
string
GModel
::
getPhysicalName
(
int
dim
,
int
number
)
std
::
string
GModel
::
getPhysicalName
(
int
dim
,
int
number
)
const
{
{
//Emi debug here
//Emi debug here
// printf("getPhysName size %d \n", physicalNames.size());
// printf("getPhysName size %d \n", physicalNames.size());
...
@@ -460,7 +460,7 @@ std::string GModel::getPhysicalName(int dim, int number)
...
@@ -460,7 +460,7 @@ std::string GModel::getPhysicalName(int dim, int number)
// printf("par (%d,%d) \n", itt->first.first, itt->first.second);
// printf("par (%d,%d) \n", itt->first.first, itt->first.second);
// }
// }
std
::
map
<
std
::
pair
<
int
,
int
>
,
std
::
string
>::
iterator
it
=
std
::
map
<
std
::
pair
<
int
,
int
>
,
std
::
string
>::
const_
iterator
it
=
physicalNames
.
find
(
std
::
pair
<
int
,
int
>
(
dim
,
number
));
physicalNames
.
find
(
std
::
pair
<
int
,
int
>
(
dim
,
number
));
if
(
it
!=
physicalNames
.
end
())
return
it
->
second
;
if
(
it
!=
physicalNames
.
end
())
return
it
->
second
;
return
""
;
return
""
;
...
...
This diff is collapsed.
Click to expand it.
Geo/GModel.h
+
1
−
1
View file @
011ec862
...
@@ -325,7 +325,7 @@ class GModel
...
@@ -325,7 +325,7 @@ class GModel
// get the name (if any) of a given physical group of dimension
// get the name (if any) of a given physical group of dimension
// "dim" and id number "num"
// "dim" and id number "num"
std
::
string
getPhysicalName
(
int
dim
,
int
num
);
std
::
string
getPhysicalName
(
int
dim
,
int
num
)
const
;
// get the number of a given physical group of dimension
// get the number of a given physical group of dimension
// "dim" and name "name". return -1 if not found
// "dim" and name "name". return -1 if not found
...
...
This diff is collapsed.
Click to expand it.
Geo/MElementOctree.cpp
+
1
−
1
View file @
011ec862
...
@@ -187,7 +187,7 @@ std::vector<MElement *> MElementOctree::findAll(double x, double y, double z,
...
@@ -187,7 +187,7 @@ std::vector<MElement *> MElementOctree::findAll(double x, double y, double z,
return
e
;
return
e
;
}
}
MElement
*
MElementOctree
::
find
(
double
x
,
double
y
,
double
z
,
int
dim
,
bool
strict
)
MElement
*
MElementOctree
::
find
(
double
x
,
double
y
,
double
z
,
int
dim
,
bool
strict
)
const
{
{
double
P
[
3
]
=
{
x
,
y
,
z
};
double
P
[
3
]
=
{
x
,
y
,
z
};
MElement
*
e
=
(
MElement
*
)
Octree_Search
(
P
,
_octree
);
MElement
*
e
=
(
MElement
*
)
Octree_Search
(
P
,
_octree
);
...
...
This diff is collapsed.
Click to expand it.
Geo/MElementOctree.h
+
1
−
1
View file @
011ec862
...
@@ -21,7 +21,7 @@ class MElementOctree{
...
@@ -21,7 +21,7 @@ class MElementOctree{
MElementOctree
(
GModel
*
);
MElementOctree
(
GModel
*
);
MElementOctree
(
std
::
vector
<
MElement
*>
&
);
MElementOctree
(
std
::
vector
<
MElement
*>
&
);
~
MElementOctree
();
~
MElementOctree
();
MElement
*
find
(
double
x
,
double
y
,
double
z
,
int
dim
=
-
1
,
bool
strict
=
false
);
MElement
*
find
(
double
x
,
double
y
,
double
z
,
int
dim
=
-
1
,
bool
strict
=
false
)
const
;
Octree
*
getInternalOctree
(){
return
_octree
;
}
Octree
*
getInternalOctree
(){
return
_octree
;
}
std
::
vector
<
MElement
*>
findAll
(
double
x
,
double
y
,
double
z
,
int
dim
,
bool
strict
=
false
);
std
::
vector
<
MElement
*>
findAll
(
double
x
,
double
y
,
double
z
,
int
dim
,
bool
strict
=
false
);
};
};
...
...
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