ARTS 2.5.0 (git: 9ee3ac6c)
legendre.h
Go to the documentation of this file.
1/* Copyright (C) 2003-2012 Oliver Lemke <olemke@core-dump.info>
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU General Public License as published by the
5 Free Software Foundation; either version 2, or (at your option) any
6 later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA.
17 */
18
20// File description
22
31#ifndef legendre_h
32#define legendre_h
33
34#include "arts.h"
35#include "grids.h"
36#include "matpackI.h"
37
39 size_t n; /* number of points */
40 double* x; /* Gauss abscissae/points */
41 double* w; /* Gauss weights for each abscissae */
42 int precomputed; /* high precision abscissae/weights precomputed? */
43};
44
46
47
48namespace Legendre {
49
55
57 Numeric total() const noexcept {return std::hypot(U, S, E);}
58
60 Numeric total_horizontal() const noexcept {return std::hypot(S, E);}
61
63 constexpr SphericalField() noexcept = default;
64};
65
66
69
70
95SphericalField schmidt_fieldcalc(const Matrix& g, const Matrix& h, const Numeric r0, const Numeric r, const Numeric lat, const Numeric lon) ARTS_NOEXCEPT;
96
97
110MatrixOfSphericalField schmidt_fieldcalc(const Matrix& g, const Matrix& h, const Numeric r0, const Vector& r, const Numeric lat, const Vector& lon) ARTS_NOEXCEPT;
111} // namespace Legendre
112
113#endif /* legendre_h */
The global header file for ARTS.
Row-major grid creation.
Definition: grids.h:52
The Matrix class.
Definition: matpackI.h:1225
The Vector class.
Definition: matpackI.h:876
#define ARTS_NOEXCEPT
Definition: debug.h:80
bool gsl_integration_glfixed_table_alloc(Vector &x, Vector &w, Index n)
gsl_integration_glfixed_table_alloc
Definition: legendre.cc:1940
Implementation of Matrix, Vector, and such stuff.
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
constexpr Numeric r0
The reference radius in IGRF13.
Definition: igrf13.cc:203
SphericalField schmidt_fieldcalc(const Matrix &g, const Matrix &h, const Numeric r0, const Numeric r, const Numeric lat, const Numeric lon) ARTS_NOEXCEPT
Computes the spherical field.
Definition: legendre.cc:2082
#define w
Stores the up (U), south (S), east (E) values of a field relative to the sphere.
Definition: legendre.h:51
constexpr SphericalField() noexcept=default
Always construct to zeroes explicitly.
Numeric total_horizontal() const noexcept
Returns the total strength of the field.
Definition: legendre.h:60
Numeric total() const noexcept
Returns the total strength of the field.
Definition: legendre.h:57