DAMASK with grid solvers  Revision: v2.0.3-2204-gdb1f2151
The Düsseldorf Advanced Material Simulation Kit with Grid Solvers
prec Module Reference

setting precision for real and int type More...

Data Types

type  group_float
 variable length datatype used for storage of state More...
 
type  group_int
 
type  thomogmapping
 
type  tplasticstate
 
type  tsourcestate
 
type  tstate
 

Functions/Subroutines

subroutine prec_init
 reporting precision More...
 
logical elemental pure function deq (a, b, tol)
 equality comparison for float with double precision More...
 
logical elemental pure function dneq (a, b, tol)
 inequality comparison for float with double precision More...
 
logical elemental pure function deq0 (a, tol)
 equality to 0 comparison for float with double precision More...
 
logical elemental pure function dneq0 (a, tol)
 inequality to 0 comparison for float with double precision More...
 
logical elemental pure function ceq (a, b, tol)
 equality comparison for complex with double precision More...
 
logical elemental pure function cneq (a, b, tol)
 inequality comparison for complex with double precision More...
 
subroutine, private unittest
 check correctness of some prec functions More...
 

Variables

integer, parameter preal = IEEE_selected_real_kind(15, 307)
 number with 15 significant digits, up to 1e+-307 (typically 64 bit) More...
 
integer, parameter pint = selected_int_kind(9)
 number with at least up to +-1e9 (typically 32 bit) More...
 
integer, parameter plongint = selected_int_kind(18)
 number with at least up to +-1e18 (typically 64 bit) More...
 
integer, parameter pstringlen = 256
 default string length More...
 
integer, parameter ppathlen = 4096
 maximum length of a path name on linux More...
 
real(preal), parameter tol_math_check = 1.0e-8_pReal
 tolerance for internal math self-checks (rotation) More...
 
real(preal), parameter, private preal_epsilon = epsilon(0.0_pReal)
 minimum positive number such that 1.0 + EPSILON /= 1.0. More...
 
real(preal), parameter, private preal_min = tiny(0.0_pReal)
 smallest normalized floating point number More...
 
integer, dimension(0), parameter emptyintarray = [integer::]
 
real(preal), dimension(0), parameter emptyrealarray = [real(pReal)::]
 
character(len=pstringlen), dimension(0), parameter emptystringarray = [character(len=pStringLen)::]
 

Detailed Description

setting precision for real and int type

Author
Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
Christoph Kords, Max-Planck-Institut für Eisenforschung GmbH
Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
Luv Sharma, Max-Planck-Institut für Eisenforschung GmbH

Function/Subroutine Documentation

◆ ceq()

logical elemental pure function prec::ceq ( complex(preal), intent(in)  a,
complex(preal), intent(in)  b,
real(preal), intent(in), optional  tol 
)

equality comparison for complex with double precision

Definition at line 210 of file prec.f90.

References preal_epsilon.

Referenced by cneq(), and rotations::om2ax().

+ Here is the caller graph for this function:

◆ cneq()

logical elemental pure function prec::cneq ( complex(preal), intent(in)  a,
complex(preal), intent(in)  b,
real(preal), intent(in), optional  tol 
)

inequality comparison for complex with double precision

Definition at line 234 of file prec.f90.

References ceq().

+ Here is the call graph for this function:

◆ deq()

logical elemental pure function prec::deq ( real(preal), intent(in)  a,
real(preal), intent(in)  b,
real(preal), intent(in), optional  tol 
)

equality comparison for float with double precision

Definition at line 123 of file prec.f90.

References preal_epsilon.

Referenced by dneq(), rotations::eu2ax(), and unittest().

+ Here is the caller graph for this function:

◆ deq0()

logical elemental pure function prec::deq0 ( real(preal), intent(in)  a,
real(preal), intent(in), optional  tol 
)

equality to 0 comparison for float with double precision

Definition at line 166 of file prec.f90.

References preal_min.

Referenced by rotations::ax2qu(), rotations::ax2ro(), lattice::buildtransformationsystem(), dneq0(), rotations::eu2ax(), rotations::eu2om(), rotations::eu2ro(), rotations::ho2ax(), lambert::lambert_balltocube(), lambert::lambert_cubetoball(), rotations::om2ax(), rotations::qu2ax(), rotations::qu2eu(), rotations::qu2ho(), rotations::ro2ax(), rotations::ro2ho(), rotations::rotvector(), and unittest().

+ Here is the caller graph for this function:

◆ dneq()

logical elemental pure function prec::dneq ( real(preal), intent(in)  a,
real(preal), intent(in)  b,
real(preal), intent(in), optional  tol 
)

inequality comparison for float with double precision

Definition at line 146 of file prec.f90.

References deq().

Referenced by damask_spectral(), rotations::fromaxisangle(), rotations::frommatrix(), rotations::fromquaternion(), material::material_parsemicrostructure(), unittest(), rotations::unittest(), lattice::unittest(), and spectral_utilities::utilities_maskedcompliance().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dneq0()

logical elemental pure function prec::dneq0 ( real(preal), intent(in)  a,
real(preal), intent(in), optional  tol 
)

inequality to 0 comparison for float with double precision

Definition at line 189 of file prec.f90.

References deq0().

Referenced by rotations::om2ax(), rotations::qu2ax(), and rotations::unittest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prec_init()

subroutine prec::prec_init

reporting precision

Definition at line 101 of file prec.f90.

References unittest().

Referenced by cpfem2::cpfem_initall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unittest()

subroutine, private prec::unittest
private

check correctness of some prec functions

Definition at line 251 of file prec.f90.

References deq(), deq0(), dneq(), preal_epsilon, preal_min, and quit().

Referenced by prec_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ emptyintarray

integer, dimension(0), parameter prec::emptyintarray = [integer::]

◆ emptyrealarray

real(preal), dimension(0), parameter prec::emptyrealarray = [real(pReal)::]

Definition at line 86 of file prec.f90.

◆ emptystringarray

◆ pint

integer, parameter prec::pint = selected_int_kind(9)

number with at least up to +-1e9 (typically 32 bit)

Definition at line 24 of file prec.f90.

◆ plongint

integer, parameter prec::plongint = selected_int_kind(18)

number with at least up to +-1e18 (typically 64 bit)

Definition at line 26 of file prec.f90.

◆ ppathlen

integer, parameter prec::ppathlen = 4096

maximum length of a path name on linux

Definition at line 28 of file prec.f90.

◆ preal

◆ preal_epsilon

real(preal), parameter, private prec::preal_epsilon = epsilon(0.0_pReal)
private

minimum positive number such that 1.0 + EPSILON /= 1.0.

Definition at line 81 of file prec.f90.

Referenced by ceq(), deq(), and unittest().

◆ preal_min

real(preal), parameter, private prec::preal_min = tiny(0.0_pReal)
private

smallest normalized floating point number

Definition at line 82 of file prec.f90.

Referenced by deq0(), and unittest().

◆ pstringlen

integer, parameter prec::pstringlen = 256

default string length

Definition at line 27 of file prec.f90.

Referenced by io::io_read_ascii(), and read_materialconfig().

◆ tol_math_check

real(preal), parameter prec::tol_math_check = 1.0e-8_pReal