|
FlexELA
|
Provides functions to setup ELA. More...
#include <mpi.h>Go to the source code of this file.
Functions | |
| void | ELA_Init (const int *N, const int *pad, const int &numELA, MPI_Comm cart_comm) |
| Initialize the ELA library. | |
| void | ELA_DeInit () |
| Cleanup ELA. | |
| void | ELA_InitLabels (const double *vof, const int &num, const int *labels) |
| Initialize the source vector field ([Gaylo2022], Eq. 17) | |
| int | ELA_GetLabel (const int &i, const int &j, const int &k, const int &n) |
Get the first label at (i, j, k) for ELA instance n. | |
| int | ELA_ContainsNaNs () |
| Check if any values are NaN. | |
| void | ELA_CreateCheckpoint (const char *filename) |
| Create a checkpoint file. | |
| void | ELA_LoadCheckpoint (const char *filename) |
| Load a checkpoint. | |
Provides functions to setup ELA.
These calls setup the library and creat the initial vector source fraction feild(s).
| int ELA_ContainsNaNs | ( | ) |
Check if any values are NaN.
ELA_ContainsNaNs(out) where out is the return value | void ELA_CreateCheckpoint | ( | const char * | filename | ) |
Create a checkpoint file.
| filename |
| void ELA_DeInit | ( | ) |
Cleanup ELA.
Dealocates memory reserved by ELA_Init()
| int ELA_GetLabel | ( | const int & | i, |
| const int & | j, | ||
| const int & | k, | ||
| const int & | n | ||
| ) |
Get the first label at (i, j, k) for ELA instance n.
| i | First index |
| j | Second index |
| k | Third index |
| n | The ELA instance |
l ELA_GetLabel(i,j,k,l) where l is the return value | void ELA_Init | ( | const int * | N, |
| const int * | pad, | ||
| const int & | numELA, | ||
| MPI_Comm | cart_comm | ||
| ) |
Initialize the ELA library.
The ELA library assumes all fields passed to it have the size and padding set here. The domain size is defined by the padding in each direction ( \( n_{i-} \), \( n_{i+} \)) and the number of cell in the domain in each direction ( \(N_i\)). Below is a 2D example.
[i][j][k] or [k][j][i]) is set at compile time.| N | The number of cells in each direction, \(\left[N_{i},N_{j},N_{k}\right]\) |
| pad | The number of ghost cells in each direction, \(\left[n_{i-},n_{i+},n_{j-},n_{j+},n_{k-},n_{k+}\right]\) |
| numELA | The number of ELA instances |
| cart_comm | The MPI cartesian communicator (only if built with ELA_USE_MPI=on) |
| void ELA_InitLabels | ( | const double * | vof, |
| const int & | num, | ||
| const int * | labels | ||
| ) |
Initialize the source vector field ([Gaylo2022], Eq. 17)
This function initializes a the source vector feild \( \mathbf{s} \) for ELA instance num. Each element \( s_l \) in the cell \( \Omega_{ijk} \) is given by
\[ (s_l)_{ijk} \gets \begin{cases} 1-f_{ijk} & \text{if} \quad \Omega_{ijk} \in \text{blob } l \\ 0 & \text{otherwise} \end{cases} \]
for \( l \in 0\dots M \). Cells belonging to the blob \( l =0 \) are included. Which blob \( l \) a cell \(\Omega_{ijk}\) is in is determined by the label feild labels, and a cell can only be in one blob. The number of blobs \( M \) is determined based on labels provided.
| vof | The volume fraction \( f \) |
| num | The ELA instance |
| labels | The label feild |
| void ELA_LoadCheckpoint | ( | const char * | filename | ) |