src/MHD/ConductingFluidNodeList.cc
//------------------------------------------------------------------------------
// Restore the state of the NodeList from the given file.
//------------------------------------------------------------------------------
Restore the state of the NodeList from the given file.
Restore the state of the NodeList from the given file .
void
ConductingFluidNodeList::
restoreState(const FileIO& file, const std::string& pathName) {
  SphNodeList<Dim<3> >::restoreState(file, pathName);
  file.read(*mMagneticInduction, pathName + "/magneticInduction");
  file.read(*mDBDt, pathName + "/DBDt");
  file.read(*mDivB, pathName + "/divB");
  file.read(*mCurrentDensity, pathName + "/currentDensity");
  file.read(*mResistivity, pathName + "/resistivity");
  file.read(*mTotalSpecificEnergy, pathName + "/totalSpecificEnergy");
  file.read(*mDeDt, pathName + "/DeDt");
  int RpolicyType;
  file.read(RpolicyType, pathName + "/resistivityPolicy");
  if (RpolicyType == 0) 
  {
    mResistivityPolicy.reset(new NonDynamicState<Dim<3>, Field<Dim<3>, Scalar> >());
  }
  else 
  {
    CHECK(RpolicyType == 1) 
    double C, Rmax, rhoMin;
    file.read(C, pathName + "/SpitzerResistivity_C");
    file.read(Rmax, pathName + "/SpitzerResistivity_Rmax");
    file.read(rhoMin, pathName + "/SpitzerResistivity_rhoMin");
    mResistivityPolicy.reset(new SpitzerResistivityUpdatePolicy(C, Rmax, rhoMin));
  }
}
void ConductingFluidNodeList :: restoreState ( const FileIO & file , const std :: string & pathName ) { SphNodeList < Dim < 3 > > :: restoreState ( file , pathName ) ; file . read ( * mMagneticInduction , pathName + " " ) ; file . read ( * mDBDt , pathName + " " ) ; file . read ( * mDivB , pathName + " " ) ; file . read ( * mCurrentDensity , pathName + " " ) ; file . read ( * mResistivity , pathName + " " ) ; file . read ( * mTotalSpecificEnergy , pathName + " " ) ; file . read ( * mDeDt , pathName + " " ) ; int RpolicyType ; file . read ( RpolicyType , pathName + " " ) ; if ( RpolicyType == 0 ) { mResistivityPolicy . reset ( new NonDynamicState < Dim < 3 > , Field < Dim < 3 > , Scalar > > ( ) ) ; } else { CHECK ( RpolicyType == 1 ) double C , Rmax , rhoMin ; file . read ( C , pathName + " " ) ; file . read ( Rmax , pathName + " " ) ; file . read ( rhoMin , pathName + " " ) ; mResistivityPolicy . reset ( new SpitzerResistivityUpdatePolicy ( C , Rmax , rhoMin ) ) ; } }
Restore the state of the NodeList from the given file.
Restore the state of the NodeList from the given file .
// Restore the ancestor class. // Restore each of the internal fields of the FluidNodeList. // Resistivity policy. // Constant // Spitzer policy // Spitzer