Functions | Variables

smr.c File Reference

Functions to handle static mesh refinement (SMR). More...

Go to the source code of this file.

Functions

void ProCon (const ConsS Uim1, const ConsS Ui, const ConsS Uip1, const ConsS Ujm1, const ConsS Ujp1, const ConsS Ukm1, const ConsS Ukp1, ConsS PCon[][2][2])
 Prolongates conserved variables in a 2x2x2 cube.
void ProFld (Real3Vect BGZ[][3][3], Real3Vect PFld[][3][3], const Real dx1c, const Real dx2c, const Real dx3c)
 Uses the divergence-preserving prolongation operators of Toth & Roe (JCP, 180, 736, 2002) to interpolate the face centered fields in a 3x2x2 block for Bx, 2x3x2 block for By, and 2x2x3 block for Bz.
static Real mcd_slope (const Real vl, const Real vc, const Real vr)
 Computes monotonized linear slope.
void RestrictCorrect (MeshS *pM)
 Restricts (averages) fine Grid solution to coarse, and corrects cells at fine/coarse boundaries using restricted fine Grid fluxes.
void Prolongate (MeshS *pM)
 Sets BC on fine Grid by prolongation (interpolation) of coarse Grid solution into fine grid ghost zones.
void SMR_init (MeshS *pM)
 Allocates memory for send/receive buffers.

Variables

static double ** send_bufP = NULL
static double ** send_bufRC = NULL
static double *** recv_bufP = NULL
static double *** recv_bufRC = NULL
static MPI_Request *** recv_rq = NULL
static MPI_Request ** send_rq = NULL
static int maxND
static int * start_addrP
static ConsS *** GZ [3]
Real ** SMRemf1
Real ** SMRemf2
Real ** SMRemf3
Real3Vect *** BFld [3]

Detailed Description

Functions to handle static mesh refinement (SMR).

PURPOSE: Functions to handle static mesh refinement (SMR).

REFERENCES:

CONTAINS PUBLIC FUNCTIONS:

PRIVATE FUNCTION PROTOTYPES:

Definition in file smr.c.


Function Documentation

static Real mcd_slope ( const Real  vl,
const Real  vc,
const Real  vr 
) [static]

Computes monotonized linear slope.

Definition at line 2328 of file smr.c.

Referenced by ProCon(), and ProFld().

Here is the caller graph for this function:

void ProCon ( const ConsS  Uim1,
const ConsS  Ui,
const ConsS  Uip1,
const ConsS  Ujm1,
const ConsS  Ujp1,
const ConsS  Ukm1,
const ConsS  Ukp1,
ConsS  PCon[][2][2] 
)

Prolongates conserved variables in a 2x2x2 cube.

Definition at line 1918 of file smr.c.

References ConsS::B1c, ConsS::B2c, ConsS::B3c, check_Prim(), PrimS::d, d(), ConsS::d, ConsS::E, ConsS::M1, M2(), ConsS::M2, ConsS::M3, mcd_slope(), n, PrimS::P, ConsS::s, s, PrimS::V1, PrimS::V2, PrimS::V3, and W.

Referenced by Prolongate().

Here is the call graph for this function:

Here is the caller graph for this function:

void ProFld ( Real3Vect  BGZ[][3][3],
Real3Vect  PFld[][3][3],
const Real  dx1c,
const Real  dx2c,
const Real  dx3c 
)

Uses the divergence-preserving prolongation operators of Toth & Roe (JCP, 180, 736, 2002) to interpolate the face centered fields in a 3x2x2 block for Bx, 2x3x2 block for By, and 2x2x3 block for Bz.

Definition at line 2186 of file smr.c.

References mcd_slope(), Real3Vect::x, Real3Vect::y, and Real3Vect::z.

Referenced by Prolongate().

Here is the call graph for this function:

Here is the caller graph for this function:

void Prolongate ( MeshS pM  ) 
void RestrictCorrect ( MeshS pM  ) 
void SMR_init ( MeshS pM  ) 

Allocates memory for send/receive buffers.

Definition at line 1799 of file smr.c.

References ath_error(), calloc_1d_array(), calloc_2d_array(), calloc_3d_array(), GridS::CGrid, MeshS::Domain, MeshS::DomainsPerLevel, DomainS::Grid, maxND, GridS::NCGrid, MeshS::NLevels, GridS::NPGrid, GridOvrlpS::nWordsP, GridOvrlpS::nWordsRC, GridS::Nx, GridS::PGrid, recv_bufP, recv_bufRC, recv_rq, send_bufP, send_bufRC, send_rq, SMRemf1, SMRemf2, SMRemf3, and start_addrP.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Real3Vect*** BFld[3]

Definition at line 49 of file smr.c.

ConsS*** GZ[3] [static]

Definition at line 46 of file smr.c.

int maxND [static]

Definition at line 44 of file smr.c.

Referenced by Prolongate(), and SMR_init().

double*** recv_bufP = NULL [static]

Definition at line 38 of file smr.c.

Referenced by Prolongate(), and SMR_init().

double*** recv_bufRC = NULL [static]

Definition at line 40 of file smr.c.

Referenced by RestrictCorrect(), and SMR_init().

MPI_Request*** recv_rq = NULL [static]

Definition at line 41 of file smr.c.

Referenced by Prolongate(), RestrictCorrect(), and SMR_init().

double** send_bufP = NULL [static]

Definition at line 36 of file smr.c.

Referenced by Prolongate(), and SMR_init().

double** send_bufRC = NULL [static]

Definition at line 37 of file smr.c.

Referenced by RestrictCorrect(), and SMR_init().

MPI_Request** send_rq = NULL [static]

Definition at line 42 of file smr.c.

Referenced by Prolongate(), RestrictCorrect(), and SMR_init().

Definition at line 48 of file smr.c.

Referenced by RestrictCorrect(), and SMR_init().

Definition at line 48 of file smr.c.

Referenced by RestrictCorrect(), and SMR_init().

Definition at line 48 of file smr.c.

Referenced by RestrictCorrect(), and SMR_init().

int * start_addrP [static]

Definition at line 44 of file smr.c.

Referenced by Prolongate(), and SMR_init().