releasedExamples/MultiDimPhase/advectSrc/PatchAdvection.cpp
// Compute the conserved variables from the primitive variables
Compute the conserved variables from the primitive variables
Compute the conserved variables from the primitive variables
void PatchAdvection::primToCons(FArrayBox&       a_U,
                                const FArrayBox& a_W,
                                const Box&       a_box)
{
  CH_assert(isDefined());
  CH_assert(a_U.box().contains(a_box));
  CH_assert(a_W.box().contains(a_box));
  a_U.copy(a_W, a_box);
}
void PatchAdvection :: primToCons ( FArrayBox & a_U , const FArrayBox & a_W , const Box & a_box ) { CH_assert ( isDefined ( ) ) ; CH_assert ( a_U . box ( ) . contains ( a_box ) ) ; CH_assert ( a_W . box ( ) . contains ( a_box ) ) ; a_U . copy ( a_W , a_box ) ; }
Compute the conserved variables from the primitive variables
Compute the conserved variables from the primitive variables
// since primitive variables are conserved in this problem, // this is easy