v0.16.0
Loading...
Searching...
No Matches
Functions
Hdiv.cpp File Reference

Implementation of H-curl base. More...

Go to the source code of this file.

Functions

static double get_ksi (const double n0, const double n1)
 
static FTensor::Tensor1< double, 3 > get_diff_ksi (const double *diffN, const int n0, const int n1)
 

Detailed Description

Implementation of H-curl base.

Based on Hierarchic Finite Element Bases on Unstructured Tetrahedral Meshes, by Mark Ainsworth and Joe Coyle Shape functions for MBTRI/MBTET and HCurl space

Definition in file Hdiv.cpp.

Function Documentation

◆ get_diff_ksi()

static FTensor::Tensor1< double, 3 > get_diff_ksi ( const double diffN,
const int  n0,
const int  n1 
)
inlinestatic

Definition at line 70 of file Hdiv.cpp.

71 {
72 static_assert(
74 AinsworthHdivOptions::EdgeCoordinate::PAPER ||
76 AinsworthHdivOptions::EdgeCoordinate::ENDPOINT_O ||
78 AinsworthHdivOptions::EdgeCoordinate::ENDPOINT_I,
79 "Unsupported Ainsworth H(div) edge coordinate");
80
82 for (int dd = 0; dd != 3; ++dd) {
84 AinsworthHdivOptions::EdgeCoordinate::PAPER) {
85 t_diff_ksi(dd) = diffN[3 * n1 + dd] - diffN[3 * n0 + dd];
86 } else if constexpr (AinsworthHdivOptions::edge_coordinate ==
87 AinsworthHdivOptions::EdgeCoordinate::ENDPOINT_O) {
88 t_diff_ksi(dd) = -2 * diffN[3 * n0 + dd];
89 } else if constexpr (AinsworthHdivOptions::edge_coordinate ==
90 AinsworthHdivOptions::EdgeCoordinate::ENDPOINT_I) {
91 t_diff_ksi(dd) = 2 * diffN[3 * n1 + dd];
92 }
93 }
94 return t_diff_ksi;
95}
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition ddTensor0.hpp:33
static constexpr EdgeCoordinate edge_coordinate
Selected edge coordinate variant.
Definition Hdiv.hpp:50

◆ get_ksi()

static double get_ksi ( const double  n0,
const double  n1 
)
inlinestatic

Definition at line 47 of file Hdiv.cpp.

47 {
48 static_assert(
50 AinsworthHdivOptions::EdgeCoordinate::PAPER ||
52 AinsworthHdivOptions::EdgeCoordinate::ENDPOINT_O ||
54 AinsworthHdivOptions::EdgeCoordinate::ENDPOINT_I,
55 "Unsupported Ainsworth H(div) edge coordinate");
56
58 AinsworthHdivOptions::EdgeCoordinate::PAPER) {
59 return n1 - n0;
60 } else if constexpr (AinsworthHdivOptions::edge_coordinate ==
61 AinsworthHdivOptions::EdgeCoordinate::ENDPOINT_O) {
62 return 1 - 2 * n0;
63 } else if constexpr (AinsworthHdivOptions::edge_coordinate ==
64 AinsworthHdivOptions::EdgeCoordinate::ENDPOINT_I) {
65 return 2 * n1 - 1;
66 }
67 return 0;
68}