Chi-Tech
cfem_diffusion_bndry.h
Go to the documentation of this file.
1#ifndef CFEM_DIFFUSION_BOUNDARY_H
2#define CFEM_DIFFUSION_BOUNDARY_H
3
4#include <array>
5
7{
8 class Boundary;
9
10 enum class BoundaryType : int
11 {
12 Reflecting = 1,
13 Dirichlet = 2,
14 Neumann = 3,
15 Robin = 4,
16 Vacuum = 5
17 };
18}
19
20//###################################################################
21/**Parent class for diffusion boundaries*/
23{
24public:
26
27 std::array<double, 3> values_ = {0.,0.,0.};
28};
29
30
31// //###################################################################
32// /**Robin boundary condition is a natural (i.w., weak) boundary condition of
33// // the form
34// *
35// \f[
36// a \phi + b D \hat{n}\cdot \nabla \phi = f
37// \f]
38// When \f$ a=0\f$ the boundary condition is equivalent to a <B>Neumann</B>
39// boundary condition.
40// \f[
41// b D\hat{n}\cdot \nabla \phi = f
42// \f]
43// When \f$ a=\frac{1}{4} \f$, \f$ b=\frac{1}{2} \f$
44// and \f$ f=0 \f$ then the boundary condition is equivalent to a
45// <B>Vacuum</B> boundary condition.
46// \f[
47// \frac{1}{4}\phi + \frac{1}{2}D\hat{n}\cdot \nabla \phi = 0
48// \f]
49// */
50// However, one should not set \f$b=0$\f in the hopes of obtaining a
51// <B>Dirichlet</B> boundary condition as this type of boundary condition is
52// strongly imposed in a different implementation.
53
54#endif //CFEM_DIFFUSION_BOUNDARY_H
std::array< double, 3 > values_