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
b4de0b37
Commit
b4de0b37
authored
12 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
af7495ad
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Common/onelab.h
+2
-2
2 additions, 2 deletions
Common/onelab.h
Geo/GEdgeLoop.h
+2
-2
2 additions, 2 deletions
Geo/GEdgeLoop.h
Geo/GEntity.h
+6
-6
6 additions, 6 deletions
Geo/GEntity.h
Geo/MFace.h
+5
-5
5 additions, 5 deletions
Geo/MFace.h
with
15 additions
and
15 deletions
Common/onelab.h
+
2
−
2
View file @
b4de0b37
...
@@ -748,7 +748,7 @@ namespace onelab{
...
@@ -748,7 +748,7 @@ namespace onelab{
const
std
::
string
&
client
=
""
){
return
_get
(
ps
,
name
,
client
,
_functions
);
}
const
std
::
string
&
client
=
""
){
return
_get
(
ps
,
name
,
client
,
_functions
);
}
unsigned
int
getNumParameters
()
unsigned
int
getNumParameters
()
{
{
return
_numbers
.
size
()
+
_strings
.
size
()
+
_regions
.
size
()
+
_functions
.
size
();
return
(
int
)(
_numbers
.
size
()
+
_strings
.
size
()
+
_regions
.
size
()
+
_functions
.
size
()
)
;
}
}
// check if at least one parameter depends on the given client
// check if at least one parameter depends on the given client
bool
hasClient
(
const
std
::
string
&
client
)
const
bool
hasClient
(
const
std
::
string
&
client
)
const
...
@@ -943,7 +943,7 @@ namespace onelab{
...
@@ -943,7 +943,7 @@ namespace onelab{
typedef
std
::
map
<
std
::
string
,
client
*>::
iterator
citer
;
typedef
std
::
map
<
std
::
string
,
client
*>::
iterator
citer
;
citer
firstClient
(){
return
_clients
.
begin
();
}
citer
firstClient
(){
return
_clients
.
begin
();
}
citer
lastClient
(){
return
_clients
.
end
();
}
citer
lastClient
(){
return
_clients
.
end
();
}
int
getNumClients
()
{
return
_clients
.
size
();
};
int
getNumClients
()
{
return
(
int
)
_clients
.
size
();
};
citer
findClient
(
const
std
::
string
&
name
){
return
_clients
.
find
(
name
);
}
citer
findClient
(
const
std
::
string
&
name
){
return
_clients
.
find
(
name
);
}
void
registerClient
(
client
*
c
)
void
registerClient
(
client
*
c
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Geo/GEdgeLoop.h
+
2
−
2
View file @
b4de0b37
...
@@ -25,7 +25,7 @@ struct GEdgeSigned
...
@@ -25,7 +25,7 @@ struct GEdgeSigned
int
getSign
(){
return
_sign
;
}
int
getSign
(){
return
_sign
;
}
};
};
class
GEdgeLoop
class
GEdgeLoop
{
{
private:
private:
std
::
list
<
GEdgeSigned
>
loop
;
std
::
list
<
GEdgeSigned
>
loop
;
...
@@ -39,7 +39,7 @@ class GEdgeLoop
...
@@ -39,7 +39,7 @@ class GEdgeLoop
inline
citer
end
()
const
{
return
loop
.
end
();
}
inline
citer
end
()
const
{
return
loop
.
end
();
}
inline
void
erase
(
iter
it
){
loop
.
erase
(
it
);
}
inline
void
erase
(
iter
it
){
loop
.
erase
(
it
);
}
int
count
(
GEdge
*
)
const
;
int
count
(
GEdge
*
)
const
;
int
count
()
const
{
return
loop
.
size
();
}
int
count
()
const
{
return
(
int
)
loop
.
size
();
}
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
Geo/GEntity.h
+
6
−
6
View file @
b4de0b37
...
@@ -111,8 +111,8 @@ class GEntity {
...
@@ -111,8 +111,8 @@ class GEntity {
};
};
enum
MeshGenerationStatus
{
enum
MeshGenerationStatus
{
PENDING
,
PENDING
,
DONE
,
DONE
,
FAILED
FAILED
};
};
...
@@ -192,7 +192,7 @@ class GEntity {
...
@@ -192,7 +192,7 @@ class GEntity {
virtual
std
::
list
<
GVertex
*>
vertices
()
const
{
return
std
::
list
<
GVertex
*>
();
}
virtual
std
::
list
<
GVertex
*>
vertices
()
const
{
return
std
::
list
<
GVertex
*>
();
}
// for python, temporary solution while iterator are not binded
// for python, temporary solution while iterator are not binded
std
::
vector
<
GRegion
*>
bindingsGetRegions
()
{
std
::
vector
<
GRegion
*>
bindingsGetRegions
()
{
std
::
list
<
GRegion
*>
r
=
regions
();
// NOTE : two-line to dont create two different lists with diff pointers
std
::
list
<
GRegion
*>
r
=
regions
();
// NOTE : two-line to dont create two different lists with diff pointers
return
std
::
vector
<
GRegion
*>
(
r
.
begin
(),
r
.
end
());
return
std
::
vector
<
GRegion
*>
(
r
.
begin
(),
r
.
end
());
}
}
...
@@ -257,7 +257,7 @@ class GEntity {
...
@@ -257,7 +257,7 @@ class GEntity {
return
physicals
;
return
physicals
;
}
}
// returns the tag of the entity that its master entity (for mesh)
// returns the tag of the entity that its master entity (for mesh)
int
meshMaster
()
const
;
int
meshMaster
()
const
;
void
setMeshMaster
(
int
m
);
void
setMeshMaster
(
int
m
);
...
@@ -270,7 +270,7 @@ class GEntity {
...
@@ -270,7 +270,7 @@ class GEntity {
// get/set the visibility flag
// get/set the visibility flag
virtual
char
getVisibility
();
virtual
char
getVisibility
();
virtual
void
setVisibility
(
char
val
,
bool
recursive
=
false
){
_visible
=
val
;
}
virtual
void
setVisibility
(
char
val
,
bool
recursive
=
false
){
_visible
=
val
;
}
// get/set the selection flag
// get/set the selection flag
virtual
char
getSelection
(){
return
_selection
;
}
virtual
char
getSelection
(){
return
_selection
;
}
virtual
void
setSelection
(
char
val
){
_selection
=
val
;
}
virtual
void
setSelection
(
char
val
){
_selection
=
val
;
}
...
@@ -310,7 +310,7 @@ class GEntity {
...
@@ -310,7 +310,7 @@ class GEntity {
void
setAllElementsVisible
(
bool
val
){
_allElementsVisible
=
val
?
1
:
0
;
}
void
setAllElementsVisible
(
bool
val
){
_allElementsVisible
=
val
?
1
:
0
;
}
// get the number of mesh vertices in the entity
// get the number of mesh vertices in the entity
unsigned
int
getNumMeshVertices
()
{
return
mesh_vertices
.
size
();
}
unsigned
int
getNumMeshVertices
()
{
return
(
int
)
mesh_vertices
.
size
();
}
// get the mesh vertex at the given index
// get the mesh vertex at the given index
MVertex
*
getMeshVertex
(
unsigned
int
index
)
{
return
mesh_vertices
[
index
];
}
MVertex
*
getMeshVertex
(
unsigned
int
index
)
{
return
mesh_vertices
[
index
];
}
...
...
This diff is collapsed.
Click to expand it.
Geo/MFace.h
+
5
−
5
View file @
b4de0b37
...
@@ -17,13 +17,13 @@
...
@@ -17,13 +17,13 @@
class
MFace
{
class
MFace
{
private:
private:
std
::
vector
<
MVertex
*>
_v
;
std
::
vector
<
MVertex
*>
_v
;
std
::
vector
<
char
>
_si
;
// sorted indices
std
::
vector
<
char
>
_si
;
// sorted indices
public:
public:
MFace
()
{}
MFace
()
{}
MFace
(
MVertex
*
v0
,
MVertex
*
v1
,
MVertex
*
v2
,
MVertex
*
v3
=
0
);
MFace
(
MVertex
*
v0
,
MVertex
*
v1
,
MVertex
*
v2
,
MVertex
*
v3
=
0
);
MFace
(
const
std
::
vector
<
MVertex
*>
v
);
MFace
(
const
std
::
vector
<
MVertex
*>
v
);
inline
int
getNumVertices
()
const
{
return
_v
.
size
();
}
inline
int
getNumVertices
()
const
{
return
(
int
)
_v
.
size
();
}
inline
MVertex
*
getVertex
(
const
int
i
)
const
{
return
_v
[
i
];
}
inline
MVertex
*
getVertex
(
const
int
i
)
const
{
return
_v
[
i
];
}
inline
MVertex
*
getSortedVertex
(
const
int
i
)
const
{
return
_v
[
int
(
_si
[
i
])];
}
inline
MVertex
*
getSortedVertex
(
const
int
i
)
const
{
return
_v
[
int
(
_si
[
i
])];
}
inline
MEdge
getEdge
(
const
int
i
)
const
inline
MEdge
getEdge
(
const
int
i
)
const
...
@@ -46,7 +46,7 @@ class MFace {
...
@@ -46,7 +46,7 @@ class MFace {
SVector3
normal
()
const
;
SVector3
normal
()
const
;
SVector3
tangent
(
int
num
)
const
SVector3
tangent
(
int
num
)
const
{
{
SVector3
t0
(
_v
[
1
]
->
x
()
-
_v
[
0
]
->
x
(),
SVector3
t0
(
_v
[
1
]
->
x
()
-
_v
[
0
]
->
x
(),
_v
[
1
]
->
y
()
-
_v
[
0
]
->
y
(),
_v
[
1
]
->
y
()
-
_v
[
0
]
->
y
(),
_v
[
1
]
->
z
()
-
_v
[
0
]
->
z
());
_v
[
1
]
->
z
()
-
_v
[
0
]
->
z
());
t0
.
normalize
();
t0
.
normalize
();
...
@@ -87,13 +87,13 @@ class MFace {
...
@@ -87,13 +87,13 @@ class MFace {
const
double
ff
[
4
]
=
{(
1
-
u
)
*
(
1.
-
v
),
const
double
ff
[
4
]
=
{(
1
-
u
)
*
(
1.
-
v
),
(
1
+
u
)
*
(
1.
-
v
),
(
1
+
u
)
*
(
1.
-
v
),
(
1
+
u
)
*
(
1.
+
v
),
(
1
+
u
)
*
(
1.
+
v
),
(
1
-
u
)
*
(
1.
+
v
)};
(
1
-
u
)
*
(
1.
+
v
)};
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
MVertex
*
v
=
getVertex
(
i
);
MVertex
*
v
=
getVertex
(
i
);
p
[
0
]
+=
v
->
x
()
*
ff
[
i
]
*
.25
;
p
[
0
]
+=
v
->
x
()
*
ff
[
i
]
*
.25
;
p
[
1
]
+=
v
->
y
()
*
ff
[
i
]
*
.25
;
p
[
1
]
+=
v
->
y
()
*
ff
[
i
]
*
.25
;
p
[
2
]
+=
v
->
z
()
*
ff
[
i
]
*
.25
;
p
[
2
]
+=
v
->
z
()
*
ff
[
i
]
*
.25
;
}
}
}
}
else
else
Msg
::
Error
(
"Cannot interpolate inside a polygonal MFace with more than 4 edges"
);
Msg
::
Error
(
"Cannot interpolate inside a polygonal MFace with more than 4 edges"
);
...
...
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