FLASH-X
Doxygen Generated Documentation From Interface Source Code
Functions/Subroutines
RuntimeParameters_mapStrToInt.F90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine RuntimeParameters_mapStrToInt (inputString, constKey)
 

Function/Subroutine Documentation

◆ RuntimeParameters_mapStrToInt()

subroutine RuntimeParameters_mapStrToInt ( character(len=MAX_STRING_LENGTH)  inputString,
integer  constKey 
)

Convert a string parameter into the corresponding integer constant. The strings are defined in Config files and provided by the flash.par file. The integer constants are defined in the header file constants.h

This routine is often used when mapping boundary conditions or geometry type from a string given in the flash.par to a constant key which is used by the rest of the code.

inputString - input character string constKey - output integer key corresponding to inputString

EXAMPLE

! Determine the geometry requested by the flash.par call RuntimeParameters_get("geometry",pt_str_geometry) call RuntimeParameters_mapStrToInt(pt_str_geometry, pt_geometry)

if (pt_geometry == CARTESIAN) then .... code for rectangular domain else .... code for non-rectangular endif

Definition at line 45 of file RuntimeParameters_mapStrToInt.F90.