parameters Class Reference

#include <parameters.h>

Inherits setcomm.

Inherited by global_data_all_processes.

Public Member Functions

 parameters ()
 parameters (MPI_Comm comm)
int read_parameter_file (const char *fname)
 This function parses the parameter file. More...
void add_param (const char *name, void *buf, int type, int flag)
void write_used_parameters (const char *dirname, const char *fname)
- Public Member Functions inherited from setcomm
 setcomm (MPI_Comm Comm)
 setcomm (const char *str)
void initcomm (MPI_Comm Comm)
void mpi_printf (const char *fmt,...)
void determine_compute_nodes (void)

Public Attributes

int NParameters = 0
void * ParametersValue [MAX_PARAMETERS]
char ParametersType [MAX_PARAMETERS]
char ParametersChangeable [MAX_PARAMETERS]
int ParameterSequence [MAX_PARAMETERS]
- Public Attributes inherited from setcomm
MPI_Comm Communicator
int NTask
int ThisTask
int PTask
int ThisNode
int NumNodes = 0
int TasksInThisNode
int RankInThisNode
int MinTasksPerNode
int MaxTasksPerNode
long long MemoryOnNode
long long SharedMemoryOnNode

Detailed Description

Definition at line 29 of file parameters.h.

Constructor & Destructor Documentation

◆ parameters() [1/2]

parameters ( )

Definition at line 33 of file parameters.h.

◆ parameters() [2/2]

parameters ( MPI_Comm  comm)

Definition at line 34 of file parameters.h.

Member Function Documentation

◆ add_param()

void add_param ( const char *  name,
void *  buf,
int  type,
int  flag 

Definition at line 30 of file

◆ read_parameter_file()

int read_parameter_file ( const char *  fname)

This function parses the parameter file.

Each parameter is defined by a keyword (‘tag’), and can be either of type douple, int, or character string. Three arrays containing the name, type and address of the parameter are filled first. The routine then parses the parameter file and fills the referenced variables. The routine makes sure that each parameter appears exactly once in the parameter file, otherwise error messages are produced that complain about the missing parameters. Basic checks are performed on the supplied parameters in the end.

fnameThe file name of the parameter file

Definition at line 57 of file

◆ write_used_parameters()

void write_used_parameters ( const char *  dirname,
const char *  fname 

Definition at line 195 of file

Member Data Documentation

◆ NParameters

int NParameters = 0

Definition at line 42 of file parameters.h.

◆ ParametersChangeable

char ParametersChangeable[MAX_PARAMETERS]

Definition at line 47 of file parameters.h.

◆ ParameterSequence

int ParameterSequence[MAX_PARAMETERS]

Definition at line 48 of file parameters.h.

◆ ParametersTag


Definition at line 44 of file parameters.h.

◆ ParametersType

char ParametersType[MAX_PARAMETERS]

Definition at line 46 of file parameters.h.

◆ ParametersValue

void* ParametersValue[MAX_PARAMETERS]

Definition at line 45 of file parameters.h.

The documentation for this class was generated from the following files: