Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
include
FEM
JGNselector.h
Go to the documentation of this file.
1
/* This file is part of MoDELib, the Mechanics Of Defects Evolution Library.
2
*
3
*
4
* MoDELib is distributed without any warranty under the
5
* GNU General Public License (GPL) v2 <http://www.gnu.org/licenses/>.
6
*/
7
8
#ifndef model_JGNselector_H_
9
#define model_JGNselector_H_
10
11
#include <Eigen/Dense>
12
13
namespace
model
14
{
15
template
<
int
cols>
16
struct
JGNselector
17
{
18
template
<
int
dim>
19
static
Eigen::Matrix<double,dim,1>
jGN
(
const
Eigen::Matrix<double,dim,1>& jgn)
20
{
21
static_assert
(cols==dim,
"DerivedEval MUST HAVE EXACTLY either one or dim COLUMNS"
);
22
return
jgn;
23
}
24
25
};
26
27
template
<>
28
struct
JGNselector
<1>
29
{
30
template
<
int
dim>
31
static
double
jGN
(
const
Eigen::Matrix<double,dim,1>& jgn)
32
{
33
return
jgn.norm();
34
}
35
36
};
37
38
}
// close namespace
39
#endif
model
Definition
DD_converter.dox:2
model::JGNselector< 1 >::jGN
static double jGN(const Eigen::Matrix< double, dim, 1 > &jgn)
Definition
JGNselector.h:31
model::JGNselector
Definition
JGNselector.h:17
model::JGNselector::jGN
static Eigen::Matrix< double, dim, 1 > jGN(const Eigen::Matrix< double, dim, 1 > &jgn)
Definition
JGNselector.h:19
Generated by
1.15.0