ABLATE Source Documentation  0.12.36
hybrid.hpp
1 #ifndef ABLATELIBRARY_RBF_HYBRID_HPP
2 #define ABLATELIBRARY_RBF_HYBRID_HPP
3 
4 // A hybrid RBF method based on weighted sums of individual kernels. See "A stabalized radial basis-finite difference (RBF-FD) mthod with hybrid kernels"
5 // by Mishra, Fasshauer, Sen, and Ling, Computer and Mathematics with Applications 77 (2019) 2354-2369.
6 //
7 // Notes: The sub-kernel parameters polyOrder, hasDerivative, and hasInterpolation are ignored/not used.
8 
9 #include "rbf.hpp"
10 
11 namespace ablate::domain::rbf {
12 
13 class HYBRID : public RBF {
14  private:
15  const std::vector<double> weights;
16  std::vector<std::shared_ptr<RBF>> rbfList;
17 
18  public:
19  std::string_view type() const override { return "HYBRID"; }
20 
21  HYBRID(int p = 4, std::vector<double> weights = {}, std::vector<std::shared_ptr<RBF>> rbfList = {}, bool doesNotHaveDerivatives = false, bool doesNotHaveInterpolation = false);
22 
23  PetscReal RBFVal(PetscInt dim, PetscReal x[], PetscReal y[]) override;
24  PetscReal RBFDer(PetscInt dim, PetscReal x[], PetscInt dx, PetscInt dy, PetscInt dz) override;
25 };
26 
27 } // namespace ablate::domain::rbf
28 
29 #endif // ABLATELIBRARY_RBF_HYBRID_HPP
Definition: hybrid.hpp:13
PetscReal RBFVal(PetscInt dim, PetscReal x[], PetscReal y[]) override
Definition: hybrid.cpp:11
std::string_view type() const override
Definition: hybrid.hpp:19
PetscReal RBFDer(PetscInt dim, PetscReal x[], PetscInt dx, PetscInt dy, PetscInt dz) override
Definition: hybrid.cpp:19
Definition: rbf.hpp:12