The H-File¶
The H-File refers to the file PPICLF_USER.h. This file is required for each case and specifies the maximum size of different arrays used in the code. These sizes are defined by C pre-processor directives, which use the #define NAME N
syntax, where NAME
is the variable name in capital letters and N
is the integer number that NAME
is replaced by everywhere in the code at compilation.
The pre-processor directives, along with the actual arrays and other ppiclF variables can be included for use in any Fortran subroutine by simply including the following directive at the top of a routine
#include "PPICLF.h"
Pre-Defined Directives¶
A list of pre-defined names are found in the table below with their descriptions.
|
Required? |
Description |
---|---|---|
|
Yes |
The number of equations solved per particle. |
|
No |
The number of additional properties per particle. |
|
No |
The maximum number of particles per rank. |
|
No |
The number of interpolated fields. |
|
No |
The number of projected fields. |
|
No |
The maximum number of overlap mesh elements per rank. |
|
No |
The number of x coordinates per overlap mesh element. |
|
No |
The number of y coordinates per overlap mesh element. |
|
No |
The number of z coordinates per overlap mesh element. |
|
No |
The maximum number of triangular patch boundaries. |
User-Only Directives¶
A list of user-only suggested names are found in the table below with their descriptions. Each of these names can be chosen by the user to reflect the equations being solved.
Suggested |
Description |
---|---|
|
Index in solution array. |
|
Index in property array. |
|
Index in projected field array. |
Here, the above suggested names may be used for easy naming with user-edited coded. For example, consider the system of equations
In this case, we can refer to the equations as solving for the variables \(X\), \(Y\), \(V_x\), and \(V_y\). As a result, the user may want to refer to the equations as
#define PPICLF_JX 1
#define PPICLF_JY 2
#define PPICLF_JVX 3
#define PPICLF_JVY 4
Then, the user can use these directive names in place of the index j for the i particle in the solution arrays ppiclf_y(j,i), ppiclf_ydot(j,i), and ppiclf_ydotc(j,i).
Caution: User ordering of solution array indices.
The indices are ordered from 1 to
PPICLF_LRS
.The first two (2D) or three (3D) indicies must always be the \(X\), \(Y\), and \(Z\) (3D only) coordinates of each particle.
Similarly, if \(a\) and \(b\) are properties of each particle that are not being solved for, the user may want to refer to the properties as
#define PPICLF_R_JA 1
#define PPICLF_R_JB 2
Then, the user can use these directive names in place of the index j for the i particle in the property array ppiclf_rprop(j,i).
Caution: User ordering of property array indices.
The indices are ordered from 1 to
PPICLF_LRP
.
Similarly, if the user is projecting any properties, each mapped (see The F-File) projected field can also be referenced in this way. Consider three projected fields \(f(\mathbf{x})\), \(g(\mathbf{x})\), and \(h(\mathbf{x})\). The user may want to refer to these fields as
#define PPICLF_P_JF 1
#define PPICLF_P_JG 2
#define PPICLF_P_JH 3
Then, the user can use these directive names in place of the index m for the (i,j,k) coordinate of the e element on the overlap mesh in the projected field array ppiclf_pro_fld(i,j,k,e,m).
Caution: User ordering of projection array indices.
The indices are ordered from 1 to
PPICLF_LRP_PRO
.