Mercurial > hg > kwantix
annotate src/include/interpolator.hpp @ 29:24f3c4ed5c84
Halfway to replacing all namespaces with the kwantxi namespace
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Wed, 03 Feb 2010 18:18:38 -0600 |
parents | 0af772242000 |
children | d22bce6382d7 |
rev | line source |
---|---|
15
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
1 /*!\file interpolator.hpp |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
2 * |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
3 * \brief An interpolator \f$ \displaystyle u(x) = \sum_{\xi \in \Xi} |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
4 * \lambda_\xi \varphi_\xi(x) \f$, templated by RBFs, and its helper |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
5 * classes are declared here. |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
6 * |
16
29a7b95c2805
Essentially all Doxygen docstrings complete.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
15
diff
changeset
|
7 * \file interpolator.cpp |
29a7b95c2805
Essentially all Doxygen docstrings complete.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
15
diff
changeset
|
8 * \brief Implementations and instantiations of the functions and |
29a7b95c2805
Essentially all Doxygen docstrings complete.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
15
diff
changeset
|
9 * classes declared in interpolator.hpp |
15
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
10 */ |
12
6e06eb6ec448
Trivial change in include guards.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
11
diff
changeset
|
11 #ifndef __INTERPOLATOR_HPP__ |
6e06eb6ec448
Trivial change in include guards.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
11
diff
changeset
|
12 #define __INTERPOLATOR_HPP__ |
0 | 13 |
14 #include <vector> | |
15 #include <map> | |
16 #include <boost/shared_ptr.hpp> | |
24
ad9e3d28ce9b
Implement op<< for bvp::interpolator
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
17 #include <iostream> |
0 | 18 #include "bvp.hpp" |
19 #include "linalg.hpp" | |
20 #include "func.hpp" | |
21 #include "diff_op.hpp" | |
18
382e3b8e3f88
Compiles, and runs, but doesn't produce desired output. Must investigate this further.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
22 #include "interp_values.hpp" |
0 | 23 |
29
24f3c4ed5c84
Halfway to replacing all namespaces with the kwantxi namespace
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
28
diff
changeset
|
24 namespace kwantxi{ |
0 | 25 using std::map; |
26 using boost::shared_ptr; | |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
27 |
17
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
28 //FIXME: Break this up into an ansatz class and an interpolator |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
29 //class. |
15
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
30 /*! \brief An interpolator \f$ \displaystyle u(x) = \sum_{\xi \in |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
31 * \Xi} \lambda_\xi \varphi_\xi(x) \f$, where the \f$ \varphi_\xi |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
32 * \f$ are RBFs. |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
33 * |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
34 * An interpolator \f$ \displaystyle u(x) = \sum_{\xi \in \Xi} |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
35 * \lambda_\xi \varphi_\xi(x) \f$, where the \f$\varphi_\xi\f$ are |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
36 * RBFs centred at \f$\xi\f$, and \f$\Xi\f$ is a set of points on |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
37 * the interior and boundary of some domain \f$\Omega\f$. |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
38 * |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
39 * The interpolator can be used in various ways, initialised by |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
40 * either a BVP::linear_bvp2 or by interpolation data |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
41 * (i.e. std::map< linalg::point, double>). Once an interpolator is |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
42 * initialised, it becomes a bona fide bvp::realfunc, so that its |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
43 * evaluations and derivatives become available. For certain |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
44 * problems, it is convenient to be able to evaluate the |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
45 * interpolator or its derivatives at all points of the domain. It |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
46 * is also useful to be able to interpolate again on the same domain |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
47 * or with a slightly modified BVP. Interfaces to both of these |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
48 * functions are provided. |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
49 */ |
0 | 50 template<typename RBF> |
51 class interpolator : public realfunc{ | |
52 public: | |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
53 |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
54 /** @name Constructors |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
55 * |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
56 * Constructors that take interpolation data perform the |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
57 * interpolation as part of the initialisation, which includes |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
58 * factoring a matrix |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
59 */ |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
60 //@{ |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
61 ///Does not initialise the interpolator. |
0 | 62 interpolator(); |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
63 |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
64 ///Interpolate given a BVP |
0 | 65 interpolator(shared_ptr<linear_BVP2> bvp); |
66 | |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
67 ///Interpolate given some data points and the value at those points |
0 | 68 interpolator(const map<point, double>& Xi); |
69 | |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
70 /** \short Interpolate given a domain, data points and the value |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
71 * at those points |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
72 * |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
73 * Must provide domain information. The values of Xi must match |
15
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
74 * points on the given domain Omega. The reason why the domain |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
75 * might be relevant is in case it is important to specify which |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
76 * points are on the interior and which are on the boundary, so |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
77 * that it's possible to interpolate again by changing the values |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
78 * on either the interior or the boundary. |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
79 */ |
0 | 80 interpolator(shared_ptr<domain> Omega, const map<point, double>& Xi); |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
81 //@} |
0 | 82 |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
83 /** @name Interpolation |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
84 * |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
85 * Interpolate again either given new data or a different BVP. |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
86 */ |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
87 //@{ |
0 | 88 void interpolate(const map<point, double>& Xi); |
89 void interpolate(shared_ptr<linear_BVP2> bvp); | |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
90 |
14
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
91 /** \short Interpolate given values on the domain |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
92 * |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
93 * The given values must match the values returned by other |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
94 * interpolators on compatible domains. |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
95 */ |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
96 void interpolate(const interp_values& values); |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
97 //@} |
0 | 98 |
14
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
99 /** @name Pointwise evaluation and derivatives |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
100 */ |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
101 //@{ |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
102 ///Point evaluation |
0 | 103 double operator()(const point& p) const; |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
104 ///Point evaluation |
0 | 105 double at(const point& p) const; |
14
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
106 /// Pointwise first derivative |
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
107 double d(const point& p, size_t k) const; |
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
108 /// Pointwise second derivatives |
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
109 double d2(const point &p, size_t k1, size_t k2) const; |
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
110 //@} |
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
111 |
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
112 /** @name Full domain evaluation and derivatives |
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
113 */ |
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
114 //@{ |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
115 ///Full domain evaluation |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
116 interp_values operator()() const; |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
117 ///Full domain evaluation |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
118 interp_values at() const; |
15
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
119 /// Full domain first derivative |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
120 interp_values d(size_t k) const; |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
121 /// Full domain second derivatives |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
122 interp_values d2(size_t k1, size_t k2) const; |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
123 //@} |
0 | 124 |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
125 /** @name Precomputation of RBFs |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
126 * |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
127 * The following functions will precompute upon request all the |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
128 * interpolator's RBFs at all points of the domain. This may speed |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
129 * up some computations at the expense of increasing memory |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
130 * usage. |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
131 */ |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
132 //@{ |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
133 ///Precompute all the function evaluation of the RBFs. |
14
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
134 void precompute_ev(); |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
135 ///Precompute all relevant first derivatives. |
14
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
136 void precompute_d1() ; |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
137 ///Precompute all relevant second derivatives. |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
138 void precompute_d2(); |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
139 //@} |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
140 |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
141 /** @name Partial redefinitions |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
142 * |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
143 * These functions allow for partial redefinition of the BVP as |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
144 * equired for the additive Schwartz domain decomposition method, |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
145 * and for other methods. They do not factor a matrix again. |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
146 */ |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
147 //@{ |
23
acefa48d4b4d
Not compiling, added .hgignore
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
20
diff
changeset
|
148 void set_f(const intr_values &f); |
acefa48d4b4d
Not compiling, added .hgignore
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
20
diff
changeset
|
149 void set_g(const bdry_values &g); |
0 | 150 void set_f(const realfunc &f); |
151 void set_g(const realfunc &g); | |
152 void set_f(const map<point, double>& f); | |
153 void set_g(const map<point, double>& g); | |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
154 //@} |
0 | 155 |
17
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
156 /** @name Reinterpolate again |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
157 * |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
158 * As above group of functions, but for purely interpolating |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
159 * interpolators |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
160 */ |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
161 //@{ |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
162 void set_bdry_values(const bdry_values& b_new); |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
163 //@} |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
164 |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
165 /** @name Linear arithmetic operators |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
166 * |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
167 * These functions return a new interpolator. They are pointwise |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
168 * linear operations and work by manipulating interpolator |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
169 * coefficients. |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
170 */ |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
171 //@{ |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
172 /// Needs two operators on the same domain. |
0 | 173 interpolator<RBF> operator+(const interpolator<RBF>& u) const; |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
174 /// Needs two operators on the same domain. |
0 | 175 interpolator<RBF> operator-(const interpolator<RBF>& u) const; |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
176 /// Returns a scaled interpolator. |
0 | 177 interpolator<RBF> operator*(double a) const; |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
178 /// Returns a scaled interpolator. |
0 | 179 interpolator<RBF> operator/(double a) const; |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
180 //@} |
17
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
181 |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
182 /** \brief Provide a unit normals object associated to the |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
183 * interpolator. |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
184 */ |
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
185 normals get_normals() const; |
0 | 186 |
29
24f3c4ed5c84
Halfway to replacing all namespaces with the kwantxi namespace
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
28
diff
changeset
|
187 /** \brief This will put into an ostream a kwantxi::matrix where |
23
acefa48d4b4d
Not compiling, added .hgignore
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
20
diff
changeset
|
188 * the first \f$n-1\f$ columns will be all the points where the |
acefa48d4b4d
Not compiling, added .hgignore
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
20
diff
changeset
|
189 * interpolator is defined and the \f$n^{th}\f$ column is the |
acefa48d4b4d
Not compiling, added .hgignore
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
20
diff
changeset
|
190 * values that the interpolator takes on that point. |
acefa48d4b4d
Not compiling, added .hgignore
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
20
diff
changeset
|
191 */ |
24
ad9e3d28ce9b
Implement op<< for bvp::interpolator
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
192 void into_os(std::ostream& os) const; |
23
acefa48d4b4d
Not compiling, added .hgignore
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
20
diff
changeset
|
193 |
0 | 194 private: |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
195 ///Once the matrix is defined, this function inverts it. |
23
acefa48d4b4d
Not compiling, added .hgignore
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
20
diff
changeset
|
196 void computecoeffs(bool rhs_defined = false); |
0 | 197 |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
198 ///Perform the actual interpolation. |
0 | 199 void init(shared_ptr<linear_BVP2> bvp); |
200 | |
20
9cd42f1be76e
w00t, bugs squashed, thing actually works\!
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
18
diff
changeset
|
201 ///If the coefficients change, need to recompute precomputed values |
9cd42f1be76e
w00t, bugs squashed, thing actually works\!
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
18
diff
changeset
|
202 void recompute_values_vec(); |
9cd42f1be76e
w00t, bugs squashed, thing actually works\!
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
18
diff
changeset
|
203 |
9cd42f1be76e
w00t, bugs squashed, thing actually works\!
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
18
diff
changeset
|
204 ///BVP associated to this interpolator |
0 | 205 shared_ptr<linear_BVP2> thebvp; |
206 | |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
207 ///Number of interior points. |
0 | 208 size_t n; |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
209 ///Number of boundary points. |
0 | 210 size_t m; |
211 | |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
212 ///The matrix to invert. |
0 | 213 matrix M; |
214 | |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
215 ///Is the interpolator ready for use? |
0 | 216 bool initted; |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
217 |
23
acefa48d4b4d
Not compiling, added .hgignore
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
20
diff
changeset
|
218 |
15
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
219 /** @name Exception builders |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
220 */ |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
221 //@{ |
29
24f3c4ed5c84
Halfway to replacing all namespaces with the kwantxi namespace
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
28
diff
changeset
|
222 kwantxi::badArgument not_initted(int line, string file) const; |
24f3c4ed5c84
Halfway to replacing all namespaces with the kwantxi namespace
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
28
diff
changeset
|
223 kwantxi::badArgument not_precomputed(int line, string file) const; |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
224 //@} |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
225 |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
226 ///Coefficients of the RBFs |
29
24f3c4ed5c84
Halfway to replacing all namespaces with the kwantxi namespace
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
28
diff
changeset
|
227 kwantxi::vector coeffs; |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
228 ///The RBFS |
0 | 229 std::vector<RBF> rbfs; |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
230 ///Their hash |
0 | 231 size_t rbfs_hash; |
232 | |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
233 ///An RBF hasher |
0 | 234 size_t hash_value(const std::vector<RBF>& rbfs_in); |
18
382e3b8e3f88
Compiles, and runs, but doesn't produce desired output. Must investigate this further.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
235 |
382e3b8e3f88
Compiles, and runs, but doesn't produce desired output. Must investigate this further.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
236 ///The normals at the domain's boundary |
382e3b8e3f88
Compiles, and runs, but doesn't produce desired output. Must investigate this further.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
237 normals nrmls; |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
238 |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
239 /** \short Precomputed RBFs |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
240 * |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
241 * For all points on the domain, this stores all the RBFs |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
242 * evaluated at those points, as well as the derivatives on where |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
243 * the RBFs have been evaluated. This is to speed up successive |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
244 * evaluations of the interpolator when the interpolator's domain |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
245 * doesn't change. |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
246 * |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
247 * The keys in this map are vectors that represent the multindex |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
248 * for the derivative, where missing trailing entries in the |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
249 * vector represents zeros. Thus, an empty vector represents |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
250 * evaluation instead of derivatives. |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
251 */ |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
252 mutable map<std::vector<size_t>, matrix> precomp_rbfs; |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
253 |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
254 /** @name Evaluation flags |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
255 *Have the RBFs or their derivatives been precomputed? |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
256 */ |
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
257 //@{ |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
258 bool ev_precomp; |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
259 bool d1_precomp; |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
260 bool d2_precomp; |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
261 //@} |
4
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
262 |
9d4fda54a41d
Buggy, must check why interpolator assignment destroys precomputed
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
0
diff
changeset
|
263 /// Precomputed values using precomp_rbfs |
11
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
264 mutable map<std::vector<size_t>, map<point, double> > |
d0076d9b2ef1
Conclude precomputation revision
Jordi Guitérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
265 precomp_values; |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
266 /// Same, but storing the vectors. |
29
24f3c4ed5c84
Halfway to replacing all namespaces with the kwantxi namespace
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
28
diff
changeset
|
267 mutable map<std::vector<size_t>, kwantxi::vector > |
13
0531194a431d
Preliminary whole domain evaluations
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
268 precomp_values_vec; |
14
e6d2cd3b6e77
Intermediate whole domain evaluation work
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
13
diff
changeset
|
269 /// Convert vector of values to a map |
29
24f3c4ed5c84
Halfway to replacing all namespaces with the kwantxi namespace
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
28
diff
changeset
|
270 map<point, double> valsvec2map(const kwantxi::vector& values) const; |
0 | 271 }; |
272 | |
16
29a7b95c2805
Essentially all Doxygen docstrings complete.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
15
diff
changeset
|
273 |
29a7b95c2805
Essentially all Doxygen docstrings complete.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
15
diff
changeset
|
274 /// For comfortable syntax |
0 | 275 template <typename RBF> |
15
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
276 interpolator<RBF> operator*(double a, const interpolator<RBF>& u) |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
277 { |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
278 return u*a; |
5144dd3c5468
Almost completed adding all Doxygen docstrings.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
279 } |
24
ad9e3d28ce9b
Implement op<< for bvp::interpolator
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
280 |
ad9e3d28ce9b
Implement op<< for bvp::interpolator
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
281 /// Stream insertion |
ad9e3d28ce9b
Implement op<< for bvp::interpolator
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
282 template <typename RBF> |
ad9e3d28ce9b
Implement op<< for bvp::interpolator
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
283 std::ostream& operator<< (std::ostream& os, const interpolator<RBF>& u) |
ad9e3d28ce9b
Implement op<< for bvp::interpolator
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
284 { |
ad9e3d28ce9b
Implement op<< for bvp::interpolator
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
285 u.into_os(os); |
ad9e3d28ce9b
Implement op<< for bvp::interpolator
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
286 return os; |
ad9e3d28ce9b
Implement op<< for bvp::interpolator
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
287 } |
ad9e3d28ce9b
Implement op<< for bvp::interpolator
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
288 |
17
72412107029b
On the final stretch, implementing the interface in set_bdry_conds
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
289 |
0 | 290 } |
291 | |
292 #endif |