![]() |
Gowdy solver
|
GridUser contains cached variables from the grid-driver. More...
#include <gridDriver.h>
Public Member Functions | |
Real & | t (Real m, Real n) |
Real & | r (Real m, Real n) |
GridUser (UniformGrid &ug) | |
void | cubicSplineShmooth (Int m, Int gf, Int lin2n, Int cub2n) |
Cubic spline smoother of a grid function. | |
Data Fields | |
UniformGrid * | gridDriver |
Grid object. | |
GridPoint ** | grid |
Actual grid data. | |
Int | nLen |
Number of cells in r -direction. | |
Int | mLen |
Number of cells in t -direction. | |
Int | nGhost |
Number of virtual (ghost) cells on the r -boundary. | |
Real | delta_r |
The grid spacing accross r | |
Real | inv_delta_r |
1 / delta_r | |
Real | inv_delta_rr |
1 / delta_r^2 |
GridUser contains cached variables from the grid-driver.
Definition at line 201 of file gridDriver.h.
GridUser::GridUser | ( | UniformGrid & | ug | ) | [inline] |
Definition at line 217 of file gridDriver.h.
References delta_r, grid, inv_delta_r, inv_delta_rr, mLen, nGhost, and nLen.
{ grid = ug.get_grid (); nLen = ug.get_nLen (); mLen = ug.get_mLen (); nGhost = ug.get_nGhost (); delta_r = ug.get_delta_r (); // Calculate various constants involving 1/delta_r // inv_delta_r = 1 / ug.get_delta_r (); inv_delta_rr = 1 / ( ug.get_delta_r () * ug.get_delta_r () ); }
void GridUser::cubicSplineShmooth | ( | Int | m, |
Int | gf, | ||
Int | lin2n, | ||
Int | cub2n | ||
) | [inline] |
Cubic spline smoother of a grid function.
Definition at line 233 of file gridDriver.h.
References delta_r, GF, CubicSpline::initialize(), nGhost, and r().
{ // The accuracy is very low at low r. Assume that a few first cells are linear. // if( lin2n > 0 ) { Real dydx = delta_r * GF(gf,m,nGhost+lin2n) / r(m,nGhost+lin2n); for ( Int i = 0; i < lin2n; ++i ) { GF(gf,m,nGhost+i) = ( i + 0.5 ) * dydx; } } // A six-point cubic spline to smooth the region around r = 0. // if( cub2n > 0 ) { static CubicSpline spline( 6 ); Real pts[6][2] = { { r(m,nGhost ), GF(gf,m,nGhost ) }, { r(m,nGhost + 3 ), GF(gf,m,nGhost + 3 ) }, { r(m,nGhost + cub2n/2 ), GF(gf,m,nGhost + cub2n/2 ) }, { r(m,nGhost + cub2n-6 ), GF(gf,m,nGhost + cub2n-6 ) }, { r(m,nGhost + cub2n-3 ), GF(gf,m,nGhost + cub2n-3 ) }, { r(m,nGhost + cub2n ), GF(gf,m,nGhost + cub2n ) } }; spline.initialize( pts ); for( Int i = 0; i < cub2n; ++i ) { GF(gf,m,nGhost+i) = spline( r(m,nGhost+i) ); } } }
Real& GridUser::r | ( | Real | m, |
Real | n | ||
) |
Reimplemented in GowdyEvolve.
Referenced by cubicSplineShmooth().
Real& GridUser::t | ( | Real | m, |
Real | n | ||
) |
Reimplemented in GowdyEvolve.
The grid spacing accross r
Definition at line 210 of file gridDriver.h.
Referenced by cubicSplineShmooth(), GridUser(), and MoLIntegrator::MoLIntegrator().
Grid object.
Definition at line 203 of file gridDriver.h.
Referenced by MoLIntegrator::integStep_Begin(), and MoLIntegrator::integStep_End().
Number of cells in t
-direction.
Definition at line 207 of file gridDriver.h.
Referenced by GridUser(), MoLIntegrator::integrate_AvgICN(), and MoLIntegrator::integrate_MoL().
Number of virtual (ghost) cells on the r
-boundary.
Definition at line 208 of file gridDriver.h.
Referenced by GowdyEvolve::applyLeftBoundaryCondition(), GowdyEvolve::applyRightBoundaryCondition(), cubicSplineShmooth(), GridUser(), MoLIntegrator::integrate_AvgICN(), MoLIntegrator::integrate_MoL(), GowdyEvolve::integStep_CalcEvolutionRHS(), GowdyEvolve::integStep_CheckForNaNs(), MoLIntegrator::integStep_Checkpoint(), MoLIntegrator::integStep_Euler(), MoLIntegrator::integStep_MoL(), MoLIntegrator::integStep_MoLInit(), MoLIntegrator::quit(), MoLIntegrator::reportIntegrationTime(), and GowdyEvolve::setupInitialData().
Number of cells in r
-direction.
Definition at line 206 of file gridDriver.h.
Referenced by GowdyEvolve::applyLeftBoundaryCondition(), GowdyEvolve::applyRightBoundaryCondition(), GridUser(), MoLIntegrator::integrate_AvgICN(), MoLIntegrator::integrate_MoL(), GowdyEvolve::integStep_CalcEvolutionRHS(), MoLIntegrator::integStep_Checkpoint(), MoLIntegrator::integStep_Euler(), MoLIntegrator::integStep_MoL(), MoLIntegrator::integStep_MoLInit(), and GowdyEvolve::setupInitialData().