Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
6dc0e768
Commit
6dc0e768
authored
6 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Support for tetrahedron
parent
135faf5b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mesh/Connectivity3D.hpp
+26
-7
26 additions, 7 deletions
src/mesh/Connectivity3D.hpp
src/output/VTKWriter.hpp
+5
-1
5 additions, 1 deletion
src/output/VTKWriter.hpp
with
31 additions
and
8 deletions
src/mesh/Connectivity3D.hpp
+
26
−
7
View file @
6dc0e768
...
...
@@ -163,8 +163,29 @@ private:
switch
(
cell_nb_nodes
)
{
case
4
:
{
// tetrahedron
cell_nb_faces
[
j
]
=
4
;
std
::
cerr
<<
"tetrahedron cell type NIY!
\n
"
;
std
::
exit
(
0
);
// face 0
Face
f0
({
m_cell_nodes
(
j
,
1
),
m_cell_nodes
(
j
,
2
),
m_cell_nodes
(
j
,
3
)});
face_cells_map
[
f0
].
push_back
(
std
::
make_tuple
(
j
,
0
,
f0
.
reversed
()));
// face 1
Face
f1
({
m_cell_nodes
(
j
,
0
),
m_cell_nodes
(
j
,
3
),
m_cell_nodes
(
j
,
2
)});
face_cells_map
[
f1
].
push_back
(
std
::
make_tuple
(
j
,
1
,
f1
.
reversed
()));
// face 2
Face
f2
({
m_cell_nodes
(
j
,
0
),
m_cell_nodes
(
j
,
1
),
m_cell_nodes
(
j
,
3
)});
face_cells_map
[
f2
].
push_back
(
std
::
make_tuple
(
j
,
2
,
f2
.
reversed
()));
// face 3
Face
f3
({
m_cell_nodes
(
j
,
0
),
m_cell_nodes
(
j
,
2
),
m_cell_nodes
(
j
,
1
)});
face_cells_map
[
f3
].
push_back
(
std
::
make_tuple
(
j
,
3
,
f3
.
reversed
()));
break
;
}
case
8
:
{
// hexahedron
...
...
@@ -225,14 +246,10 @@ private:
m_cell_nb_faces
=
cell_nb_faces
;
m_number_of_faces
=
face_cells_map
.
size
();
Kokkos
::
View
<
unsigned
short
*>
face_nb_nodes
(
"face_nb_nodes"
,
m_number_of_faces
);
Kokkos
::
parallel_for
(
m_number_of_faces
,
KOKKOS_LAMBDA
(
const
unsigned
int
&
l
)
{
face_nb_nodes
[
l
]
=
4
;
});
m_face_nb_nodes
=
face_nb_nodes
;
std
::
cerr
<<
__FILE__
<<
':'
<<
__LINE__
<<
':'
<<
rang
::
fg
::
red
<<
" m_max_nb_node_per_face forced to 4"
<<
rang
::
fg
::
reset
<<
'\n'
;
Kokkos
::
View
<
unsigned
short
*>
face_nb_nodes
(
"face_nb_nodes"
,
m_number_of_faces
);
m_max_nb_node_per_face
=
4
;
Kokkos
::
View
<
unsigned
int
**>
face_nodes
(
"face_nodes"
,
m_number_of_faces
,
m_max_nb_node_per_face
);
{
...
...
@@ -242,10 +259,12 @@ private:
for
(
size_t
r
=
0
;
r
<
face
.
nodeIdList
().
size
();
++
r
)
{
face_nodes
(
l
,
r
)
=
face
.
nodeIdList
()[
r
];
}
face_nb_nodes
[
l
]
=
face
.
nodeIdList
().
size
();
++
l
;
}
}
m_face_nodes
=
face_nodes
;
m_face_nb_nodes
=
face_nb_nodes
;
Kokkos
::
View
<
unsigned
short
*>
face_nb_cells
(
"face_nb_cells"
,
m_number_of_faces
);
{
...
...
This diff is collapsed.
Click to expand it.
src/output/VTKWriter.hpp
+
5
−
1
View file @
6dc0e768
...
...
@@ -102,7 +102,11 @@ class VTKWriter
break
;
}
case
4
:
{
fout
<<
"9 "
;
if
(
mesh
.
meshDimension
()
==
3
)
{
fout
<<
"10 "
;
}
else
{
fout
<<
"9 "
;
}
break
;
}
case
8
:
{
...
...
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