src/QMCWaveFunctions/Jastrow/RPAJastrow.cpp
/** this is a great deal of logic for make clone I'm wondering what is going on
 */
this is a great deal of logic for make clone I'm wondering what is going on
this is a great deal of logic for make clone I ' m wondering what is going on
WaveFunctionComponent* RPAJastrow::makeClone(ParticleSet& tpq) const
{
  HandlerType* tempHandler = nullptr;
  if (rpafunc == "yukawa" || rpafunc == "breakup")
  {
    tempHandler = new LRHandlerTemp<YukawaBreakup<RealType>,
                                    LPQHIBasis>(dynamic_cast<const LRHandlerTemp<YukawaBreakup<RealType>, LPQHIBasis>&>(
                                                    *myHandler),
                                                tpq);
  }
  else if (rpafunc == "rpa")
  {
    tempHandler =
        new LRRPAHandlerTemp<RPABreakup<RealType>,
                             LPQHIBasis>(dynamic_cast<const LRRPAHandlerTemp<RPABreakup<RealType>, LPQHIBasis>&>(
                                             *myHandler),
                                         tpq);
  }
  else if (rpafunc == "dyukawa")
  {
    tempHandler =
        new LRHandlerTemp<DerivYukawaBreakup<RealType>,
                          LPQHIBasis>(dynamic_cast<const LRHandlerTemp<DerivYukawaBreakup<RealType>, LPQHIBasis>&>(
                                          *myHandler),
                                      tpq);
  }
  else if (rpafunc == "drpa")
  {
    tempHandler =
        new LRRPAHandlerTemp<DerivRPABreakup<RealType>,
                             LPQHIBasis>(dynamic_cast<const LRRPAHandlerTemp<DerivRPABreakup<RealType>, LPQHIBasis>&>(
                                             *myHandler),
                                         tpq);
  }
  RPAJastrow* myClone = new RPAJastrow(tpq, IsManager);
  myClone->Rcut = Rcut;
  myClone->Kc = Kc;
  myClone->setHandler(tempHandler);
  if (!DropLongRange)
    myClone->makeLongRange();
  if (!DropShortRange)
    myClone->makeShortRange();
  return myClone;
}
WaveFunctionComponent * RPAJastrow :: makeClone ( ParticleSet & tpq ) const { HandlerType * tempHandler = nullptr ; if ( rpafunc == " " || rpafunc == " " ) { tempHandler = new LRHandlerTemp < YukawaBreakup < RealType > , LPQHIBasis > ( dynamic_cast < const LRHandlerTemp < YukawaBreakup < RealType > , LPQHIBasis > & > ( * myHandler ) , tpq ) ; } else if ( rpafunc == " " ) { tempHandler = new LRRPAHandlerTemp < RPABreakup < RealType > , LPQHIBasis > ( dynamic_cast < const LRRPAHandlerTemp < RPABreakup < RealType > , LPQHIBasis > & > ( * myHandler ) , tpq ) ; } else if ( rpafunc == " " ) { tempHandler = new LRHandlerTemp < DerivYukawaBreakup < RealType > , LPQHIBasis > ( dynamic_cast < const LRHandlerTemp < DerivYukawaBreakup < RealType > , LPQHIBasis > & > ( * myHandler ) , tpq ) ; } else if ( rpafunc == " " ) { tempHandler = new LRRPAHandlerTemp < DerivRPABreakup < RealType > , LPQHIBasis > ( dynamic_cast < const LRRPAHandlerTemp < DerivRPABreakup < RealType > , LPQHIBasis > & > ( * myHandler ) , tpq ) ; } RPAJastrow * myClone = new RPAJastrow ( tpq , IsManager ) ; myClone -> Rcut = Rcut ; myClone -> Kc = Kc ; myClone -> setHandler ( tempHandler ) ; if ( ! DropLongRange ) myClone -> makeLongRange ( ) ; if ( ! DropShortRange ) myClone -> makeShortRange ( ) ; return myClone ; }
this is a great deal of logic for make clone I'm wondering what is going on
this is a great deal of logic for make clone I ' m wondering what is going on