void
OPMSDOrientationalCorrelator::initialise()
{
  dout << "The length of the MSD orientational correlator is " << length << std::endl;

  historicalData.resize(Sim->N, boost::circular_buffer<RUpair>(length));

  stepped_data_parallel.resize(length, double(0.0));
  stepped_data_perpendicular.resize(length, double(0.0));
  stepped_data_rotational_legendre1.resize(length, double(0.0));
  stepped_data_rotational_legendre2.resize(length, double(0.0));

  // The Legendre polynomials are equal to 1 at t = 0
  stepped_data_rotational_legendre1[0] = 1.0;
  stepped_data_rotational_legendre2[0] = 1.0;

  currCorrLength = 1.0;

  const std::vector<Liouvillean::rotData>& initial_rdat(Sim->dynamics.getLiouvillean().getCompleteRotData());

  BOOST_FOREACH(const Particle& part, Sim->particleList)
  {
    historicalData[part.getID()].push_front(RUpair(part.getPosition(), initial_rdat[part.getID()].orientation));
  }
}
示例#2
0
  void
  OPMSDOrientational::initialise()
  {
    initialConfiguration.clear();
    initialConfiguration.resize(Sim->N);

    const std::vector<Dynamics::rotData>& rdat(Sim->dynamics->getCompleteRotData());

    for (size_t ID = 0; ID < Sim->N; ++ID)
      {
	initialConfiguration[ID] = RUpair(Sim->particles[ID].getPosition(), rdat[ID].orientation * Quaternion::initialDirector());
      }
  }
void
OPMSDOrientationalCorrelator::ticker()
{
    const std::vector<Dynamics::rotData>& current_rdat(Sim->dynamics->getCompleteRotData());
    BOOST_FOREACH(const Particle& part, Sim->particles)
    {
        historicalData[part.getID()].push_front(RUpair(part.getPosition(), current_rdat[part.getID()].orientation));
    }

    if (notReady)
    {
        if (++currCorrLength != length)
        {
            return;
        }

        notReady = false;
    }

    accPass();
}