OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
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
36 class PolynomialPatch;
37
66 public:
86 Mesh* points, std::vector<std::vector<double> > values, int polyPatchOrder,
87 int smoothingOrder);
88
91
97
113 static std::vector<std::vector<int> > getNearbyPointsSquares(
114 int pointDim, int polyOrderLower, int polyOrderUpper);
115
116 private:
117 void getPoints();
118 void getValues(Mesh::Iterator it);
119 void getDerivPoints();
120 void getDerivs(const Mesh::Iterator& it);
121
122 // nothing calls this method but I don't quite feel brave enough to remove
123 // it...
124 std::vector<double> outOfBoundsPosition(Mesh::Iterator outOfBoundsIt);
125 static void nearbyPointsRecursive(
126 std::vector<int> check, size_t checkIndex, size_t polyPower,
127 std::vector<std::vector<int> >& nearbyPoints);
128
130 Mesh::Iterator it1, Mesh::Iterator it2, int valueIndex);
131
138 std::vector<std::vector<double> > values_m;
139 std::vector<SquarePolynomialVector*> polynomials_m;
140
141 std::vector<std::vector<double> > thisPoints_m;
142 std::vector<std::vector<double> > thisValues_m;
143 std::vector<std::vector<double> > derivPoints_m;
144 std::vector<std::vector<double> > derivValues_m;
145 std::vector<std::vector<int> > derivOrigins_m;
146 std::vector<std::vector<int> > derivIndices_m;
147 std::vector<MVector<double> > derivPolyVec_m;
148
149 std::vector<std::vector<std::vector<int> > > edgePoints_m;
150 std::vector<std::vector<int> > smoothingPoints_m;
151 };
152
153} // namespace interpolation
Base class for meshing routines.
Definition Mesh.h:49
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 > > derivOrigins_m
std::vector< std::vector< double > > values_m
std::vector< std::vector< double > > derivPoints_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 > > thisValues_m
void getValues(Mesh::Iterator it)
std::vector< SquarePolynomialVector * > polynomials_m
std::vector< std::vector< double > > thisPoints_m
std::vector< double > outOfBoundsPosition(Mesh::Iterator outOfBoundsIt)
std::vector< std::vector< int > > derivIndices_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 > > derivValues_m
std::vector< std::vector< int > > smoothingPoints_m
std::vector< MVector< double > > derivPolyVec_m
std::vector< std::vector< std::vector< int > > > edgePoints_m
PolynomialCoefficient represents a coefficient in a multi-dimensional polynomial.
Patches together many SquarePolynomialVectors to make a multidimensional polynomial spline.