MPI-AMRVAC  3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
Functions/Subroutines | Variables
mod_geometry Module Reference

Module with geometry-related routines (e.g., divergence, curl) More...

Functions/Subroutines

subroutine set_coordinate_system (geom)
 Set the coordinate system to be used. More...
 
subroutine set_pole
 
subroutine putgridgeo (igrid)
 Deallocate geometry-related variables. More...
 
subroutine get_surface_area (s, ixGL)
 calculate area of surfaces of cells More...
 
subroutine gradient (q, ixIL, ixOL, idir, gradq)
 Calculate gradient of a scalar q within ixL in direction idir. More...
 
subroutine gradientx (q, x, ixIL, ixOL, idir, gradq, fourth_order)
 Calculate gradient of a scalar q in direction idir at cell interfaces. More...
 
subroutine gradientq (q, x, ixIL, ixOL, idir, gradq)
 Calculate gradient of a scalar q in direction idir at cell interfaces. More...
 
subroutine gradients (q, ixIL, ixOL, idir, gradq)
 Calculate gradient of a scalar q within ixL in direction idir first use limiter to go from cell center to edge. More...
 
subroutine divvector (qvec, ixIL, ixOL, divq, fourthorder, sixthorder)
 Calculate divergence of a vector qvec within ixL. More...
 
subroutine divvectors (qvec, ixIL, ixOL, divq)
 Calculate divergence of a vector qvec within ixL using limited extrapolation to cell edges. More...
 
subroutine curlvector (qvec, ixIL, ixOL, curlvec, idirmin, idirmin0, ndir0, fourthorder)
 Calculate curl of a vector qvec within ixL Options to employ standard second order CD evaluations use Gauss theorem for non-Cartesian grids use Stokes theorem for non-Cartesian grids. More...
 
subroutine curlvector_trans (qvec, qvecc, ixIL, ixOL, curlvec, idim, idirmin, idirmin0, ndir0)
 Calculate idim transverse components of curl of a vector qvec within ixL Options to employ standard second order CD evaluations use Gauss theorem for non-Cartesian grids use Stokes theorem for non-Cartesian grids. More...
 

Variables

integer coordinate =-1
 
integer, parameter cartesian = 0
 
integer, parameter cartesian_stretched = 1
 
integer, parameter cylindrical = 2
 
integer, parameter spherical = 3
 
integer, parameter cartesian_expansion = 4
 
integer type_curl =0
 
integer, parameter central =1
 
integer, parameter gaussbased =2
 
integer, parameter stokesbased =3
 

Detailed Description

Module with geometry-related routines (e.g., divergence, curl)

Function/Subroutine Documentation

◆ curlvector()

subroutine mod_geometry::curlvector ( double precision, dimension(ixi^s,1:ndir0), intent(in)  qvec,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,idirmin0:3), intent(inout)  curlvec,
integer, intent(inout)  idirmin,
integer, intent(in)  idirmin0,
integer, intent(in)  ndir0,
logical, intent(in), optional  fourthorder 
)

Calculate curl of a vector qvec within ixL Options to employ standard second order CD evaluations use Gauss theorem for non-Cartesian grids use Stokes theorem for non-Cartesian grids.

Parameters
[in]fourthorderDefault: false

Definition at line 662 of file mod_geometry.t.

◆ curlvector_trans()

subroutine mod_geometry::curlvector_trans ( double precision, dimension(ixi^s,1:ndir0), intent(in)  qvec,
double precision, dimension(ixi^s,1:ndir0), intent(in)  qvecc,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s,idirmin0:3), intent(inout)  curlvec,
integer, intent(in)  idim,
integer, intent(inout)  idirmin,
integer, intent(in)  idirmin0,
integer, intent(in)  ndir0 
)

Calculate idim transverse components of curl of a vector qvec within ixL Options to employ standard second order CD evaluations use Gauss theorem for non-Cartesian grids use Stokes theorem for non-Cartesian grids.

Definition at line 1131 of file mod_geometry.t.

◆ divvector()

subroutine mod_geometry::divvector ( double precision, dimension(ixi^s,1:ndir), intent(in)  qvec,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s), intent(inout)  divq,
logical, intent(in), optional  fourthorder,
logical, intent(in), optional  sixthorder 
)

Calculate divergence of a vector qvec within ixL.

Parameters
[in]fourthorderDefault: false
[in]sixthorderDefault: false

Definition at line 515 of file mod_geometry.t.

◆ divvectors()

subroutine mod_geometry::divvectors ( double precision, dimension(ixi^s,1:ndir), intent(in)  qvec,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
double precision, dimension(ixi^s), intent(inout)  divq 
)

Calculate divergence of a vector qvec within ixL using limited extrapolation to cell edges.

Definition at line 607 of file mod_geometry.t.

Here is the call graph for this function:

◆ get_surface_area()

subroutine mod_geometry::get_surface_area ( type(state s,
integer, intent(in)  ixG,
integer, intent(in)  L 
)

calculate area of surfaces of cells

Definition at line 158 of file mod_geometry.t.

◆ gradient()

subroutine mod_geometry::gradient ( double precision, dimension(ixi^s), intent(in)  q,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
integer, intent(in)  idir,
double precision, dimension(ixi^s), intent(inout)  gradq 
)

Calculate gradient of a scalar q within ixL in direction idir.

Definition at line 320 of file mod_geometry.t.

◆ gradientq()

subroutine mod_geometry::gradientq ( double precision, dimension(ixi^s), intent(in)  q,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
integer, intent(in)  idir,
double precision, dimension(ixi^s), intent(inout)  gradq 
)

Calculate gradient of a scalar q in direction idir at cell interfaces.

Definition at line 415 of file mod_geometry.t.

◆ gradients()

subroutine mod_geometry::gradients ( double precision, dimension(ixi^s), intent(in)  q,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
integer, intent(in)  idir,
double precision, dimension(ixi^s), intent(inout)  gradq 
)

Calculate gradient of a scalar q within ixL in direction idir first use limiter to go from cell center to edge.

Definition at line 457 of file mod_geometry.t.

Here is the call graph for this function:

◆ gradientx()

subroutine mod_geometry::gradientx ( double precision, dimension(ixi^s), intent(in)  q,
double precision, dimension(ixi^s,1:ndim), intent(in)  x,
integer, intent(in)  ixI,
integer, intent(in)  L,
integer, intent(in)  ixO,
  L,
integer, intent(in)  idir,
double precision, dimension(ixi^s), intent(inout)  gradq,
logical, intent(in)  fourth_order 
)

Calculate gradient of a scalar q in direction idir at cell interfaces.

Definition at line 362 of file mod_geometry.t.

◆ putgridgeo()

subroutine mod_geometry::putgridgeo ( integer, intent(in)  igrid)

Deallocate geometry-related variables.

Definition at line 148 of file mod_geometry.t.

◆ set_coordinate_system()

subroutine mod_geometry::set_coordinate_system ( character(len=*), intent(in)  geom)

Set the coordinate system to be used.

Parameters
[in]geomName of the coordinate system

Definition at line 22 of file mod_geometry.t.

Here is the call graph for this function:

◆ set_pole()

subroutine mod_geometry::set_pole

Definition at line 100 of file mod_geometry.t.

Here is the call graph for this function:

Variable Documentation

◆ cartesian

integer, parameter mod_geometry::cartesian = 0

Definition at line 8 of file mod_geometry.t.

◆ cartesian_expansion

integer, parameter mod_geometry::cartesian_expansion = 4

Definition at line 12 of file mod_geometry.t.

◆ cartesian_stretched

integer, parameter mod_geometry::cartesian_stretched = 1

Definition at line 9 of file mod_geometry.t.

◆ central

integer, parameter mod_geometry::central =1

Definition at line 15 of file mod_geometry.t.

◆ coordinate

integer mod_geometry::coordinate =-1

Definition at line 7 of file mod_geometry.t.

◆ cylindrical

integer, parameter mod_geometry::cylindrical = 2

Definition at line 10 of file mod_geometry.t.

◆ gaussbased

integer, parameter mod_geometry::gaussbased =2

Definition at line 16 of file mod_geometry.t.

◆ spherical

integer, parameter mod_geometry::spherical = 3

Definition at line 11 of file mod_geometry.t.

◆ stokesbased

integer, parameter mod_geometry::stokesbased =3

Definition at line 17 of file mod_geometry.t.

◆ type_curl

integer mod_geometry::type_curl =0

Definition at line 14 of file mod_geometry.t.