OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
PPSolveFactory.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015, Chris Rogers
3 * All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 * 1. Redistributions of source code must retain the above copyright notice,
7 * this list of conditions and the following disclaimer.
8 * 2. Redistributions in binary form must reproduce the above copyright notice,
9 * this list of conditions and the following disclaimer in the documentation
10 * and/or other materials provided with the distribution.
11 * 3. Neither the name of STFC nor the names of its contributors may be used to
12 * endorse or promote products derived from this software without specific
13 * prior written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <vector>
29
33
34namespace interpolation {
35
36class PolynomialPatch;
37
66 public:
85 PPSolveFactory(Mesh* points,
86 std::vector<std::vector<double> > values,
87 int polyPatchOrder,
88 int smoothingOrder);
89
92
98
114 static std::vector<std::vector<int> > getNearbyPointsSquares(
115 int pointDim,
116 int polyOrderLower,
117 int polyOrderUpper);
118
119 private:
120 void getPoints();
121 void getValues(Mesh::Iterator it);
122 void getDerivPoints();
123 void getDerivs(const Mesh::Iterator& it);
124
125 // nothing calls this method but I don't quite feel brave enough to remove
126 // it...
127 std::vector<double> outOfBoundsPosition(Mesh::Iterator outOfBoundsIt);
128 static void nearbyPointsRecursive(
129 std::vector<int> check,
130 size_t checkIndex,
131 size_t polyPower,
132 std::vector<std::vector<int> >& nearbyPoints);
133
135 Mesh::Iterator it2, int valueIndex);
136
143 std::vector<std::vector<double> > values_m;
144 std::vector<SquarePolynomialVector*> polynomials_m;
145
146 std::vector< std::vector<double> > thisPoints_m;
147 std::vector< std::vector<double> > thisValues_m;
148 std::vector< std::vector<double> > derivPoints_m;
149 std::vector< std::vector<double> > derivValues_m;
150 std::vector< std::vector<int> > derivOrigins_m;
151 std::vector< std::vector<int> > derivIndices_m;
152 std::vector< MVector<double> > derivPolyVec_m;
153
154 std::vector<std::vector<std::vector<int> > > edgePoints_m;
155 std::vector< std::vector<int> > smoothingPoints_m;
156
157};
158
159}
160
Base class for meshing routines.
Definition: Mesh.h:49
PolynomialCoefficient represents a coefficient in a multi-dimensional polynomial.
Patches together many SquarePolynomialVectors to make a multidimensional polynomial spline.
PPSolveFactory solves the system of linear equations to interpolate from a grid of points using highe...
PolynomialCoefficient getDeltaIterator(Mesh::Iterator it1, Mesh::Iterator it2, int valueIndex)
std::vector< std::vector< int > > smoothingPoints_m
std::vector< std::vector< int > > derivIndices_m
std::vector< std::vector< double > > values_m
std::vector< std::vector< double > > derivValues_m
static void nearbyPointsRecursive(std::vector< int > check, size_t checkIndex, size_t polyPower, std::vector< std::vector< int > > &nearbyPoints)
std::vector< std::vector< double > > thisPoints_m
std::vector< std::vector< double > > thisValues_m
PPSolveFactory(Mesh *points, std::vector< std::vector< double > > values, int polyPatchOrder, int smoothingOrder)
void getValues(Mesh::Iterator it)
std::vector< SquarePolynomialVector * > polynomials_m
std::vector< std::vector< int > > derivOrigins_m
std::vector< double > outOfBoundsPosition(Mesh::Iterator outOfBoundsIt)
std::vector< MVector< double > > derivPolyVec_m
static std::vector< std::vector< int > > getNearbyPointsSquares(int pointDim, int polyOrderLower, int polyOrderUpper)
void getDerivs(const Mesh::Iterator &it)
std::vector< std::vector< double > > derivPoints_m
std::vector< std::vector< std::vector< int > > > edgePoints_m