Chi-Tech
pwl_slab_01_refslab.cc
Go to the documentation of this file.
1
#include "
PieceWiseLinearSlabMapping.h
"
2
3
namespace
chi_math::cell_mapping
4
{
5
6
double
PieceWiseLinearSlabMapping::SlabShape
(uint32_t index,
7
const
chi_mesh::Vector3
& qpoint,
8
bool
on_surface,
9
uint32_t edge)
const
10
{
11
double
xi = 0.0;
12
if
(!on_surface) xi = qpoint.
x
;
13
else
14
xi =
static_cast<
double
>
(edge);
15
16
double
value = 0.0;
17
if
(index == 0) value = 1.0 - xi;
18
else
if
(index == 1)
19
value = xi;
20
21
return
value;
22
}
23
24
double
PieceWiseLinearSlabMapping::SlabGradShape
(uint32_t index)
const
25
{
26
double
value = 0.0;
27
28
if
(index == 0) value = -1.0 /
h_
;
29
else
30
value = 1.0 /
h_
;
31
32
return
value;
33
}
34
35
}
// namespace chi_math::cell_mapping
PieceWiseLinearSlabMapping.h
chi_math::cell_mapping::PieceWiseLinearSlabMapping::SlabShape
double SlabShape(uint32_t index, const chi_mesh::Vector3 &qpoint, bool on_surface=false, uint32_t edge=0) const
Definition:
pwl_slab_01_refslab.cc:6
chi_math::cell_mapping::PieceWiseLinearSlabMapping::SlabGradShape
double SlabGradShape(uint32_t index) const
Definition:
pwl_slab_01_refslab.cc:24
chi_math::cell_mapping::PieceWiseLinearSlabMapping::h_
double h_
Definition:
PieceWiseLinearSlabMapping.h:60
chi_math::cell_mapping
Definition:
FiniteVolumeMapping.cc:6
chi_mesh::Vector3
Definition:
chi_meshvector.h:19
chi_mesh::Vector3::x
double x
Element-0.
Definition:
chi_meshvector.h:20
framework
math
SpatialDiscretization
CellMappings
PieceWiseLinear
pwl_slab_01_refslab.cc
Generated by
1.9.3