PLUTO  4.4-patch2
Functions
initialize.c File Reference

Initialize PLUTO. More...

#include "pluto.h"

Functions

static int GetDecompMode (cmdLine *cmd_line, int procs[])
 
void Initialize (Data *data, Runtime *runtime, Grid *grid, cmdLine *cmd_line)
 

Detailed Description

Initialize() performs a number of initialization tasks before starting the main computation loop.
More precisely, it completes the following sequence of steps:

The function GetDecompMode() sets the parallel domain decomposition mode which can be equal to

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it) B. Vaidya
Date
Dec 02 2020

Function Documentation

◆ GetDecompMode()

int GetDecompMode ( cmdLine *  cmd_line,
int  procs[] 
)
static

Returns the parallel domain decomposition mode.

Parameters
[in]cmd_linepointer to the cmdLine structure
[out]procsan array of integers giving the number of processors in each direction only if the -dec command line option has been given
Returns
The decomposition mode:
  • AL_AUTO_DECOMP defaults
  • AL_USER_DECOMP if the -dec n1 [n2] [n3] command line argument has been given; In this case only, procs[] contains the number of processors in the three directions;
  • AL_MPI_DECOMP if [todo]
    Todo:
    AL_MPI_DECOMP mode

◆ Initialize()

void Initialize ( Data data,
Runtime runtime,
Grid grid,
cmdLine *  cmd_line 
)

Initialize computational grid, domain decomposition and memory allocation. Also, set initial conditions and output attributes.

Parameters
[in]argcthe number of command-line argument passed to the code
[in]argvthe argument value as a 1D array of char
[in,out]dataa pointer to the main PLUTO data structure
[in,out]runtimea pointer to the Runtime structure
[in]gridpointer to an array of Grid structures
[in]cmd_linepointer to the cmdLine structure
Returns
This function has no return value.