https://mooseframework.inl.gov
Loading...
Searching...
No Matches
xfem
src
efa
EFAFuncs.C
Go to the documentation of this file.
1
//* This file is part of the MOOSE framework
2
//* https://mooseframework.inl.gov
3
//*
4
//* All rights reserved, see COPYRIGHT for full restrictions
5
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6
//*
7
//* Licensed under LGPL 2.1, please see LICENSE for details
8
//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10
#include "
EFAFuncs.h
"
11
12
namespace
Efa
13
{
14
15
double
16
linearQuadShape2D
(
unsigned
int
node_id, std::vector<double> & xi_2d)
17
{
18
double
node_xi[4][2] = {{-1.0, -1.0}, {1.0, -1.0}, {1.0, 1.0}, {-1.0, 1.0}};
19
return
0.25 * (1.0 + node_xi[node_id][0] * xi_2d[0]) * (1.0 + node_xi[node_id][1] * xi_2d[1]);
20
}
21
22
double
23
linearTriShape2D
(
unsigned
int
node_id, std::vector<double> & xi_2d)
24
{
25
std::vector<double> area_xi(3, 0.0);
26
area_xi[0] = xi_2d[0];
27
area_xi[1] = xi_2d[1];
28
area_xi[2] = 1.0 - xi_2d[0] - xi_2d[1];
29
return
area_xi[node_id];
30
}
31
32
double
33
linearHexShape3D
(
unsigned
int
node_id, std::vector<double> & xi_3d)
34
{
35
double
node_xi[8][3] = {{-1.0, -1.0, -1.0},
36
{1.0, -1.0, -1.0},
37
{1.0, 1.0, -1.0},
38
{-1.0, 1.0, -1.0},
39
{-1.0, -1.0, 1.0},
40
{1.0, -1.0, 1.0},
41
{1.0, 1.0, 1.0},
42
{-1.0, 1.0, 1.0}};
43
return
0.125 * (1.0 + node_xi[node_id][0] * xi_3d[0]) * (1.0 + node_xi[node_id][1] * xi_3d[1]) *
44
(1.0 + node_xi[node_id][2] * xi_3d[2]);
45
}
46
47
double
48
linearTetShape3D
(
unsigned
int
node_id, std::vector<double> & xi_3d)
49
{
50
std::vector<double> vol_xi(4, 0.0);
51
for
(
unsigned
int
i = 0; i < 3; ++i)
52
vol_xi[i] = xi_3d[i];
53
vol_xi[3] = 1.0 - xi_3d[0] - xi_3d[1] - xi_3d[2];
54
return
vol_xi[node_id];
55
}
56
57
}
// namespace Efa
EFAFuncs.h
Efa
Definition
EFAFuncs.h:18
Efa::linearHexShape3D
double linearHexShape3D(unsigned int node_id, std::vector< double > &xi_3d)
Definition
EFAFuncs.C:33
Efa::linearTriShape2D
double linearTriShape2D(unsigned int node_id, std::vector< double > &xi_2d)
Definition
EFAFuncs.C:23
Efa::linearTetShape3D
double linearTetShape3D(unsigned int node_id, std::vector< double > &xi_3d)
Definition
EFAFuncs.C:48
Efa::linearQuadShape2D
double linearQuadShape2D(unsigned int node_id, std::vector< double > &xi_2d)
Definition
EFAFuncs.C:16
Generated on Fri Aug 21 2026 13:42:03 for https://mooseframework.inl.gov by
1.9.8