OPAL (Object Oriented Parallel Accelerator Library)  2024.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 
34 namespace interpolation {
35 
36 class 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();
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 
PolynomialCoefficient represents a coefficient in a multi-dimensional polynomial. ...
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two distribute and or modify the software for each author s protection and we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed we want its recipients to know that what they have is not the so that any problems introduced by others will not reflect on the original authors reputations any free program is threatened constantly by software patents We wish to avoid the danger that redistributors of a free program will individually obtain patent in effect making the program proprietary To prevent we have made it clear that any patent must be licensed for everyone s free use or not licensed at all The precise terms and conditions for distribution and modification follow GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR DISTRIBUTION AND MODIFICATION This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License The refers to any such program or and a work based on the Program means either the Program or any derivative work under copyright a work containing the Program or a portion of it
Definition: LICENSE:43
static std::vector< std::vector< int > > getNearbyPointsSquares(int pointDim, int polyOrderLower, int polyOrderUpper)
std::vector< std::vector< double > > derivValues_m
std::vector< std::vector< double > > values_m
std::vector< std::vector< int > > derivIndices_m
std::vector< MVector< double > > derivPolyVec_m
Base class for meshing routines.
Definition: Mesh.h:49
PolynomialCoefficient getDeltaIterator(Mesh::Iterator it1, Mesh::Iterator it2, int valueIndex)
std::vector< std::vector< int > > derivOrigins_m
std::vector< std::vector< double > > derivPoints_m
std::vector< std::vector< std::vector< int > > > edgePoints_m
std::vector< SquarePolynomialVector * > polynomials_m
PPSolveFactory solves the system of linear equations to interpolate from a grid of points using highe...
std::vector< std::vector< double > > thisPoints_m
std::vector< double > outOfBoundsPosition(Mesh::Iterator outOfBoundsIt)
void getDerivs(const Mesh::Iterator &it)
PPSolveFactory(Mesh *points, std::vector< std::vector< double > > values, int polyPatchOrder, int smoothingOrder)
Patches together many SquarePolynomialVectors to make a multidimensional polynomial spline...
void getValues(Mesh::Iterator it)
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
std::vector< std::vector< int > > smoothingPoints_m