Commit 89d34167 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Make sure that vector spaces are defined both for single sphere and cluster case

parent efa73552
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -686,7 +686,7 @@ int cluster_jxi488_cycle(int jxi488, ScattererConfiguration *sconf, GeometryConf
  int lm = 0;
  if (le > lm) lm = le;
  if (li > lm) lm = li;
  int nsph = gconf->number_of_spheres;
  int nsph = sconf->number_of_spheres;
  np_int mxndm = gconf->mxndm;
  int iavm = gconf->iavm;
  int inpol = gconf->in_pol;
+0 −2
Original line number Diff line number Diff line
@@ -76,8 +76,6 @@ public:
  int nsph;
  //! \brief NLEMT = 2 * LE * (LE + 2).
  int nlemt;
  //! \brief NLMMT = 2 * LM * (LM + 2).
  int nlmmt;
  //! \brief Number of configurations
  int configurations;
  //! \brief QUESTION: definition?
+6 −6
Original line number Diff line number Diff line
@@ -38,12 +38,14 @@ C1::C1(GeometryConfiguration *gconf, ScattererConfiguration *sconf) {
  lm = gconf->l_max;
  li = gconf->li;
  le = gconf->le;
  nlemt = 2 * (le * (le + 2));
  if (lm == 0) {
    lm = (li > le) ? li : le;
  } else {
    if (li == 0) li = lm;
    if (le == 0) nlemt = 2 * (lm * (lm + 2));
  }
  nsph = gconf->number_of_spheres;
  nlmmt = 2 * (lm * (lm + 2));
  nlemt = 2 * (le * (le + 2));

  vec_rmi = new dcomplex[nsph * li]();
  vec_rei = new dcomplex[nsph * li]();
@@ -108,7 +110,6 @@ C1::C1(GeometryConfiguration *gconf, ScattererConfiguration *sconf) {
}

C1::C1(const C1& rhs) {
  nlmmt = rhs.nlmmt;
  nlemt = rhs.nlemt;
  nsph = rhs.nsph;
  lm = rhs.lm;
@@ -201,7 +202,6 @@ C1::C1(const C1& rhs) {

#ifdef MPI_VERSION
C1::C1(const mixMPI *mpidata) {
  MPI_Bcast(&nlmmt, 1, MPI_INT, 0, MPI_COMM_WORLD);
  MPI_Bcast(&nlemt, 1, MPI_INT, 0, MPI_COMM_WORLD);
  MPI_Bcast(&nsph, 1, MPI_INT, 0, MPI_COMM_WORLD);
  MPI_Bcast(&lm, 1, MPI_INT, 0, MPI_COMM_WORLD);
@@ -285,7 +285,6 @@ C1::C1(const mixMPI *mpidata) {
}

void C1::mpibcast(const mixMPI *mpidata) {
  MPI_Bcast(&nlmmt, 1, MPI_INT, 0, MPI_COMM_WORLD);
  MPI_Bcast(&nlemt, 1, MPI_INT, 0, MPI_COMM_WORLD);
  MPI_Bcast(&nsph, 1, MPI_INT, 0, MPI_COMM_WORLD);
  MPI_Bcast(&lm, 1, MPI_INT, 0, MPI_COMM_WORLD);
@@ -765,7 +764,8 @@ C4::C4(GeometryConfiguration *gconf) {
  // The following is needed to initialize C1_AddOns
  litpo = li + li + 1;
  litpos = litpo * litpo;
  lmtpo = li + le + 1;
  //lmtpo = li + le + 1;
  lmtpo = lm + lm + 1;
  lmtpos = lmtpo * lmtpo;
  nlim = li * (li + 2);
  nlem = le * (le + 2);