Chombo + EB + MF
3.2
src
Workshop
SineIF.H
Go to the documentation of this file.
1
#ifdef CH_LANG_CC
2
/*
3
* _______ __
4
* / ___/ / ___ __ _ / / ___
5
* / /__/ _ \/ _ \/ V \/ _ \/ _ \
6
* \___/_//_/\___/_/_/_/_.__/\___/
7
* Please refer to Copyright.txt, in Chombo's root directory.
8
*/
9
#endif
10
11
#ifndef _SINEIF_H_
12
#define _SINEIF_H_
13
14
#include "
MayDay.H
"
15
#include "
RealVect.H
"
16
17
#include "
BaseIF.H
"
18
19
#include "NamespaceHeader.H"
20
21
///
22
/**
23
This implicit function specifies a
24
sine function
25
given constants
26
x0, y0
27
A (magnitude)
28
F (frequency (first two comps))
29
2d:
30
f(x,y) = y - y0 + A*sin(pi*F(x-x0))
31
3d:
32
f(x,y,z) = z - z0 + A0*sin(pi*F0(x-x0))+ A1*sin(pi*F1(y-y0))
33
34
*/
35
class
SineIF
:
public
BaseIF
36
{
37
public
:
38
///
39
/**
40
last comp of frequency ignored
41
2d:
42
point = (x0, y0)
43
freq = (f0, f1)
44
f(x,y) = y - y0 + A0*sin(pi*f0(x-x0))
45
3d:
46
point = (x0, y0, z0)
47
freq = (f0, f1, f2)
48
f(x,y,z) = z - z0 + A0*sin(pi*(x-x0)) + A1*sin(pi*(y*y0))
49
50
*/
51
SineIF
(
const
RealVect
& a_A,
52
const
RealVect
& a_point,
53
const
RealVect
& a_F,
54
const
bool
& a_inside);
55
56
/// Destructor
57
virtual
~SineIF
()
58
{
59
}
60
61
virtual
Real
value
(
const
IndexTM<int,SpaceDim>
& a_partialDerivative,
62
const
IndexTM<Real,SpaceDim>
& a_point)
const
;
63
64
virtual
Real
value
(
const
RealVect
& a_point)
const
;
65
66
virtual
Real
value
(
const
IndexTM<Real,SpaceDim>
& a_point)
const
;
67
68
virtual
BaseIF
*
newImplicitFunction
()
const
;
69
70
protected
:
71
72
RealVect
m_A
;
73
RealVect
m_point
;
74
RealVect
m_F
;
75
bool
m_inside
;
76
RealVect
m_factor
;
77
RealVect
m_piF
;
78
private
:
79
SineIF
();
80
81
};
82
83
#include "NamespaceFooter.H"
84
#endif
SineIF::m_factor
RealVect m_factor
Definition:
SineIF.H:76
SineIF::m_A
RealVect m_A
Definition:
SineIF.H:72
MayDay.H
RealVect.H
IndexTM< int, SpaceDim >
SineIF::~SineIF
virtual ~SineIF()
Destructor.
Definition:
SineIF.H:57
BaseIF.H
BaseIF
Definition:
BaseIF.H:32
SineIF
Definition:
SineIF.H:35
Real
double Real
Definition:
REAL.H:33
SineIF::m_piF
RealVect m_piF
Definition:
SineIF.H:77
RealVect
A Real vector in SpaceDim-dimensional space.
Definition:
RealVect.H:41
SineIF::m_point
RealVect m_point
Definition:
SineIF.H:73
SineIF::m_F
RealVect m_F
Definition:
SineIF.H:74
SineIF::newImplicitFunction
virtual BaseIF * newImplicitFunction() const
SineIF::value
virtual Real value(const IndexTM< int, SpaceDim > &a_partialDerivative, const IndexTM< Real, SpaceDim > &a_point) const
SineIF::m_inside
bool m_inside
Definition:
SineIF.H:75
SineIF::SineIF
SineIF()
Generated by
1.8.13