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
87a823f6
Commit
87a823f6
authored
11 years ago
by
Jonathan Lambrechts
Browse files
Options
Downloads
Patches
Plain Diff
visualization of High order 1D mesh elements (not postpro)
parent
b827fb02
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
Geo/MLine.cpp
+34
-0
34 additions, 0 deletions
Geo/MLine.cpp
Geo/MLine.h
+4
-15
4 additions, 15 deletions
Geo/MLine.h
with
38 additions
and
15 deletions
Geo/MLine.cpp
+
34
−
0
View file @
87a823f6
...
...
@@ -72,3 +72,37 @@ double MLine::getVolume()
{
return
getLength
();
}
int
MLine3
::
getNumEdgesRep
()
{
return
CTX
::
instance
()
->
mesh
.
numSubEdges
;
}
void
MLine3
::
getEdgeRep
(
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
)
{
int
numSubEdges
=
CTX
::
instance
()
->
mesh
.
numSubEdges
;
SPoint3
pnt1
,
pnt2
;
pnt
(
-
1.
+
2
*
(
double
)
num
/
numSubEdges
,
0.
,
0.
,
pnt1
);
pnt
(
-
1.
+
2
*
(
double
)(
num
+
1
)
/
numSubEdges
,
0.
,
0
,
pnt2
);
x
[
0
]
=
pnt1
.
x
();
x
[
1
]
=
pnt2
.
x
();
y
[
0
]
=
pnt1
.
y
();
y
[
1
]
=
pnt2
.
y
();
z
[
0
]
=
pnt1
.
z
();
z
[
1
]
=
pnt2
.
z
();
n
[
0
]
=
n
[
1
]
=
MEdge
(
_v
[
0
],
_v
[
1
]).
normal
();
}
int
MLineN
::
getNumEdgesRep
()
{
return
CTX
::
instance
()
->
mesh
.
numSubEdges
;
}
void
MLineN
::
getEdgeRep
(
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
)
{
int
numSubEdges
=
CTX
::
instance
()
->
mesh
.
numSubEdges
;
SPoint3
pnt1
,
pnt2
;
pnt
(
-
1.
+
2
*
(
double
)
num
/
numSubEdges
,
0.
,
0.
,
pnt1
);
pnt
(
-
1.
+
2
*
(
double
)(
num
+
1
)
/
numSubEdges
,
0.
,
0
,
pnt2
);
x
[
0
]
=
pnt1
.
x
();
x
[
1
]
=
pnt2
.
x
();
y
[
0
]
=
pnt1
.
y
();
y
[
1
]
=
pnt2
.
y
();
z
[
0
]
=
pnt1
.
z
();
z
[
1
]
=
pnt2
.
z
();
n
[
0
]
=
n
[
1
]
=
MEdge
(
_v
[
0
],
_v
[
1
]).
normal
();
}
This diff is collapsed.
Click to expand it.
Geo/MLine.h
+
4
−
15
View file @
87a823f6
...
...
@@ -133,14 +133,8 @@ class MLine3 : public MLine {
}
virtual
MVertex
*
getVertexINP
(
int
num
){
return
getVertexUNV
(
num
);
}
virtual
int
getNumEdgeVertices
()
const
{
return
1
;
}
virtual
int
getNumEdgesRep
(){
return
2
;
}
virtual
void
getEdgeRep
(
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
)
{
static
const
int
e
[
2
][
2
]
=
{
{
0
,
2
},
{
2
,
1
}
};
_getEdgeRep
(
getVertex
(
e
[
num
][
0
]),
getVertex
(
e
[
num
][
1
]),
x
,
y
,
z
,
n
);
}
virtual
int
getNumEdgesRep
();
virtual
void
getEdgeRep
(
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
);
virtual
void
getEdgeVertices
(
const
int
num
,
std
::
vector
<
MVertex
*>
&
v
)
const
{
v
.
resize
(
3
);
...
...
@@ -188,13 +182,8 @@ class MLineN : public MLine {
virtual
MVertex
*
getVertex
(
int
num
){
return
num
<
2
?
_v
[
num
]
:
_vs
[
num
-
2
];
}
virtual
const
MVertex
*
getVertex
(
int
num
)
const
{
return
num
<
2
?
_v
[
num
]
:
_vs
[
num
-
2
];
}
virtual
int
getNumEdgeVertices
()
const
{
return
_vs
.
size
();
}
virtual
int
getNumEdgesRep
(){
return
_vs
.
size
()
+
1
;
}
virtual
void
getEdgeRep
(
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
)
{
_getEdgeRep
(
getVertex
((
num
==
0
)
?
0
:
num
+
1
),
getVertex
((
num
==
getNumEdgesRep
()
-
1
)
?
1
:
num
+
2
),
x
,
y
,
z
,
n
);
}
virtual
int
getNumEdgesRep
();
virtual
void
getEdgeRep
(
int
num
,
double
*
x
,
double
*
y
,
double
*
z
,
SVector3
*
n
);
virtual
void
getEdgeVertices
(
const
int
num
,
std
::
vector
<
MVertex
*>
&
v
)
const
{
v
.
resize
(
2
+
_vs
.
size
());
...
...
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