BSpline Finite Element Exterior Calculus
Loading...
Searching...
No Matches
m_common Module Reference

Common module for the BSpline FEEC package. More...

Data Types

interface  balanced_split
 Generic interface for balanced splitting of integers. More...
 
interface  sort
 Sort an array of integers using the quicksort algorithm. More...
 
interface  user_function_1d_interface
 Interface for user-defined functions. More...
 
interface  user_function_3d_interface
 
interface  user_function_3d_mat_interface
 
interface  user_function_3d_vec_interface
 

Functions/Subroutines

pure real(wp) function, public zero_function (xp, yp, zp)
 A function that always returns zero.
 
pure integer function, public factorial (n)
 Compute the factorial of a non-negative integer n.
 
pure integer function, public levi_civita (i, j, k)
 Compute the Levi-Civita symbol for three indices.
 
character(len=len(in)) function, public uppercase (in)
 Convert a string to uppercase.
 
pure character(len=len(in)) function, public to_lowercase (in)
 Convert a string to lowercase.
 
subroutine, public cumsum (out, in)
 Compute the cumulative sum of an array.
 
pure integer function, public cartesian_to_linear (indices, dims)
 Convert multi-dimensional Cartesian indices to a linear index (0-based)
 
subroutine, public init_random_seed (random_seed_value)
 Initialize the random seed with a fixed value for reproducibility.
 

Variables

integer, parameter, public wp = CMAKE_BSPLINE_FEEC_PRECISION
 Default value which unused if CMake is used.
 
real(wp), parameter, public pi = 3.1415926535897932384626433832795028841971_wp
 The value of pi (3.14159...)
 
integer, parameter, public verbosity_warn_never = 0
 Verbosity levels for warnings and errors.
 
integer, parameter, public verbosity_warn_on_failure = 1
 
integer, parameter, public verbosity_warn_always = 2
 
integer, parameter, public verbosity_error_on_failure = 3
 

Detailed Description

Common module for the BSpline FEEC package.

This module contains common definitions, constants, and interfaces used throughout the package.

Function/Subroutine Documentation

◆ cartesian_to_linear()

pure integer function, public m_common::cartesian_to_linear ( integer, dimension(:), intent(in) indices,
integer, dimension(:), intent(in) dims )

Convert multi-dimensional Cartesian indices to a linear index (0-based)

Parameters
[in]indicesThe array of Cartesian indices
[in]dimsThe dimensions of the multi-dimensional array
Returns
The corresponding linear index

◆ cumsum()

subroutine, public m_common::cumsum ( real(wp), dimension(size(in) + 1), intent(out) out,
real(wp), dimension(:), intent(in) in )

Compute the cumulative sum of an array.

Parameters
[out]outThe output array containing the cumulative sums
[in]inThe input array

◆ factorial()

pure integer function, public m_common::factorial ( integer, intent(in) n)

Compute the factorial of a non-negative integer n.

Parameters
[in]nThe non-negative integer for which to compute the factorial
Returns
The factorial of n

◆ init_random_seed()

subroutine, public m_common::init_random_seed ( integer, intent(in), optional random_seed_value)

Initialize the random seed with a fixed value for reproducibility.

Parameters
[in]random_seed_valueAn optional integer
Note
This functionality is normally available by means of the random_init intrinsic, but NVHPC does not support it on a single image

◆ levi_civita()

pure integer function, public m_common::levi_civita ( integer, intent(in) i,
integer, intent(in) j,
integer, intent(in) k )

Compute the Levi-Civita symbol for three indices.

The Levi-Civita symbol is defined as: +1 if (i, j, k) is an even permutation of (1, 2, 3) -1 if (i, j, k) is an odd permutation of (1, 2, 3)

Parameters
[in]iThe first index
[in]jThe second index
[in]kThe third index
Returns
The value of the Levi-Civita symbol

◆ to_lowercase()

pure character(len=len(in)) function, public m_common::to_lowercase ( character(len=*), intent(in) in)

Convert a string to lowercase.

Parameters
[in]inThe input string to be converted
Returns
The lowercase version of the input string

◆ uppercase()

character(len=len(in)) function, public m_common::uppercase ( character(len=*), intent(in) in)

Convert a string to uppercase.

Parameters
[in]inThe input string to be converted
Returns
The uppercase version of the input string

◆ zero_function()

pure real(wp) function, public m_common::zero_function ( real(wp), intent(in) xp,
real(wp), intent(in) yp,
real(wp), intent(in) zp )

A function that always returns zero.

Parameters
[in]xpThe x-coordinate
[in]ypThe y-coordinate
[in]zpThe z-coordinate
Returns
Always returns 0.0

Variable Documentation

◆ wp

integer, parameter, public m_common::wp = CMAKE_BSPLINE_FEEC_PRECISION

Default value which unused if CMake is used.

The working precision for real-valued numbers