releasedExamples/AMRINS/BCutil/VelIBC.cpp
// Factory method - this object is its own factory:
// Return a pointer to a new PhysIBC object with m_isDefined = false (i.e.,
// its define() must be called before it is used) and m_isFortranCommonSet
// set to value of m_isFortranCommonset in the current (factory) object.
Factory method - this object is its own factory:
Return a pointer to a new PhysIBC object with m_isDefined = false  must be called before it is used) and m_isFortranCommonSet
set to value of m_isFortranCommonset in the current (factory) object.
Factory method - this object is its own factory : Return a pointer to a new PhysIBC object with m_isDefined = false must be called before it is used ) and m_isFortranCommonSet set to value of m_isFortranCommonset in the current ( factory ) object .
PhysIBC* VelIBC::new_physIBC()
{
  VelIBC* retval = new VelIBC();
  retval->m_velocity = m_velocity;
  retval->m_probtype = m_probtype;
  retval->m_isBCvalSet = m_isBCvalSet;
  retval->m_isSlopeValSet = m_isSlopeValSet;
  for (int dir=0; dir<SpaceDim; dir++)
    {
      retval->m_bcVal[dir][0] = m_bcVal[dir][0];
      retval->m_bcVal[dir][1] = m_bcVal[dir][1];
      retval->m_slopeVal[dir][0] = m_slopeVal[dir][0];
      retval->m_slopeVal[dir][1] = m_slopeVal[dir][1];
  }
  return static_cast<PhysIBC*>(retval);
}
PhysIBC * VelIBC :: new_physIBC ( ) { VelIBC * retval = new VelIBC ( ) ; retval -> m_velocity = m_velocity ; retval -> m_probtype = m_probtype ; retval -> m_isBCvalSet = m_isBCvalSet ; retval -> m_isSlopeValSet = m_isSlopeValSet ; for ( int dir = 0 ; dir < SpaceDim ; dir ++ ) { retval -> m_bcVal [ dir ] [ 0 ] = m_bcVal [ dir ] [ 0 ] ; retval -> m_bcVal [ dir ] [ 1 ] = m_bcVal [ dir ] [ 1 ] ; retval -> m_slopeVal [ dir ] [ 0 ] = m_slopeVal [ dir ] [ 0 ] ; retval -> m_slopeVal [ dir ] [ 1 ] = m_slopeVal [ dir ] [ 1 ] ; } return static_cast < PhysIBC * > ( retval ) ; }
Factory method - this object is its own factory:
Return a pointer to a new PhysIBC object with m_isDefined = false (i.e.,
its define() must be called before it is used) and m_isFortranCommonSet
set to value of m_isFortranCommonset in the current (factory) object.
Factory method - this object is its own factory : Return a pointer to a new PhysIBC object with m_isDefined = false ( i . e . its define () must be called before it is used ) and m_isFortranCommonSet set to value of m_isFortranCommonset in the current ( factory ) object .