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.

Pre-processor pre-defined names in PPICLF_USER.h.

NAME

Required?

Description

PPICLF_LRS

Yes

The number of equations solved per particle.

PPICLF_LRP

No

The number of additional properties per particle.

PPICLF_LPART

No

The maximum number of particles per rank.

PPICLF_LRP_INT

No

The number of interpolated fields.

PPICLF_LRP_PRO

No

The number of projected fields.

PPICLF_LEE

No

The maximum number of overlap mesh elements per rank.

PPICLF_LEX

No

The number of x coordinates per overlap mesh element.

PPICLF_LEY

No

The number of y coordinates per overlap mesh element.

PPICLF_LEZ

No

The number of z coordinates per overlap mesh element.

PPICLF_LWALL

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.

Pre-processor suggested names in PPICLF_USER.h.

Suggested NAME

Description

PPICLF_J*

Index in solution array.

PPICLF_R_J*

Index in property array.

PPICLF_P_J*

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

\[\dfrac{d \mathbf{Y}}{d t} = \dot{\mathbf{Y}},\]
\[\begin{split}\mathbf{Y} = \begin{bmatrix}X \\ Y \\ V_x \\ V_y \end{bmatrix},\quad \dot{\mathbf{Y}} = \begin{bmatrix} V_x \\ V_y \\ -a V_x \\ -a V_y + b \end{bmatrix}.\end{split}\]

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.

  1. The indices are ordered from 1 to PPICLF_LRS.

  2. 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.

  1. 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.

  1. The indices are ordered from 1 to PPICLF_LRP_PRO.