20 const char BADALLOC[] =
"Failed to allocate memory for a GeographicLib::SphericalHarmonic1";
25 if ( m_pSphericalHarmonic1 !=
NULL )
27 delete m_pSphericalHarmonic1;
28 m_pSphericalHarmonic1 =
NULL;
33 for (
int i = 0;
i < m_numCoeffVectors;
i++ )
42 for (
int i = 0;
i < m_numCoeffVectors;
i++ )
63 for (
int i = 0; i < m_numCoeffVectors; i++ ) m_C[i] = new std::vector<double>();
65 for (
int i = 0; i < m_numCoeffVectors; i++ ) m_S[i] = new std::vector<double>();
66 for each (
double x in C )
m_C[0]->push_back( x );
67 for each (
double x
in S )
m_S[0]->push_back( x );
68 for each (
double x
in C1 )
m_C[1]->push_back( x );
69 for each (
double x
in S1 )
m_S[1]->push_back( x );
71 *
m_C[0], *
m_S[0], N, *
m_C[1], *
m_S[1], N1, a, (
unsigned)norm );
73 catch ( std::bad_alloc )
77 catch (
const std::exception& err )
81 catch ( System::Exception^ sxpt )
90 int N,
int nmx,
int mmx,
93 int N1,
int nmx1,
int mmx1,
100 for (
int i = 0; i < m_numCoeffVectors; i++ ) m_C[i] = new std::vector<double>();
102 for (
int i = 0; i < m_numCoeffVectors; i++ ) m_S[i] = new std::vector<double>();
103 for each (
double x in C )
m_C[0]->push_back( x );
104 for each (
double x
in S )
m_S[0]->push_back( x );
105 for each (
double x
in C1 )
m_C[1]->push_back( x );
106 for each (
double x
in S1 )
m_S[1]->push_back( x );
108 *
m_C[0], *
m_S[0], N, nmx, mmx, *
m_C[1], *
m_S[1], N1, nmx1, mmx1, a,
111 catch ( std::bad_alloc )
115 catch (
const std::exception& err )
119 catch ( System::Exception^ sxpt )
133 [System::Runtime::InteropServices::Out]
double% gradx,
134 [System::Runtime::InteropServices::Out]
double% grady,
135 [System::Runtime::InteropServices::Out]
double% gradz)
137 double lgradx, lgrady, lgradz;
152 catch ( std::bad_alloc )
154 throw gcnew GeographicErr(
"Failed to allocate memory for a CircularEngine in SphericalHarmonic1::Circle" );
const SphericalEngine::coeff & Coefficients1() const
std::vector< double > ** m_S
Header for NETGeographicLib::NETGeographicLib objects.
Exception class for NETGeographicLib.
CircularEngine Circle(real tau, real p, real z, bool gradp) const
std::ofstream out("Result.txt")
double HarmonicSum(double tau, double x, double y, double z)
std::vector< double > ** m_C
SphericalHarmonic1(array< double >^ C, array< double >^ S, int N, array< double >^ C1, array< double >^ S1, int N1, double a, Normalization norm)
.NET wrapper for GeographicLib::SphericalHarmonic1.
.NET wrapper for GeographicLib::SphericalEngine::coeff.
static const int m_numCoeffVectors
Header for NETGeographicLib::CircularEngine class.
const SphericalEngine::coeff & Coefficients() const
Header for NETGeographicLib::SphericalCoefficients class.
Header for GeographicLib::SphericalHarmonic1 class.
CircularEngine Circle(double tau, double p, double z, bool gradp)
const GeographicLib::SphericalHarmonic1 * m_pSphericalHarmonic1
Matrix< Scalar, Dynamic, Dynamic > C
SphericalCoefficients Coefficients1()
Spherical harmonic series with a correction to the coefficients.
.NET wrapper for GeographicLib::CircularEngine.
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
SphericalCoefficients Coefficients()
Header for NETGeographicLib::SphericalHarmonic1 class.