MPI-AMRVAC  2.2
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 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
 

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 621 of file mod_geometry.t.

Here is the call graph for this function:

◆ 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.

Todo:
allow for 4th order CD evaluation here as well

Definition at line 1090 of file mod_geometry.t.

Here is the call graph for this function:

◆ 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 474 of file mod_geometry.t.

Here is the call graph for this function:

◆ 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 566 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 153 of file mod_geometry.t.

Here is the call graph for this function:

◆ 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 315 of file mod_geometry.t.

Here is the call graph for this function:

◆ 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 416 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 359 of file mod_geometry.t.

Here is the call graph for this function:

◆ putgridgeo()

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

Deallocate geometry-related variables.

Definition at line 143 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 17 of file mod_geometry.t.

Here is the call graph for this function:

◆ set_pole()

subroutine mod_geometry::set_pole ( )

Definition at line 95 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 7 of file mod_geometry.t.

◆ cartesian_expansion

integer, parameter mod_geometry::cartesian_expansion = 4

Definition at line 11 of file mod_geometry.t.

◆ cartesian_stretched

integer, parameter mod_geometry::cartesian_stretched = 1

Definition at line 8 of file mod_geometry.t.

◆ coordinate

integer mod_geometry::coordinate =-1

Definition at line 6 of file mod_geometry.t.

◆ cylindrical

integer, parameter mod_geometry::cylindrical = 2

Definition at line 9 of file mod_geometry.t.

◆ spherical

integer, parameter mod_geometry::spherical = 3

Definition at line 10 of file mod_geometry.t.