File: kernelCoefficients.h

package info (click to toggle)
groops 0%2Bgit20250907%2Bds-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 11,140 kB
  • sloc: cpp: 135,607; fortran: 1,603; makefile: 20
file content (52 lines) | stat: -rw-r--r-- 1,207 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/***********************************************/
/**
* @file kernelCoefficients.h
*
* @brief Kernel from coefficients.
* Given as series of Legendre polynomials.
* @see Kernel
*
* @author Torsten Mayer-Guerr
* @date 2003-09-20
*
*/
/***********************************************/

#ifndef __GROOPS_KERNELCOEFF__
#define __GROOPS_KERNELCOEFF__

// Latex documentation
#ifdef DOCSTRING_Kernel
static const char *docstringKernelCoefficients = R"(
\subsection{Coefficients}\label{kernelType:coefficients}
The kernel is defined by the coefficients $k_n$ given by file.
)";
#endif

/***********************************************/

#include "classes/kernel/kernel.h"

/***** CLASS ***********************************/

/** @brief Kernel from coefficients.
* Given as series of Legendre polynomials.
* @ingroup kernelGroup
* @see Kernel */
class KernelCoefficients : public Kernel
{
  Vector kn;

public:
  KernelCoefficients(Config &config);

  Vector   coefficients       (const Vector3d &p, UInt degree) const;
  Vector   inverseCoefficients(const Vector3d &p, UInt degree, Bool interior) const;

  UInt maxDegree() const {return kn.rows()-1;}
};

/***********************************************/

#endif