20 const char BADALLOC[] =
"Failed to allocate memory for a GeographicLib::SphericalHarmonic2";
25 if ( m_pSphericalHarmonic2 !=
NULL )
27 delete m_pSphericalHarmonic2;
28 m_pSphericalHarmonic2 =
NULL;
33 for (
int i = 0;
i < m_numCoeffVectors;
i++ )
42 for (
int i = 0;
i < m_numCoeffVectors;
i++ )
66 for (
int i = 0; i < m_numCoeffVectors; i++ ) m_C[i] = new std::vector<double>();
68 for (
int i = 0; i < m_numCoeffVectors; i++ ) m_S[i] = new std::vector<double>();
69 for each (
double x in C )
m_C[0]->push_back( x );
70 for each (
double x
in S )
m_S[0]->push_back( x );
71 for each (
double x
in C1 )
m_C[1]->push_back( x );
72 for each (
double x
in S1 )
m_S[1]->push_back( x );
73 for each (
double x
in C2 )
m_C[2]->push_back( x );
74 for each (
double x
in S2 )
m_S[2]->push_back( x );
76 *
m_C[1], *
m_S[1], N1, *
m_C[2], *
m_S[2], N2, a, (
unsigned)norm);
78 catch ( std::bad_alloc )
82 catch (
const std::exception& err )
86 catch ( System::Exception^ sxpt )
95 int N,
int nmx,
int mmx,
98 int N1,
int nmx1,
int mmx1,
101 int N2,
int nmx2,
int mmx2,
108 for (
int i = 0; i < m_numCoeffVectors; i++ ) m_C[i] = new std::vector<double>();
110 for (
int i = 0; i < m_numCoeffVectors; i++ ) m_S[i] = new std::vector<double>();
111 for each (
double x in C )
m_C[0]->push_back( x );
112 for each (
double x
in S )
m_S[0]->push_back( x );
113 for each (
double x
in C1 )
m_C[1]->push_back( x );
114 for each (
double x
in S1 )
m_S[1]->push_back( x );
115 for each (
double x
in C2 )
m_C[2]->push_back( x );
116 for each (
double x
in S2 )
m_S[2]->push_back( x );
118 nmx, mmx, *
m_C[1], *
m_S[1], N1, nmx1, mmx1, *
m_C[2], *
m_S[2], N2, nmx2, mmx2, a,
121 catch ( std::bad_alloc )
125 catch (
const std::exception& err )
129 catch ( System::Exception^ sxpt )
143 [System::Runtime::InteropServices::Out]
double% gradx,
144 [System::Runtime::InteropServices::Out]
double% grady,
145 [System::Runtime::InteropServices::Out]
double% gradz)
147 double lgradx, lgrady, lgradz;
149 lgradx, lgrady, lgradz );
158 double z,
bool gradp)
164 catch ( std::bad_alloc )
166 throw gcnew GeographicErr(
"Memory allocation error in SphericalHarmonic2::Circle" );
Header for NETGeographicLib::SphericalHarmonic2 class.
double HarmonicSum(double tau1, double tau2, double x, double y, double z)
.NET wrapper for GeographicLib::SphericalHarmonic2.
Header for NETGeographicLib::NETGeographicLib objects.
Exception class for NETGeographicLib.
std::vector< double > ** m_S
.NET wrapper for GeographicLib::SphericalEngine::coeff.
SphericalCoefficients Coefficients2()
Header for NETGeographicLib::CircularEngine class.
static const int m_numCoeffVectors
Header for NETGeographicLib::SphericalCoefficients class.
const GeographicLib::SphericalHarmonic2 * m_pSphericalHarmonic2
std::vector< double > ** m_C
const SphericalEngine::coeff & Coefficients1() const
const SphericalEngine::coeff & Coefficients2() const
Spherical harmonic series with two corrections to the coefficients.
CircularEngine Circle(real tau1, real tau2, real p, real z, bool gradp) const
SphericalHarmonic2(array< double >^C, array< double >^S, int N, array< double >^C1, array< double >^S1, int N1, array< double >^C2, array< double >^S2, int N2, double a, Normalization norm)
Matrix< Scalar, Dynamic, Dynamic > C
.NET wrapper for GeographicLib::CircularEngine.
Header for GeographicLib::SphericalHarmonic2 class.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
CircularEngine Circle(double tau1, double tau2, double p, double z, bool gradp)
SphericalCoefficients Coefficients1()
const SphericalEngine::coeff & Coefficients() const
SphericalCoefficients Coefficients()