ROOT logo
// $Id: LegendreCoefs.cxx 2510 2011-08-15 06:41:33Z matevz $

// Copyright (C) 1999-2008, Matevz Tadel. All rights reserved.
// This file is part of GLED, released under GNU General Public License version 2.
// For the licensing terms see $GLEDSYS/LICENSE or http://www.gnu.org/.

#include "LegendreCoefs.h"
#include "LegendreCoefs.c7"

#include "Stones/HTrans.h"
#include "Gled/XTReqCanvas.h"

#include "TH1.h"
#include "TGraph.h"
#include "TCanvas.h"

#include "TMath.h"
#include "TRandom3.h"
#include <TTree.h>

#include <gsl/gsl_sf_legendre.h>

// LegendreCoefs

//______________________________________________________________________________
//
// Stores a set of coefficients for spherical harmonics up to given l_max.
// Provides functions for:
// - evaluation,
// - multi-evaluation (group points with same abs(cos_theta),
// - reading of EGM files (see note below),
// - various plotting / root-tree export functions.
//
// Note on EGM file:
// There is some strangness with normalization, the altitudes do not match
// real Earth.
// The shape seems ok, so I'd guess it is only a factor. I tried some (sqrt(4
// pi), in particular) but couldn't get it right. But it could be there is
// some l dependance, too.
// Min / Max, as things are now, are (l_max = 100) are -1630 / 1000 with 1M
// sampling points. This also doesn't seem entirely right.


ClassImp(LegendreCoefs);

//==============================================================================

void LegendreCoefs::_init()
{}

LegendreCoefs::LegendreCoefs(const Text_t* n, const Text_t* t) :
  ZGlass(n, t),
  mLMax(0)
{
  _init();
}

LegendreCoefs::~LegendreCoefs()
{}

//==============================================================================

void LegendreCoefs::InitRandom(Int_t l_max, Double_t abs_scale, Double_t pow_scale)
{
  static const Exc_t _eh("LegendreCoefs::InitRandom ");

  if (l_max < 0)
    throw _eh + "l_max must be non-negative.";

  mLMax = l_max;
  mC.resize((l_max + 1) * (l_max + 1));

  using namespace TMath;

  TRandom3 rnd(0);

  for (Int_t l = 0; l <= mLMax; ++l)
  {
    Double_t fpow = abs_scale * Power(2.0/(l+1), pow_scale);

    Double_t& l0 = coef(l, 0);

    l0 = fpow * rnd.Gaus();

    for (Int_t m = 1; m <= l; ++m)
    {
      Double_t& lpos = coef(l,  m);
      Double_t& lneg = coef(l, -m);

      lpos = fpow * rnd.Gaus();
      lneg = fpow * rnd.Gaus();
      if (m % 2) lneg = -lneg;
    }
  }

  Stamp(FID());
}

void LegendreCoefs::InitToValue(Int_t l_max, Double_t value)
{
  static const Exc_t _eh("LegendreCoefs::InitToValue ");

  if (l_max < 0)
    throw _eh + "l_max must be non-negative.";

  mLMax = l_max;

  vector<Double_t> new_c((l_max + 1) * (l_max + 1), value);
  mC.swap(new_c);

  Stamp(FID());
}

void LegendreCoefs::SetCoef(Int_t l, Int_t m, Double_t v)
{
  static const Exc_t _eh("LegendreCoefs::SetCoef ");

  if (l > mLMax || l < 0)
    throw _eh + "Incorrect argument 'l'.";
  if (m < -l || m > l)
    throw _eh + "Incorrect argument 'm'.";

  mC[l*l + l + m] = v;
}

//==============================================================================

void LegendreCoefs::ReadEgmFile(const TString& egm, Int_t l_max)
{
  static const Exc_t _eh("LegendreCoefs::ReadEgmFile ");

  FILE *fp = fopen(egm, "r");
  if (!fp)
    throw _eh + "can not open file '" + egm + "'.";

  {
    Int_t l_max_in_file;
    if (fscanf(fp, "%d", &l_max_in_file) != 1)
    {
      fclose(fp);
      throw _eh + "Failed reading l_max_in_file.";
    }
    if (l_max_in_file < l_max)
    {
      ISwarn(_eh + GForm("requested l_max=%d less then l_max_in_file=%d; using l_max_in_file.", l_max, l_max_in_file));
      l_max = l_max_in_file;
    }
  }

  mLMax = l_max;
  mC.resize((l_max + 1) * (l_max + 1));

  for (Int_t l = 0; l <= l_max; ++l)
  {
    Int_t idx = l*l + l;
    for (Int_t m = 0; m <= l; ++m)
    {
      Int_t    l_in,   m_in;
      Double_t cos_in, sin_in;

      if (fscanf(fp, "%d %d %lf %lf", &l_in, &m_in, &cos_in, &sin_in) != 4 ||
	  l_in != l || m_in != m)
      {
	fclose(fp);
	throw _eh + GForm("Failed at reading l=%d, m=%d.", l, m);
      }

      if (m == 0)
      {
	mC[idx] = cos_in;
      }
      else
      {
	mC[idx - m] = sin_in;
	mC[idx + m] = cos_in;
      }
    }
  }

  fclose(fp);

  Stamp(FID());
}

//==============================================================================

Double_t LegendreCoefs::Eval(Double_t cos_theta, Double_t phi, Int_t l_max) const
{
  if (l_max > mLMax || l_max < 0)
  {
    l_max = mLMax;
  }

  vector<Double_t> mvals(l_max + 1);
  Double_t sum = 0;

  for (Int_t m = 0; m <= l_max; ++m)
  {
    const Double_t cos_mphi = TMath::Cos(m*phi);
    const Double_t sin_mphi = TMath::Sin(m*phi);

    gsl_sf_legendre_sphPlm_array(l_max, m, cos_theta, &mvals[m]);

    for (Int_t l = m; l <= l_max; ++l)
    {
      sum += sum_m(l, m, cos_mphi, sin_mphi) * mvals[l];
    }
  }

  return sum;
}

Double_t LegendreCoefs::Eval(const HPointD& vec, Int_t l_max) const
{
  return Eval(vec.CosTheta(), vec.Phi(), l_max);
}

//------------------------------------------------------------------------------

void LegendreCoefs::EvalMulti(MultiEval& me, Int_t l_max) const
{
  if (l_max > mLMax || l_max < 0)
  {
    l_max = mLMax;
  }

  vector<Double_t> mvals(l_max + 1);

  Double_t cos_theta;
  Int_t n1, n2 = 0;

  while (n2 < me.fN)
  {
    n1 = n2;
    cos_theta = me.fMVec[me.fIdcs[n1]];
    me.fMVec[me.fIdcs[n1]] = 0;
    n2 = n1 + 1;
    while (n2 < me.fN && me.fMVec[me.fIdcs[n2]] == cos_theta)
    {
      me.fMVec[me.fIdcs[n2]] = 0;
      ++n2;
    }

    for (Int_t m = 0; m <= l_max; ++m)
    {
      gsl_sf_legendre_sphPlm_array(l_max, m, cos_theta, &mvals[m]);

      for (Int_t i = n1; i < n2; ++i)
      {
	const Int_t    ii       = me.fIdcs[i];
	const Double_t phi      = me.fPhis[ii];
	const Double_t cos_mphi = TMath::Cos(m * phi);
	const Double_t sin_mphi = TMath::Sin(m * phi);

	if (phi > 0)
	{
	  for (Int_t l = m; l <= l_max; ++l)
	  {
	    me.fMVec[ii] += sum_m(l, m, cos_mphi, sin_mphi) * mvals[l];
	  }
	}
	else
	{
	  for (Int_t l = m; l <= l_max; ++l)
	  {
	    const Double_t val = sum_m(l, m, cos_mphi, sin_mphi) * mvals[l];
	    if (l % 2 == 0)
	      me.fMVec[ii] += val;
	    else
	      me.fMVec[ii] -= val;
	  }
	}
      }
    }
  }
}

//==============================================================================

void LegendreCoefs::MakeRandomSamplingHisto(Int_t max_l, Int_t n_samples,
					    const TString& canvas_name,
					    const TString& canvas_title)
{
  TRandom3 rnd(0);

  TH1I *h = new TH1I("RndSampling", "Elevation", 256, 0, 0);
  h->SetBuffer(TMath::Max(10000, n_samples/10));

  for (Int_t i = 0; i < n_samples; ++i)
  {
    using namespace TMath;
    const Double_t cos_theta = rnd.Uniform(-1, 1);
    const Double_t phi       = rnd.Uniform(-Pi(), Pi());
    h->Fill(Eval(cos_theta, phi, max_l));
  }

  TCanvas *canvas = XTReqCanvas::Request(canvas_name, canvas_title);
  canvas->cd();
  h->Draw();
  XTReqPadUpdate::Update(canvas);
}

void LegendreCoefs::MakeThetaGraph(Int_t max_l, Double_t phi, Int_t n_div,
				   const TString& canvas_name,
				   const TString& canvas_title)
{
  TGraph *g = new TGraph(n_div + 1);

  for (Int_t i = 0; i <= n_div + 1; ++i)
  {
    Double_t t = TMath::Pi() * i / n_div;
    g->SetPoint(i, t, Eval(TMath::Cos(t), phi, max_l));
  }

  TCanvas *canvas = XTReqCanvas::Request(canvas_name, canvas_title);
  canvas->cd();
  g->Draw("AP");
  XTReqPadUpdate::Update(canvas);
}

TTree* LegendreCoefs::MakeCoefTree(const TString& name, const TString& title)
{
  TTree *t = new TTree(name, title);
  t->SetDirectory(0);

  Int_t    l, m;
  Double_t c;
  t->Branch("B1", &l, "l/I");
  t->Branch("B2", &m, "m/I");
  t->Branch("B3", &c, "c/D");

  Double_t *cfa = &mC[0];
  for (l = 0; l <= mLMax; ++l)
  {
    for (m = -l; m <= l; ++m)
    {
      c = *cfa;
      t->Fill();
      ++cfa;
    }
  }

  return t;
}


//==============================================================================
// LegendreCoefs::Evaluator
//==============================================================================

Double_t LegendreCoefs::Evaluator::Eval(Double_t cos_theta, Double_t phi) const
{
  return fScale * fCoefs->Eval(cos_theta, phi, fLMax);
}

Double_t LegendreCoefs::Evaluator::Eval(const HPointD& vec) const
{
  return Eval(vec.CosTheta(), vec.Phi());
}


//==============================================================================
// LegendreCoefs::MultiEval
//==============================================================================

void LegendreCoefs::MultiEval::Init(Int_t n)
{
  fMVec.resize(n);
  fPhis.resize(n);
  fIdcs.resize(n);
  fUserData.resize(n);
  fN = 0;
}

void LegendreCoefs::MultiEval::AddPoint(Double_t cos_theta, Double_t phi, void* ud)
{
  if (cos_theta >= 0)
  {
    fMVec[fN] = cos_theta;
    fPhis[fN] = phi + TMath::TwoPi();
  }
  else
  {
    fMVec[fN] = -cos_theta;
    fPhis[fN] = phi - TMath::Pi();
  }
  fUserData[fN] = ud;
  ++fN; 
}

void LegendreCoefs::MultiEval::AddPoint(Double_t x, Double_t y, Double_t z, void* ud)
{
  Double_t mag = TMath::Sqrt(x*x + y*y + z*z);
  AddPoint((mag == 0) ? 1 : z / mag, TMath::ATan2(y, x), ud);
}

void LegendreCoefs::MultiEval::AddPointUnitR(Double_t x, Double_t y, Double_t z, void* ud)
{
  AddPoint(z, TMath::ATan2(y, x), ud);
}

void LegendreCoefs::MultiEval::Sort()
{
  TMath::Sort(fN, &fMVec[0], &fIdcs[0]);
}
 LegendreCoefs.cxx:1
 LegendreCoefs.cxx:2
 LegendreCoefs.cxx:3
 LegendreCoefs.cxx:4
 LegendreCoefs.cxx:5
 LegendreCoefs.cxx:6
 LegendreCoefs.cxx:7
 LegendreCoefs.cxx:8
 LegendreCoefs.cxx:9
 LegendreCoefs.cxx:10
 LegendreCoefs.cxx:11
 LegendreCoefs.cxx:12
 LegendreCoefs.cxx:13
 LegendreCoefs.cxx:14
 LegendreCoefs.cxx:15
 LegendreCoefs.cxx:16
 LegendreCoefs.cxx:17
 LegendreCoefs.cxx:18
 LegendreCoefs.cxx:19
 LegendreCoefs.cxx:20
 LegendreCoefs.cxx:21
 LegendreCoefs.cxx:22
 LegendreCoefs.cxx:23
 LegendreCoefs.cxx:24
 LegendreCoefs.cxx:25
 LegendreCoefs.cxx:26
 LegendreCoefs.cxx:27
 LegendreCoefs.cxx:28
 LegendreCoefs.cxx:29
 LegendreCoefs.cxx:30
 LegendreCoefs.cxx:31
 LegendreCoefs.cxx:32
 LegendreCoefs.cxx:33
 LegendreCoefs.cxx:34
 LegendreCoefs.cxx:35
 LegendreCoefs.cxx:36
 LegendreCoefs.cxx:37
 LegendreCoefs.cxx:38
 LegendreCoefs.cxx:39
 LegendreCoefs.cxx:40
 LegendreCoefs.cxx:41
 LegendreCoefs.cxx:42
 LegendreCoefs.cxx:43
 LegendreCoefs.cxx:44
 LegendreCoefs.cxx:45
 LegendreCoefs.cxx:46
 LegendreCoefs.cxx:47
 LegendreCoefs.cxx:48
 LegendreCoefs.cxx:49
 LegendreCoefs.cxx:50
 LegendreCoefs.cxx:51
 LegendreCoefs.cxx:52
 LegendreCoefs.cxx:53
 LegendreCoefs.cxx:54
 LegendreCoefs.cxx:55
 LegendreCoefs.cxx:56
 LegendreCoefs.cxx:57
 LegendreCoefs.cxx:58
 LegendreCoefs.cxx:59
 LegendreCoefs.cxx:60
 LegendreCoefs.cxx:61
 LegendreCoefs.cxx:62
 LegendreCoefs.cxx:63
 LegendreCoefs.cxx:64
 LegendreCoefs.cxx:65
 LegendreCoefs.cxx:66
 LegendreCoefs.cxx:67
 LegendreCoefs.cxx:68
 LegendreCoefs.cxx:69
 LegendreCoefs.cxx:70
 LegendreCoefs.cxx:71
 LegendreCoefs.cxx:72
 LegendreCoefs.cxx:73
 LegendreCoefs.cxx:74
 LegendreCoefs.cxx:75
 LegendreCoefs.cxx:76
 LegendreCoefs.cxx:77
 LegendreCoefs.cxx:78
 LegendreCoefs.cxx:79
 LegendreCoefs.cxx:80
 LegendreCoefs.cxx:81
 LegendreCoefs.cxx:82
 LegendreCoefs.cxx:83
 LegendreCoefs.cxx:84
 LegendreCoefs.cxx:85
 LegendreCoefs.cxx:86
 LegendreCoefs.cxx:87
 LegendreCoefs.cxx:88
 LegendreCoefs.cxx:89
 LegendreCoefs.cxx:90
 LegendreCoefs.cxx:91
 LegendreCoefs.cxx:92
 LegendreCoefs.cxx:93
 LegendreCoefs.cxx:94
 LegendreCoefs.cxx:95
 LegendreCoefs.cxx:96
 LegendreCoefs.cxx:97
 LegendreCoefs.cxx:98
 LegendreCoefs.cxx:99
 LegendreCoefs.cxx:100
 LegendreCoefs.cxx:101
 LegendreCoefs.cxx:102
 LegendreCoefs.cxx:103
 LegendreCoefs.cxx:104
 LegendreCoefs.cxx:105
 LegendreCoefs.cxx:106
 LegendreCoefs.cxx:107
 LegendreCoefs.cxx:108
 LegendreCoefs.cxx:109
 LegendreCoefs.cxx:110
 LegendreCoefs.cxx:111
 LegendreCoefs.cxx:112
 LegendreCoefs.cxx:113
 LegendreCoefs.cxx:114
 LegendreCoefs.cxx:115
 LegendreCoefs.cxx:116
 LegendreCoefs.cxx:117
 LegendreCoefs.cxx:118
 LegendreCoefs.cxx:119
 LegendreCoefs.cxx:120
 LegendreCoefs.cxx:121
 LegendreCoefs.cxx:122
 LegendreCoefs.cxx:123
 LegendreCoefs.cxx:124
 LegendreCoefs.cxx:125
 LegendreCoefs.cxx:126
 LegendreCoefs.cxx:127
 LegendreCoefs.cxx:128
 LegendreCoefs.cxx:129
 LegendreCoefs.cxx:130
 LegendreCoefs.cxx:131
 LegendreCoefs.cxx:132
 LegendreCoefs.cxx:133
 LegendreCoefs.cxx:134
 LegendreCoefs.cxx:135
 LegendreCoefs.cxx:136
 LegendreCoefs.cxx:137
 LegendreCoefs.cxx:138
 LegendreCoefs.cxx:139
 LegendreCoefs.cxx:140
 LegendreCoefs.cxx:141
 LegendreCoefs.cxx:142
 LegendreCoefs.cxx:143
 LegendreCoefs.cxx:144
 LegendreCoefs.cxx:145
 LegendreCoefs.cxx:146
 LegendreCoefs.cxx:147
 LegendreCoefs.cxx:148
 LegendreCoefs.cxx:149
 LegendreCoefs.cxx:150
 LegendreCoefs.cxx:151
 LegendreCoefs.cxx:152
 LegendreCoefs.cxx:153
 LegendreCoefs.cxx:154
 LegendreCoefs.cxx:155
 LegendreCoefs.cxx:156
 LegendreCoefs.cxx:157
 LegendreCoefs.cxx:158
 LegendreCoefs.cxx:159
 LegendreCoefs.cxx:160
 LegendreCoefs.cxx:161
 LegendreCoefs.cxx:162
 LegendreCoefs.cxx:163
 LegendreCoefs.cxx:164
 LegendreCoefs.cxx:165
 LegendreCoefs.cxx:166
 LegendreCoefs.cxx:167
 LegendreCoefs.cxx:168
 LegendreCoefs.cxx:169
 LegendreCoefs.cxx:170
 LegendreCoefs.cxx:171
 LegendreCoefs.cxx:172
 LegendreCoefs.cxx:173
 LegendreCoefs.cxx:174
 LegendreCoefs.cxx:175
 LegendreCoefs.cxx:176
 LegendreCoefs.cxx:177
 LegendreCoefs.cxx:178
 LegendreCoefs.cxx:179
 LegendreCoefs.cxx:180
 LegendreCoefs.cxx:181
 LegendreCoefs.cxx:182
 LegendreCoefs.cxx:183
 LegendreCoefs.cxx:184
 LegendreCoefs.cxx:185
 LegendreCoefs.cxx:186
 LegendreCoefs.cxx:187
 LegendreCoefs.cxx:188
 LegendreCoefs.cxx:189
 LegendreCoefs.cxx:190
 LegendreCoefs.cxx:191
 LegendreCoefs.cxx:192
 LegendreCoefs.cxx:193
 LegendreCoefs.cxx:194
 LegendreCoefs.cxx:195
 LegendreCoefs.cxx:196
 LegendreCoefs.cxx:197
 LegendreCoefs.cxx:198
 LegendreCoefs.cxx:199
 LegendreCoefs.cxx:200
 LegendreCoefs.cxx:201
 LegendreCoefs.cxx:202
 LegendreCoefs.cxx:203
 LegendreCoefs.cxx:204
 LegendreCoefs.cxx:205
 LegendreCoefs.cxx:206
 LegendreCoefs.cxx:207
 LegendreCoefs.cxx:208
 LegendreCoefs.cxx:209
 LegendreCoefs.cxx:210
 LegendreCoefs.cxx:211
 LegendreCoefs.cxx:212
 LegendreCoefs.cxx:213
 LegendreCoefs.cxx:214
 LegendreCoefs.cxx:215
 LegendreCoefs.cxx:216
 LegendreCoefs.cxx:217
 LegendreCoefs.cxx:218
 LegendreCoefs.cxx:219
 LegendreCoefs.cxx:220
 LegendreCoefs.cxx:221
 LegendreCoefs.cxx:222
 LegendreCoefs.cxx:223
 LegendreCoefs.cxx:224
 LegendreCoefs.cxx:225
 LegendreCoefs.cxx:226
 LegendreCoefs.cxx:227
 LegendreCoefs.cxx:228
 LegendreCoefs.cxx:229
 LegendreCoefs.cxx:230
 LegendreCoefs.cxx:231
 LegendreCoefs.cxx:232
 LegendreCoefs.cxx:233
 LegendreCoefs.cxx:234
 LegendreCoefs.cxx:235
 LegendreCoefs.cxx:236
 LegendreCoefs.cxx:237
 LegendreCoefs.cxx:238
 LegendreCoefs.cxx:239
 LegendreCoefs.cxx:240
 LegendreCoefs.cxx:241
 LegendreCoefs.cxx:242
 LegendreCoefs.cxx:243
 LegendreCoefs.cxx:244
 LegendreCoefs.cxx:245
 LegendreCoefs.cxx:246
 LegendreCoefs.cxx:247
 LegendreCoefs.cxx:248
 LegendreCoefs.cxx:249
 LegendreCoefs.cxx:250
 LegendreCoefs.cxx:251
 LegendreCoefs.cxx:252
 LegendreCoefs.cxx:253
 LegendreCoefs.cxx:254
 LegendreCoefs.cxx:255
 LegendreCoefs.cxx:256
 LegendreCoefs.cxx:257
 LegendreCoefs.cxx:258
 LegendreCoefs.cxx:259
 LegendreCoefs.cxx:260
 LegendreCoefs.cxx:261
 LegendreCoefs.cxx:262
 LegendreCoefs.cxx:263
 LegendreCoefs.cxx:264
 LegendreCoefs.cxx:265
 LegendreCoefs.cxx:266
 LegendreCoefs.cxx:267
 LegendreCoefs.cxx:268
 LegendreCoefs.cxx:269
 LegendreCoefs.cxx:270
 LegendreCoefs.cxx:271
 LegendreCoefs.cxx:272
 LegendreCoefs.cxx:273
 LegendreCoefs.cxx:274
 LegendreCoefs.cxx:275
 LegendreCoefs.cxx:276
 LegendreCoefs.cxx:277
 LegendreCoefs.cxx:278
 LegendreCoefs.cxx:279
 LegendreCoefs.cxx:280
 LegendreCoefs.cxx:281
 LegendreCoefs.cxx:282
 LegendreCoefs.cxx:283
 LegendreCoefs.cxx:284
 LegendreCoefs.cxx:285
 LegendreCoefs.cxx:286
 LegendreCoefs.cxx:287
 LegendreCoefs.cxx:288
 LegendreCoefs.cxx:289
 LegendreCoefs.cxx:290
 LegendreCoefs.cxx:291
 LegendreCoefs.cxx:292
 LegendreCoefs.cxx:293
 LegendreCoefs.cxx:294
 LegendreCoefs.cxx:295
 LegendreCoefs.cxx:296
 LegendreCoefs.cxx:297
 LegendreCoefs.cxx:298
 LegendreCoefs.cxx:299
 LegendreCoefs.cxx:300
 LegendreCoefs.cxx:301
 LegendreCoefs.cxx:302
 LegendreCoefs.cxx:303
 LegendreCoefs.cxx:304
 LegendreCoefs.cxx:305
 LegendreCoefs.cxx:306
 LegendreCoefs.cxx:307
 LegendreCoefs.cxx:308
 LegendreCoefs.cxx:309
 LegendreCoefs.cxx:310
 LegendreCoefs.cxx:311
 LegendreCoefs.cxx:312
 LegendreCoefs.cxx:313
 LegendreCoefs.cxx:314
 LegendreCoefs.cxx:315
 LegendreCoefs.cxx:316
 LegendreCoefs.cxx:317
 LegendreCoefs.cxx:318
 LegendreCoefs.cxx:319
 LegendreCoefs.cxx:320
 LegendreCoefs.cxx:321
 LegendreCoefs.cxx:322
 LegendreCoefs.cxx:323
 LegendreCoefs.cxx:324
 LegendreCoefs.cxx:325
 LegendreCoefs.cxx:326
 LegendreCoefs.cxx:327
 LegendreCoefs.cxx:328
 LegendreCoefs.cxx:329
 LegendreCoefs.cxx:330
 LegendreCoefs.cxx:331
 LegendreCoefs.cxx:332
 LegendreCoefs.cxx:333
 LegendreCoefs.cxx:334
 LegendreCoefs.cxx:335
 LegendreCoefs.cxx:336
 LegendreCoefs.cxx:337
 LegendreCoefs.cxx:338
 LegendreCoefs.cxx:339
 LegendreCoefs.cxx:340
 LegendreCoefs.cxx:341
 LegendreCoefs.cxx:342
 LegendreCoefs.cxx:343
 LegendreCoefs.cxx:344
 LegendreCoefs.cxx:345
 LegendreCoefs.cxx:346
 LegendreCoefs.cxx:347
 LegendreCoefs.cxx:348
 LegendreCoefs.cxx:349
 LegendreCoefs.cxx:350
 LegendreCoefs.cxx:351
 LegendreCoefs.cxx:352
 LegendreCoefs.cxx:353
 LegendreCoefs.cxx:354
 LegendreCoefs.cxx:355
 LegendreCoefs.cxx:356
 LegendreCoefs.cxx:357
 LegendreCoefs.cxx:358
 LegendreCoefs.cxx:359
 LegendreCoefs.cxx:360
 LegendreCoefs.cxx:361
 LegendreCoefs.cxx:362
 LegendreCoefs.cxx:363
 LegendreCoefs.cxx:364
 LegendreCoefs.cxx:365
 LegendreCoefs.cxx:366
 LegendreCoefs.cxx:367
 LegendreCoefs.cxx:368
 LegendreCoefs.cxx:369
 LegendreCoefs.cxx:370
 LegendreCoefs.cxx:371
 LegendreCoefs.cxx:372
 LegendreCoefs.cxx:373
 LegendreCoefs.cxx:374
 LegendreCoefs.cxx:375
 LegendreCoefs.cxx:376
 LegendreCoefs.cxx:377
 LegendreCoefs.cxx:378
 LegendreCoefs.cxx:379
 LegendreCoefs.cxx:380
 LegendreCoefs.cxx:381
 LegendreCoefs.cxx:382
 LegendreCoefs.cxx:383
 LegendreCoefs.cxx:384
 LegendreCoefs.cxx:385
 LegendreCoefs.cxx:386
 LegendreCoefs.cxx:387
 LegendreCoefs.cxx:388
 LegendreCoefs.cxx:389
 LegendreCoefs.cxx:390
 LegendreCoefs.cxx:391
 LegendreCoefs.cxx:392
 LegendreCoefs.cxx:393
 LegendreCoefs.cxx:394
 LegendreCoefs.cxx:395
 LegendreCoefs.cxx:396
 LegendreCoefs.cxx:397
 LegendreCoefs.cxx:398
 LegendreCoefs.cxx:399
 LegendreCoefs.cxx:400
 LegendreCoefs.cxx:401
 LegendreCoefs.cxx:402
 LegendreCoefs.cxx:403
 LegendreCoefs.cxx:404
 LegendreCoefs.cxx:405