Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

PatchIdealMHD Class Reference

#include <PatchIdealMHD.H>

Inheritance diagram for PatchIdealMHD:

Inheritance graph
[legend]
Collaboration diagram for PatchIdealMHD:

Collaboration graph
[legend]
List of all members.

Detailed Description

An example PatchGodunov for ideal magneto-hydro-dynamics.


Public Member Functions

 PatchIdealMHD ()
virtual PatchGodunovnew_patchGodunov () const
 Factory method - this object is its own factory.

virtual Real getMaxWaveSpeed (const FArrayBox &a_U, const Box &a_box)
 Compute the maximum wave speed.

virtual int numConserved ()
 Number of conserved variables.

virtual Vector< string > stateNames ()
 Names of the conserved variables.

virtual Vector< string > plotNames ()
 Names of the plotting variables.

virtual int numFluxes ()
 Number of flux variables.

virtual void plottingVars (FArrayBox &a_W, const FArrayBox &a_U, const Box &a_box)
 Compute the plotting variables from the conserved variables within a_box.

virtual void correctState (FArrayBox &a_U, FArrayBox &a_phi, FArrayBox &a_rhs, FArrayBox a_flux[CH_SPACEDIM], const Real &a_dt, const Box &a_Box)

Protected Member Functions

virtual int numPrimitives ()
 Number of primitive variables.

virtual int numSlopes ()
 Number of primitive variables for which slopes are computed.

virtual void consToPrim (FArrayBox &a_W, const FArrayBox &a_U, const Box &a_box)
 Compute the primitive variables from the conserved variables within a_box.

virtual void primToCons (FArrayBox &a_U, const FArrayBox &a_W, const Box &a_box)
 Compute the conserved variables from the primitive variables within a_box.

virtual void normalPred (FArrayBox &a_WMinus, FArrayBox &a_WPlus, const FArrayBox &a_W, const FArrayBox &a_dW, const Real &a_scale, const int &a_dir, const Box &a_box)
 Extrapolate the primitive variables to the cell faces.

virtual void riemann (FArrayBox &a_F, const FArrayBox &a_WLeft, const FArrayBox &a_WRight, const int &a_dir, const Box &a_box)
 Compute a Riemann problem and generate fluxes at the faces.

virtual void updatePrim (FArrayBox &a_WMinus, FArrayBox &a_WPlus, const FArrayBox &a_F, const Real &a_scale, const int &a_dir, const Box &a_box)
 Update the primitive variables using fluxes (of the conserved variables).

virtual void updateCons (FArrayBox &a_U, const FArrayBox &a_F, const Real &a_scale, const int &a_dir, const Box &a_box)
 Update the conserved variable using fluxes and a scaling factor.

virtual void updateConsFinal (FArrayBox &a_U, const FArrayBox &a_F, const Real &a_scale, const int &a_dir, const Box &a_box)
virtual void postUpdateCons (FArrayBox &a_U, FArrayBox &a_rhs, const FArrayBox &a_Uold, const FArrayBox a_F[CH_SPACEDIM], const Real &a_dt, const Real &a_dx, const Box &a_box)
virtual Interval velocityInterval ()
 Interval within the primitive variables corresponding to the velocities.

virtual int pressureIndex ()
 Component index within the primitive variables of the pressure.

virtual int bulkModulusIndex ()
 Component index within the primitive variables of the bulk modulus.


Constructor & Destructor Documentation

PatchIdealMHD::PatchIdealMHD  ) 
 


Member Function Documentation

virtual PatchGodunov* PatchIdealMHD::new_patchGodunov  )  const [virtual]
 

Factory method - this object is its own factory.

Return a pointer to new PatchGodunov object with its initial and boundary condtions, slope parameters, and artificial viscosity information defined.

Implements PatchGodunov.

virtual Real PatchIdealMHD::getMaxWaveSpeed const FArrayBox a_U,
const Box a_box
[virtual]
 

Compute the maximum wave speed.

Implements PatchGodunov.

virtual int PatchIdealMHD::numConserved  )  [virtual]
 

Number of conserved variables.

Return the number of conserved variables.

Implements PatchGodunov.

virtual Vector<string> PatchIdealMHD::stateNames  )  [virtual]
 

Names of the conserved variables.

Return the names of the conserved variables.

Reimplemented from PatchGodunov.

virtual Vector<string> PatchIdealMHD::plotNames  )  [virtual]
 

Names of the plotting variables.

Return the names of the plotting variables.

virtual int PatchIdealMHD::numFluxes  )  [virtual]
 

Number of flux variables.

Return the number of flux variables. This can be greater than the number of conserved variables if addition fluxes/face-centered quantities are computed.

Implements PatchGodunov.

virtual void PatchIdealMHD::plottingVars FArrayBox a_W,
const FArrayBox a_U,
const Box a_box
[virtual]
 

Compute the plotting variables from the conserved variables within a_box.

virtual void PatchIdealMHD::correctState FArrayBox a_U,
FArrayBox a_phi,
FArrayBox a_rhs,
FArrayBox  a_flux[CH_SPACEDIM],
const Real a_dt,
const Box a_Box
[virtual]
 

virtual int PatchIdealMHD::numPrimitives  )  [protected, virtual]
 

Number of primitive variables.

Return the number of primitive variables. This may be greater than the number of conserved variables if derived/redundant quantities are also stored for convenience.

Implements PatchGodunov.

virtual int PatchIdealMHD::numSlopes  )  [protected, virtual]
 

Number of primitive variables for which slopes are computed.

Return the number of primitive variables for which slopes are computed. Only slopes corresponding to primitive variables in the interval 0 to numSlopes() - 1 are computed and only primitive variables in that interval are updated using the slopes.

Implements PatchGodunov.

virtual void PatchIdealMHD::consToPrim FArrayBox a_W,
const FArrayBox a_U,
const Box a_box
[protected, virtual]
 

Compute the primitive variables from the conserved variables within a_box.

Implements PatchGodunov.

virtual void PatchIdealMHD::primToCons FArrayBox a_U,
const FArrayBox a_W,
const Box a_box
[protected, virtual]
 

Compute the conserved variables from the primitive variables within a_box.

virtual void PatchIdealMHD::normalPred FArrayBox a_WMinus,
FArrayBox a_WPlus,
const FArrayBox a_W,
const FArrayBox a_dW,
const Real a_scale,
const int &  a_dir,
const Box a_box
[protected, virtual]
 

Extrapolate the primitive variables to the cell faces.

Extrapolate the primitive variables, a_W, in the minus and plus direction, a_dir, using the slopes a_dW within a_box. See document for details.

Implements PatchGodunov.

virtual void PatchIdealMHD::riemann FArrayBox a_F,
const FArrayBox a_WLeft,
const FArrayBox a_WRight,
const int &  a_dir,
const Box a_box
[protected, virtual]
 

Compute a Riemann problem and generate fluxes at the faces.

Given input left and right states in a direction, a_dir, compute a Riemann problem and generate fluxes at the faces within a_box.

Implements PatchGodunov.

virtual void PatchIdealMHD::updatePrim FArrayBox a_WMinus,
FArrayBox a_WPlus,
const FArrayBox a_F,
const Real a_scale,
const int &  a_dir,
const Box a_box
[protected, virtual]
 

Update the primitive variables using fluxes (of the conserved variables).

Given the fluxes, a_F, in a direction, a_dir, and a scaling factor, a_scale, update the primitive variables, a_WMinus and a_WPlus, within a_box. Note: The fluxes are fluxes of conserved variables.

Implements PatchGodunov.

virtual void PatchIdealMHD::updateCons FArrayBox a_U,
const FArrayBox a_F,
const Real a_scale,
const int &  a_dir,
const Box a_box
[protected, virtual]
 

Update the conserved variable using fluxes and a scaling factor.

Given the fluxes, a_F, in a direction, a_dir, and a scaling factor, a_scale, update the conserved variables, a_U, within a_box:

a_U = a_U - a_scale * (a_F(a_dir,HiSide) - a_F(a_dir,LoSide))

Implements PatchGodunov.

virtual void PatchIdealMHD::updateConsFinal FArrayBox a_U,
const FArrayBox a_F,
const Real a_scale,
const int &  a_dir,
const Box a_box
[protected, virtual]
 

virtual void PatchIdealMHD::postUpdateCons FArrayBox a_U,
FArrayBox a_rhs,
const FArrayBox a_Uold,
const FArrayBox  a_F[CH_SPACEDIM],
const Real a_dt,
const Real a_dx,
const Box a_box
[protected, virtual]
 

virtual Interval PatchIdealMHD::velocityInterval  )  [protected, virtual]
 

Interval within the primitive variables corresponding to the velocities.

Return the interval of component indices within the primitive variable of the velocities. Used for slope flattening (slope computation) and computing the divergence of the velocity (artificial viscosity).

Implements PatchGodunov.

virtual int PatchIdealMHD::pressureIndex  )  [protected, virtual]
 

Component index within the primitive variables of the pressure.

Return the component index withn the primitive variables for the pressure. Used for slope flattening (slope computation).

Implements PatchGodunov.

virtual int PatchIdealMHD::bulkModulusIndex  )  [protected, virtual]
 

Component index within the primitive variables of the bulk modulus.

Return the component index withn the primitive variables for the bulk modulus. Used for slope flattening (slope computation) used as a normalization to measure shock strength.

Implements PatchGodunov.


The documentation for this class was generated from the following file:
Generated on Fri Jul 2 17:55:59 2004 for Chombo by doxygen 1.3.2