lib/src/AMRTimeDependent/AdvectPhysics.cpp
// Factory method - this object is its own factory.  It returns a pointer
// to new AdvectPhysics object with the same definition as this object.
Factory method - this object is its own factory.  It returns a pointer
to new AdvectPhysics object with the same definition as this object.
Factory method - this object is its own factory . It returns a pointer to new AdvectPhysics object with the same definition as this object .
GodunovPhysics*
AdvectPhysics::
new_godunovPhysics() const
{
  AdvectPhysics* newPtr = new AdvectPhysics();
  newPtr->setPhysIBC(getPhysIBC());
  newPtr->define(m_domain,m_dx);
  GodunovPhysics* retval = static_cast<GodunovPhysics*>(newPtr);
  return retval;
}
GodunovPhysics * AdvectPhysics :: new_godunovPhysics ( ) const { AdvectPhysics * newPtr = new AdvectPhysics ( ) ; newPtr -> setPhysIBC ( getPhysIBC ( ) ) ; newPtr -> define ( m_domain , m_dx ) ; GodunovPhysics * retval = static_cast < GodunovPhysics * > ( newPtr ) ; return retval ; }
Factory method - this object is its own factory.
Factory method - this object is its own factory .
// Make the new object // Pass the current initial and boundary condition (IBC) object to this new // patch integrator so it can create its own IBC object and define it as it // needs to (i.e. new domain and grid spacing if necessary) // Define the same domain and dx // Return the new object