Interdependent Parameters
This documentation was written for releases up to 2018 and is being revised. Some dialogs have changed since. If something does not match what you see, write to mc@mcgrating.com.
Interdependent Parameters (IDP)
This menu contains three Littrow IDP samples and New IDP item. These four items add to the end of the project structure the IDP part. The user can edit on your needs this part of project structure according to the rules written in the remarks of this part. By default, the dependent parameters are added to the scan output. In order to suppress the output of the dependent parameter, you need to insert the $ symbol at the beginning of the line with its definition.
In interpretation of the formulas were used software presented on the website http://muparser.beltoforion.de.
The following conventions are used in this software product in the implementation of advanced features.
The name character set
“0 1 2 3 4 5 6 7 8 9 _”
“a b c d e f g h i j k l m n o p q r s t u v w x y z”
“A B C D E F G H I J K L M N O P Q R S T U V W X Y Z”
is used for:
function identifiers
variable identifiers
constant identifiers
The following table gives an overview of the functions supported. It lists the function names, the number of arguments and a brief description.
| Name |
Argc. |
Explanation |
| sin |
1 |
sine function |
| cos |
1 |
cosine function |
| tan |
1 |
tangent function |
| asin |
1 |
arc sine function |
| acos |
1 |
arc cosine function |
| atan |
1 |
arc tangent function |
| sinh |
1 |
hyperbolic sine function |
| cosh |
1 |
hyperbolic cosine |
| tanh |
1 |
hyperbolic tangent function |
| asinh |
1 |
hyperbolic arc sine function |
| acosh |
1 |
hyperbolic arc tangent function |
| atanh |
1 |
hyperbolic arc tangent function |
| log2 |
1 |
logarithm to the base 2 |
| log10 |
1 |
logarithm to the base 10 |
| log |
1 |
logarithm to the base 10 |
| ln |
1 |
logarithm to base e (2.71828...) |
| exp |
1 |
e raised to the power of x |
| sqrt |
1 |
square root of a value |
| sign |
1 |
sign function -1 if x<0; 1 if x>0 |
| rint |
1 |
round to nearest integer |
| abs |
1 |
absolute value |
| min |
var. |
min of all arguments |
| max |
var. |
max of all arguments |
| sum |
var. |
sum of all arguments |
| avg |
var. |
mean value of all arguments |
The following table lists the default binary supported operators.
| Operator |
Description |
Priority |
| = |
assignment |
-1 |
| && |
logical and |
1 |
| || |
logical or |
2 |
| <= |
less or equal |
4 |
| >= |
greater or equal |
4 |
| != |
not equal |
4 |
| == |
equal |
4 |
| > |
greater than |
4 |
| < |
less than |
4 |
| + |
addition |
5 |
| - |
subtraction |
5 |
| * |
multiplication |
6 |
| / |
division |
6 |
| ^ |
raise x to the power of y |
7 |
There is built in support for the if then else operator. It uses lazy evaluation in order to make sure only the necessary branch of the expression is evaluated.
| Operator |
Description |
Remarks |
| ? : |
if then else operator a = (b<c) ? d : e |
C++ style syntax |
In addition MC Grating software includes some built-in edit checks, but nevertheless the user is solely responsible for the physical meaning of the dependent parameters in the range of arguments.
From the in-application help of Modal Collinear and Modal Conical, documented through 2018. If you publish results computed with MC Grating, see how to cite it.