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
6
namespace
cfem_diffusion
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*/
22
class
cfem_diffusion::Boundary
23
{
24
public
:
25
BoundaryType
type_
=
BoundaryType::Dirichlet
;
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
cfem_diffusion::Boundary
Definition:
cfem_diffusion_bndry.h:23
cfem_diffusion::Boundary::type_
BoundaryType type_
Definition:
cfem_diffusion_bndry.h:25
cfem_diffusion::Boundary::values_
std::array< double, 3 > values_
Definition:
cfem_diffusion_bndry.h:27
cfem_diffusion
Definition:
cfem_diffusion_bndry.h:7
cfem_diffusion::BoundaryType
BoundaryType
Definition:
cfem_diffusion_bndry.h:11
cfem_diffusion::BoundaryType::Robin
@ Robin
cfem_diffusion::BoundaryType::Vacuum
@ Vacuum
cfem_diffusion::BoundaryType::Reflecting
@ Reflecting
cfem_diffusion::BoundaryType::Neumann
@ Neumann
cfem_diffusion::BoundaryType::Dirichlet
@ Dirichlet
modules
CFEMDiffusion
cfem_diffusion_bndry.h
Generated by
1.9.3