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
5b1422fa
Commit
5b1422fa
authored
10 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
add resetMeshAttributes
parent
349b5642
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Geo/GVertex.cpp
+6
-0
6 additions, 0 deletions
Geo/GVertex.cpp
Geo/GVertex.h
+3
-0
3 additions, 0 deletions
Geo/GVertex.h
Geo/gmshVertex.cpp
+9
-8
9 additions, 8 deletions
Geo/gmshVertex.cpp
Geo/gmshVertex.h
+3
-2
3 additions, 2 deletions
Geo/gmshVertex.h
with
21 additions
and
10 deletions
Geo/GVertex.cpp
+
6
−
0
View file @
5b1422fa
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
GVertex
::
GVertex
(
GModel
*
m
,
int
tag
,
double
ms
)
:
GEntity
(
m
,
tag
),
meshSize
(
ms
)
GVertex
::
GVertex
(
GModel
*
m
,
int
tag
,
double
ms
)
:
GEntity
(
m
,
tag
),
meshSize
(
ms
)
{
{
resetMeshAttributes
();
}
}
GVertex
::~
GVertex
()
GVertex
::~
GVertex
()
...
@@ -30,6 +31,11 @@ void GVertex::deleteMesh()
...
@@ -30,6 +31,11 @@ void GVertex::deleteMesh()
model
()
->
destroyMeshCaches
();
model
()
->
destroyMeshCaches
();
}
}
void
GVertex
::
resetMeshAttributes
()
{
meshSize
=
MAX_LC
;
}
void
GVertex
::
setPosition
(
GPoint
&
p
)
void
GVertex
::
setPosition
(
GPoint
&
p
)
{
{
Msg
::
Error
(
"Cannot set position of this kind of vertex"
);
Msg
::
Error
(
"Cannot set position of this kind of vertex"
);
...
...
This diff is collapsed.
Click to expand it.
Geo/GVertex.h
+
3
−
0
View file @
5b1422fa
...
@@ -33,6 +33,9 @@ class GVertex : public GEntity
...
@@ -33,6 +33,9 @@ class GVertex : public GEntity
// delete mesh data
// delete mesh data
virtual
void
deleteMesh
();
virtual
void
deleteMesh
();
// reset the mesh attributes to default values
virtual
void
resetMeshAttributes
();
// get/set the coordinates of the vertex
// get/set the coordinates of the vertex
virtual
GPoint
point
()
const
=
0
;
virtual
GPoint
point
()
const
=
0
;
virtual
double
x
()
const
=
0
;
virtual
double
x
()
const
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Geo/gmshVertex.cpp
+
9
−
8
View file @
5b1422fa
...
@@ -17,6 +17,11 @@ gmshVertex::gmshVertex(GModel *m, Vertex *_v)
...
@@ -17,6 +17,11 @@ gmshVertex::gmshVertex(GModel *m, Vertex *_v)
{
{
}
}
void
gmshVertex
::
resetMeshAttributes
()
{
meshSize
=
v
->
lc
;
}
void
gmshVertex
::
setPosition
(
GPoint
&
p
)
void
gmshVertex
::
setPosition
(
GPoint
&
p
)
{
{
v
->
Pos
.
X
=
p
.
x
();
v
->
Pos
.
X
=
p
.
x
();
...
@@ -42,8 +47,6 @@ SPoint2 gmshVertex::reparamOnFace(const GFace *face, int dir) const
...
@@ -42,8 +47,6 @@ SPoint2 gmshVertex::reparamOnFace(const GFace *face, int dir) const
Surface
*
s
=
(
Surface
*
)
face
->
getNativePtr
();
Surface
*
s
=
(
Surface
*
)
face
->
getNativePtr
();
// printf("coucou HERE I AM %d\n",s->Typ);
if
(
s
->
geometry
){
if
(
s
->
geometry
){
// It is not always right if it is periodic.
// It is not always right if it is periodic.
if
(
l_edges
.
size
()
==
1
&&
if
(
l_edges
.
size
()
==
1
&&
...
@@ -95,7 +98,6 @@ SPoint2 gmshVertex::reparamOnFace(const GFace *face, int dir) const
...
@@ -95,7 +98,6 @@ SPoint2 gmshVertex::reparamOnFace(const GFace *face, int dir) const
return
SPoint2
(
U
,
V
);
return
SPoint2
(
U
,
V
);
}
}
else
if
(
s
->
Typ
==
MSH_SURF_TRIC
){
else
if
(
s
->
Typ
==
MSH_SURF_TRIC
){
// printf("coucou HERE I AM TRIC\n");
Curve
*
C
[
3
];
Curve
*
C
[
3
];
for
(
int
i
=
0
;
i
<
3
;
i
++
)
for
(
int
i
=
0
;
i
<
3
;
i
++
)
List_Read
(
s
->
Generatrices
,
i
,
&
C
[
i
]);
List_Read
(
s
->
Generatrices
,
i
,
&
C
[
i
]);
...
@@ -125,7 +127,6 @@ SPoint2 gmshVertex::reparamOnFace(const GFace *face, int dir) const
...
@@ -125,7 +127,6 @@ SPoint2 gmshVertex::reparamOnFace(const GFace *face, int dir) const
Msg
::
Info
(
"Reparameterizing point %d on face %d"
,
v
->
Num
,
s
->
Num
);
Msg
::
Info
(
"Reparameterizing point %d on face %d"
,
v
->
Num
,
s
->
Num
);
return
GVertex
::
reparamOnFace
(
face
,
dir
);
return
GVertex
::
reparamOnFace
(
face
,
dir
);
}
}
// printf("coucou1 %g %g\n",U,V);
return
SPoint2
(
U
,
V
);
return
SPoint2
(
U
,
V
);
}
}
else
{
else
{
...
...
This diff is collapsed.
Click to expand it.
Geo/gmshVertex.h
+
3
−
2
View file @
5b1422fa
...
@@ -16,6 +16,7 @@ class gmshVertex : public GVertex {
...
@@ -16,6 +16,7 @@ class gmshVertex : public GVertex {
public:
public:
gmshVertex
(
GModel
*
m
,
Vertex
*
_v
);
gmshVertex
(
GModel
*
m
,
Vertex
*
_v
);
virtual
~
gmshVertex
()
{}
virtual
~
gmshVertex
()
{}
virtual
void
resetMeshAttributes
();
virtual
GPoint
point
()
const
virtual
GPoint
point
()
const
{
{
return
GPoint
(
v
->
Pos
.
X
,
v
->
Pos
.
Y
,
v
->
Pos
.
Z
,
this
);
return
GPoint
(
v
->
Pos
.
X
,
v
->
Pos
.
Y
,
v
->
Pos
.
Z
,
this
);
...
...
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