NAG CL Interface
s22cac (mathieu_ang_periodic_real)
1
Purpose
s22cac calculates real-valued periodic angular Mathieu functions ( or ) and/or their first derivatives, where and are solutions to the Mathieu differential equation .
2
Specification
The function may be called by the names: s22cac or nag_specfun_mathieu_ang_periodic_real.
3
Description
s22cac calculates an approximation to and/or , or and/or , where and are respectively the even and odd parity real-valued periodic angular Mathieu functions, for an array of values of , and for integer order value , where for even parity, and for odd parity. The function also returns values of for these periodic Mathieu functions, this is known as the characteristic value or eigenvalue.
The solutions are computed by approximating Mathieu functions as Fourier series, where expansion coefficients are obtained by solving the eigenvalue problem generated from the relevant recurrence relation, see
Chapter 28 in
NIST Digital Library of Mathematical Functions.
4
References
5
Arguments
-
1:
– Integer
Input
-
On entry: , the order number of the Mathieu function to be computed.
Constraints:
- if (even Mathieu function), ;
- if (odd Mathieu function), .
-
2:
– double
Input
-
On entry: , the Mathieu function parameter.
-
3:
– Integer
Input
-
On entry: specifies whether to compute even or odd Mathieu function.
- Compute even Mathieu function, .
- Compute odd Mathieu function, .
Constraint:
or .
-
4:
– Integer
Input
-
On entry: specifies whether the Mathieu function or its derivative is required.
- Compute Mathieu function values.
- Compute derivative values of Mathieu function.
- Compute both Mathieu function and derivative values.
- Compute neither Mathieu functions nor derivative values, returns only a (the characteristic value).
Constraint:
, , or .
-
5:
– Integer
Input
-
On entry: , the number of values to compute.
Constraint:
.
-
6:
– const double
Input
-
On entry: the values of at which to compute Mathieu function or derivative values.
-
7:
– double
Output
-
On exit: if
or
, the Mathieu function values
or
. If
or
,
f is not used.
-
8:
– double
Output
-
On exit: if
or
, the Mathieu function derivative values
or
. If
or
,
f_deriv is not used.
-
9:
– double *
Output
-
On exit: , the characteristic value for the Mathieu function.
-
10:
– NagError *
Input/Output
-
The
NAG error argument (see
Section 7 in the Introduction to the
NAG Library CL Interface).
6
Error Indicators and Warnings
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
See
Section 3.1.2 in the Introduction to the
NAG Library CL Interface for further information.
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_INT
-
On entry, .
Constraint: , , or .
On entry, .
Constraint: .
On entry, .
Constraint: or .
- NE_INT_2
-
On entry, and .
Constraint: if , or if , .
- NE_INTERNAL_ERROR
-
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
See
Section 7.5 in the Introduction to the
NAG Library CL Interface for further information.
- NE_NO_LICENCE
-
Your licence key may have expired or may not have been installed correctly.
See
Section 8 in the Introduction to the
NAG Library CL Interface for further information.
7
Accuracy
Not applicable.
8
Parallelism and Performance
Background information to multithreading can be found in the
Multithreading documentation.
s22cac is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
s22cac makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
10
Example
This example calculates the first four even and odd function and derivative values at for .
10.1
Program Text
10.2
Program Data
10.3
Program Results