Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79311329
element_class_hexahedron_20_inline_impl.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Aug 25, 18:43
Size
9 KB
Mime Type
text/x-c++
Expires
Tue, Aug 27, 18:43 (2 d)
Engine
blob
Format
Raw Data
Handle
20170425
Attached To
rAKA akantu
element_class_hexahedron_20_inline_impl.hh
View Options
/**
* @file element_class_hexahedron_20_inline_impl.hh
*
* @author Mauro Corrado <mauro.corrado@epfl.ch>
* @author Sacha Laffely <sacha.laffely@epfl.ch>
* @author Damien Scantamburlo <damien.scantamburlo@epfl.ch>
*
* @date creation: Tue Mar 31 2015
* @date last modification: Wed Oct 11 2017
*
* @brief Specialization of the element_class class for the type _hexahedron_20
*
*
* Copyright (©) 2015-2018 EPFL (Ecole Polytechnique Fédérale de Lausanne)
Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* Akantu is free software: you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
*
* Akantu is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
*
* You should have received a copy of the GNU Lesser General Public License
along with Akantu. If not, see <http://www.gnu.org/licenses/>.
*
*
* @verbatim
\y
\z /
| /
7-----|18--------6
/| | / /|
/ | | / / |
19 | | / 17 |
/ 15 | / / 14
/ | | / / |
4-------16---/---5 |
| | +----|------------\x
| 3-------10-|-----2
| / | /
12 / 13 /
| 11 | 9
| / | /
|/ |/
0--------8-------1
x y z
* N0 -1 -1 -1
* N1 1 -1 -1
* N2 1 1 -1
* N3 -1 1 -1
* N4 -1 -1 1
* N5 1 -1 1
* N6 1 1 1
* N7 -1 1 1
* N8 0 -1 -1
* N9 1 0 -1
* N10 0 1 -1
* N11 -1 0 -1
* N12 -1 -1 0
* N13 1 -1 0
* N14 1 1 0
* N15 -1 1 0
* N16 0 -1 1
* N17 1 0 1
* N18 0 1 1
* N19 -1 0 1
* \endverbatim
*/
/* -------------------------------------------------------------------------- */
#include "element_class.hh"
/* -------------------------------------------------------------------------- */
namespace
akantu
{
/* -------------------------------------------------------------------------- */
AKANTU_DEFINE_ELEMENT_CLASS_PROPERTY
(
_hexahedron_20
,
_gt_hexahedron_20
,
_itp_serendip_hexahedron_20
,
_ek_regular
,
3
,
_git_segment
,
3
);
/* -------------------------------------------------------------------------- */
template
<>
template
<
class
vector_type
>
inline
void
InterpolationElement
<
_itp_serendip_hexahedron_20
>::
computeShapes
(
const
vector_type
&
c
,
vector_type
&
N
)
{
// Shape function , Natural coordinates
N
(
0
)
=
0.125
*
(
1
-
c
(
0
))
*
(
1
-
c
(
1
))
*
(
1
-
c
(
2
))
*
(
-
2
-
c
(
0
)
-
c
(
1
)
-
c
(
2
));
N
(
1
)
=
0.125
*
(
1
+
c
(
0
))
*
(
1
-
c
(
1
))
*
(
1
-
c
(
2
))
*
(
-
2
+
c
(
0
)
-
c
(
1
)
-
c
(
2
));
N
(
2
)
=
0.125
*
(
1
+
c
(
0
))
*
(
1
+
c
(
1
))
*
(
1
-
c
(
2
))
*
(
-
2
+
c
(
0
)
+
c
(
1
)
-
c
(
2
));
N
(
3
)
=
0.125
*
(
1
-
c
(
0
))
*
(
1
+
c
(
1
))
*
(
1
-
c
(
2
))
*
(
-
2
-
c
(
0
)
+
c
(
1
)
-
c
(
2
));
N
(
4
)
=
0.125
*
(
1
-
c
(
0
))
*
(
1
-
c
(
1
))
*
(
1
+
c
(
2
))
*
(
-
2
-
c
(
0
)
-
c
(
1
)
+
c
(
2
));
N
(
5
)
=
0.125
*
(
1
+
c
(
0
))
*
(
1
-
c
(
1
))
*
(
1
+
c
(
2
))
*
(
-
2
+
c
(
0
)
-
c
(
1
)
+
c
(
2
));
N
(
6
)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
*
(
1
-
c
(
0
))
*
(
1
+
c
(
2
));
}
/* -------------------------------------------------------------------------- */
template
<>
template
<
class
vector_type
,
class
matrix_type
>
inline
void
InterpolationElement
<
_itp_serendip_hexahedron_20
>::
computeDNDS
(
const
vector_type
&
c
,
matrix_type
&
dnds
)
{
// derivatives
// ddx
dnds
(
0
,
0
)
=
0.25
*
(
c
(
0
)
+
0.5
*
(
c
(
1
)
+
c
(
2
)
+
1
))
*
(
c
(
1
)
-
1
)
*
(
c
(
2
)
-
1
);
dnds
(
0
,
1
)
=
0.25
*
(
c
(
0
)
-
0.5
*
(
c
(
1
)
+
c
(
2
)
+
1
))
*
(
c
(
1
)
-
1
)
*
(
c
(
2
)
-
1
);
dnds
(
0
,
2
)
=
-
0.25
*
(
c
(
0
)
+
0.5
*
(
c
(
1
)
-
c
(
2
)
-
1
))
*
(
c
(
1
)
+
1
)
*
(
c
(
2
)
-
1
);
dnds
(
0
,
3
)
=
-
0.25
*
(
c
(
0
)
-
0.5
*
(
c
(
1
)
-
c
(
2
)
-
1
))
*
(
c
(
1
)
+
1
)
*
(
c
(
2
)
-
1
);
dnds
(
0
,
4
)
=
-
0.25
*
(
c
(
0
)
+
0.5
*
(
c
(
1
)
-
c
(
2
)
+
1
))
*
(
c
(
1
)
-
1
)
*
(
c
(
2
)
+
1
);
dnds
(
0
,
5
)
=
-
0.25
*
(
c
(
0
)
-
0.5
*
(
c
(
1
)
-
c
(
2
)
+
1
))
*
(
c
(
1
)
-
1
)
*
(
c
(
2
)
+
1
);
dnds
(
0
,
6
)
=
0.25
*
(
c
(
0
)
+
0.5
*
(
c
(
1
)
+
c
(
2
)
-
1
))
*
(
c
(
1
)
+
1
)
*
(
c
(
2
)
+
1
);
dnds
(
0
,
7
)
=
0.25
*
(
c
(
0
)
-
0.5
*
(
c
(
1
)
+
c
(
2
)
-
1
))
*
(
c
(
1
)
+
1
)
*
(
c
(
2
)
+
1
);
dnds
(
0
,
8
)
=
-
0.5
*
c
(
0
)
*
(
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)
+
c
(
1
)
-
1
))
*
(
c
(
0
)
+
1
)
*
(
c
(
1
)
+
1
);
dnds
(
2
,
7
)
=
-
0.25
*
(
c
(
2
)
-
0.5
*
(
c
(
0
)
-
c
(
1
)
+
1
))
*
(
c
(
0
)
-
1
)
*
(
c
(
1
)
+
1
);
dnds
(
2
,
8
)
=
-
0.25
*
(
c
(
0
)
*
c
(
0
)
-
1
)
*
(
c
(
1
)
-
1
);
dnds
(
2
,
9
)
=
0.25
*
(
c
(
1
)
*
c
(
1
)
-
1
)
*
(
c
(
0
)
+
1
);
dnds
(
2
,
10
)
=
0.25
*
(
c
(
0
)
*
c
(
0
)
-
1
)
*
(
c
(
1
)
+
1
);
dnds
(
2
,
11
)
=
-
0.25
*
(
c
(
1
)
*
c
(
1
)
-
1
)
*
(
c
(
0
)
-
1
);
dnds
(
2
,
12
)
=
-
0.5
*
c
(
2
)
*
(
c
(
1
)
-
1
)
*
(
c
(
0
)
-
1
);
dnds
(
2
,
13
)
=
0.5
*
c
(
2
)
*
(
c
(
0
)
+
1
)
*
(
c
(
1
)
-
1
);
dnds
(
2
,
14
)
=
-
0.5
*
c
(
2
)
*
(
c
(
0
)
+
1
)
*
(
c
(
1
)
+
1
);
dnds
(
2
,
15
)
=
0.5
*
c
(
2
)
*
(
c
(
0
)
-
1
)
*
(
c
(
1
)
+
1
);
dnds
(
2
,
16
)
=
0.25
*
(
c
(
1
)
-
1
)
*
(
c
(
0
)
*
c
(
0
)
-
1
);
dnds
(
2
,
17
)
=
-
0.25
*
(
c
(
0
)
+
1
)
*
(
c
(
1
)
*
c
(
1
)
-
1
);
dnds
(
2
,
18
)
=
-
0.25
*
(
c
(
1
)
+
1
)
*
(
c
(
0
)
*
c
(
0
)
-
1
);
dnds
(
2
,
19
)
=
0.25
*
(
c
(
0
)
-
1
)
*
(
c
(
1
)
*
c
(
1
)
-
1
);
}
/* -------------------------------------------------------------------------- */
template
<>
inline
Real
GeometricalElement
<
_gt_hexahedron_20
>::
getInradius
(
const
Matrix
<
Real
>
&
coord
)
{
return
GeometricalElement
<
_gt_hexahedron_8
>::
getInradius
(
coord
)
*
0.5
;
}
}
// namespace akantu
Event Timeline
Log In to Comment