PLUTO  4.4-patch2
Functions
set_output.c File Reference

Set/retrieve output data attributes. More...

#include "pluto.h"

Functions

void SetOutput (Data *d, Runtime *runtime)
 
int SetOutputVar (char *var_name, int output_type, int flag)
 
int GetOutputVarNames (int output_type, char *var_name[NVAR])
 
double *** GetUserVar (char *var_name)
 

Detailed Description

The function SetOutput() sets, for each output data type (DBL, FLT, VTK etc..) the default attributes of the corresponding Output structures. These include the variable name, a pointer to the actual 3D array, the centering of the variable (center/staggered), a conditional inclusion flag (telling if the corresponding variable has to be written in the specified format), and so on.

The function SetOutputVar() can be used to include or exclude a given variable to be written using a particular output format.

The function GetUserVar() returns the memory address to a user-defined 3D array.

Note
Starting with PLUTO 4.1 velocity and magnetic field components will be saved as scalars when writing VTK output. If this is not what you want and prefer to save them as vector fields (VTK VECTOR attribute), set VTK_VECTOR_DUMP to YES in your definitions.h.
Authors
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
June 24, 2019

Function Documentation

◆ GetOutputVarNames()

int GetOutputVarNames ( int  output_type,
char *  var_name[NVAR] 
)

Return the number and the names of the variables being written to disk with a particular output type.

Parameters
[in]output_typeThe output type (e.g. FLT_OUTPUT)
[out]var_namesAn array of strings containing the actual variable names.
Returns
An integer giving the number of variables.

◆ GetUserVar()

double*** GetUserVar ( char *  var_name)

return a pointer to the 3D array associated with the variable named 'var_name'.

◆ SetOutput()

void SetOutput ( Data d,
Runtime runtime 
)

Set default attributes (variable names, pointers to data structures, filename extensions, etc...) of the output structures.

Parameters
[in]dpointer to Data structure
[in]runtimepointer to Runtime structure

◆ SetOutputVar()

int SetOutputVar ( char *  var_name,
int  output_type,
int  flag 
)

Include ('flag == YES') or exclude ('flag == NO') the variable corresponding to 'var_name' in or from the output type 'out_type'. If 'out_type' corresponds to an image (ppm or png), create a correspdonding Image structure.

Parameters
[in]var_namethe name of the variable (e.g. "rho", "vx1",...)
[in]output_typeselect the output type (e.g., DBL_OUTPUT, VTK_OUTPUT, and so forth)
[in]flagan integer values (YES/NO).