mbsim 4.0.0 MBSim Kernel

ansatz_functions.h
1 /* Copyright (C) 2004-2009 MBSim Development Team
2 * This library is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either
5 * version 2.1 of the License, or (at your option) any later version.
6 *
7 * This library is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
11 *
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with this library; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 *
16 * Contact: martin.o.foerg@googlemail.com
17 */
18
19 #ifndef _ANSATZ_FUNCTIONS_H_
20 #define _ANSATZ_FUNCTIONS_H_
21
22 #include "fmatvec/fmatvec.h"
23
28 class ansatz_function {
29 public:
31 fmatvec::SymMat MatIntWWT();
32
34 fmatvec::SymMat MatIntWSWST();
35
37 fmatvec::Vec VecW0();
38
40 fmatvec::Vec VecWL();
41
43 fmatvec::Vec VecIntW();
44
46 fmatvec::Vec VecW(double xi);
47
49 fmatvec::Vec VecWS(double xi);
50
52 int order();
53
55 int dim();
56
60 ansatz_function(int n, double l);
61
63 virtual ~ansatz_function();
64
65 protected:
67 virtual double Intwiwj(int i, int j)=0;
68
70 virtual double Intwsiwsj(int i, int j)=0;
71
73 virtual double wi0(int i)=0;
74
76 virtual double wiL(int i)=0;
77
79 virtual double Intwi(int i)=0;
80
82 virtual double wi(int i, double xi)=0;
83
85 virtual double wis(int i, double xi)=0;
86
88 int Ord;
89
91 int Dim;
92
94 double L;
95 };
96
97
99 class ansatz_function_harmonic : public ansatz_function {
100 public:
104 ansatz_function_harmonic(int n, double l);
105
106 protected:
108 double Intwiwj(int i, int j) override;
109
111 double Intwsiwsj(int i, int j) override;
112
114 double wi0(int i) override;
115
117 double wiL(int i) override;
118
120 double Intwi(int i) override;
121
123 double wi(int i, double xi) override;
124
126 double wis(int i, double xi) override;
127 };
128
129
131 class ansatz_function_polynom : public ansatz_function {
132 public:
136 ansatz_function_polynom(int n, double l);
137
138 protected:
140 double Intwiwj(int i, int j) override;
141
143 double Intwsiwsj(int i, int j) override;
144
146 double wi0(int i) override;
147
149 double wiL(int i) override;
150
152 double Intwi(int i) override;
153
155 double wi(int i, double xi) override;
156
158 double wis(int i, double xi) override;
159 };
160
161
162
164 class ansatz_function_BSplineOrd3 : public ansatz_function {
165 public:
169 ansatz_function_BSplineOrd3(int n, double l);
170
171 protected:
173 double Intwiwj(int i, int j) override;
174
176 double Intwsiwsj(int i, int j) override;
177
179 double wi0(int i) override;
180
182 double wiL(int i) override;
183
185 double Intwi(int i) override;
186
188 double wi(int i, double xi) override;
189
191 double wis(int i, double xi) override;
192 };
193
194
196 class ansatz_function_BSplineOrd4 : public ansatz_function {
197 public:
201 ansatz_function_BSplineOrd4(int n, double l);
202
203 protected:
205 double Intwiwj(int i, int j) override;
206
208 double Intwsiwsj(int i, int j) override;
209
211 double wi0(int i) override;
212
214 double wiL(int i) override;
215
217 double Intwi(int i) override;
218
220 double wi(int i, double xi) override;
221
223 double wis(int i, double xi) override;
224 };
225
226 #endif /* ----- #ifndef _ANSATZ_FUNCTIONS_H_ ----- */
227
ansatz_function_BSplineOrd3::Intwiwj
double Intwiwj(int i, int j) override
Definition: ansatz_functions.cc:208
ansatz_function_BSplineOrd3
Definition: ansatz_functions.h:164
ansatz_function::wis
virtual double wis(int i, double xi)=0
ansatz_function_BSplineOrd4::wiL
double wiL(int i) override
Definition: ansatz_functions.cc:306
ansatz_function_BSplineOrd4::Intwiwj
double Intwiwj(int i, int j) override
Definition: ansatz_functions.cc:271
ansatz_function_BSplineOrd3::wis
double wis(int i, double xi) override
Definition: ansatz_functions.cc:254
ansatz_function::VecWL
fmatvec::Vec VecWL()
Definition: ansatz_functions.cc:52
ansatz_function_BSplineOrd4::Intwi
double Intwi(int i) override
Definition: ansatz_functions.cc:313
ansatz_function_BSplineOrd3::Intwi
double Intwi(int i) override
Definition: ansatz_functions.cc:238
ansatz_function::L
double L
Definition: ansatz_functions.h:94
ansatz_function_polynom
Definition: ansatz_functions.h:131
ansatz_function_BSplineOrd4::wi
double wi(int i, double xi) override
Definition: ansatz_functions.cc:320
ansatz_function::Intwsiwsj
virtual double Intwsiwsj(int i, int j)=0
ansatz_function::MatIntWWT
fmatvec::SymMat MatIntWWT()
Definition: ansatz_functions.cc:29
ansatz_function_BSplineOrd3::wiL
double wiL(int i) override
Definition: ansatz_functions.cc:233
ansatz_function::dim
int dim()
Definition: ansatz_functions.cc:84
ansatz_function::Ord
int Ord
Definition: ansatz_functions.h:88
ansatz_function::VecW0
fmatvec::Vec VecW0()
Definition: ansatz_functions.cc:45
ansatz_function_polynom::wi
double wi(int i, double xi) override
Definition: ansatz_functions.cc:189
ansatz_function_BSplineOrd3::wi0
double wi0(int i) override
Definition: ansatz_functions.cc:228
ansatz_function::~ansatz_function
virtual ~ansatz_function()
ansatz_function_polynom::wis
double wis(int i, double xi) override
Definition: ansatz_functions.cc:193
ansatz_function_harmonic::ansatz_function_harmonic
ansatz_function_harmonic(int n, double l)
Definition: ansatz_functions.cc:90
ansatz_function_BSplineOrd3::ansatz_function_BSplineOrd3
ansatz_function_BSplineOrd3(int n, double l)
Definition: ansatz_functions.cc:204
ansatz_function::ansatz_function
ansatz_function(int n, double l)
Definition: ansatz_functions.cc:24
ansatz_function::VecWS
fmatvec::Vec VecWS(double xi)
Definition: ansatz_functions.cc:73
ansatz_function_polynom::wiL
double wiL(int i) override
Definition: ansatz_functions.cc:181
ansatz_function_BSplineOrd4::Intwsiwsj
double Intwsiwsj(int i, int j) override
Definition: ansatz_functions.cc:285
ansatz_function_harmonic::Intwiwj
double Intwiwj(int i, int j) override
Definition: ansatz_functions.cc:94
ansatz_function_polynom::Intwiwj
double Intwiwj(int i, int j) override
Definition: ansatz_functions.cc:163
ansatz_function_BSplineOrd3::wi
double wi(int i, double xi) override
Definition: ansatz_functions.cc:244
ansatz_function_polynom::ansatz_function_polynom
ansatz_function_polynom(int n, double l)
Definition: ansatz_functions.cc:159
ansatz_function_polynom::Intwsiwsj
double Intwsiwsj(int i, int j) override
Definition: ansatz_functions.cc:167
ansatz_function_polynom::wi0
double wi0(int i) override
Definition: ansatz_functions.cc:174
ansatz_function::MatIntWSWST
fmatvec::SymMat MatIntWSWST()
Definition: ansatz_functions.cc:37
ansatz_function_BSplineOrd4::ansatz_function_BSplineOrd4
ansatz_function_BSplineOrd4(int n, double l)
Definition: ansatz_functions.cc:267
ansatz_function::wi
virtual double wi(int i, double xi)=0
ansatz_function::Dim
int Dim
Definition: ansatz_functions.h:91
ansatz_function::VecIntW
fmatvec::Vec VecIntW()
Definition: ansatz_functions.cc:59
ansatz_function::wi0
virtual double wi0(int i)=0
ansatz_function_harmonic::wi0
double wi0(int i) override
Definition: ansatz_functions.cc:119
ansatz_function::wiL
virtual double wiL(int i)=0
ansatz_function_harmonic
Definition: ansatz_functions.h:99
ansatz_function_BSplineOrd3::Intwsiwsj
double Intwsiwsj(int i, int j) override
Definition: ansatz_functions.cc:218
ansatz_function_polynom::Intwi
double Intwi(int i) override
Definition: ansatz_functions.cc:185
ansatz_function_harmonic::wis
double wis(int i, double xi) override
Definition: ansatz_functions.cc:149
ansatz_function_harmonic::wiL
double wiL(int i) override
Definition: ansatz_functions.cc:125
ansatz_function
a class of ansatz-functions for approximations with Galerkin-Method
Definition: ansatz_functions.h:28
ansatz_function::Intwi
virtual double Intwi(int i)=0
ansatz_function::VecW
fmatvec::Vec VecW(double xi)
Definition: ansatz_functions.cc:66
ansatz_function_BSplineOrd4
Definition: ansatz_functions.h:196
ansatz_function_harmonic::Intwi
double Intwi(int i) override
Definition: ansatz_functions.cc:133
ansatz_function::Intwiwj
virtual double Intwiwj(int i, int j)=0
ansatz_function::order
int order()
Definition: ansatz_functions.cc:80
ansatz_function_harmonic::wi
double wi(int i, double xi) override
Definition: ansatz_functions.cc:141
ansatz_function_harmonic::Intwsiwsj
double Intwsiwsj(int i, int j) override
Definition: ansatz_functions.cc:108
ansatz_function_BSplineOrd4::wis
double wis(int i, double xi) override
Definition: ansatz_functions.cc:331
ansatz_function_BSplineOrd4::wi0
double wi0(int i) override
Definition: ansatz_functions.cc:299