Reports

From AQUAgpusph
Jump to: navigation, search

Introduction

Since version 2.0, AQUAgpusph is designed like a sandbox, such that the reports that will be used to perform the simulation can be selected "on the fly". Anyway, in order to do more accessible the code, some Presets are provided "out of the box", which are defining Variables, Definitions, Tools and Reports to carry out specific actions.

The reports are used to print some global data (Usually Scalar variables), either at the output screen or at an specific output file. They are executed each time step, right after all the tools have finished.

Defining new reports

In order to define new reports an specific section should be opened in the simulation definition XML input files (take a look on the examples to learn more about this):

<Reports>
    <!-- ... -->
</Reports>

The new reports will be defined between the new "Reports" opened section. Each tool is defined as follows:

<Report name="NAME" type="TYPE">

Where NAME and TYPE should be conveniently set. Depending on the selected "type", some other specific attributes will be required.

Name

The name of the report can be arbitrary selected. If the XML file was included providing a prefix, the final name of the report will be the concatenation of the prefix and the provided name.

Type

Several types of reports can be used:

screen

Specified variables will be printed at the output screen.

To set the variables to be printed, the attribute fields="VARS" should be provided, replacing VARS by the variables to be printed. The variables to be printed in the same line should be separated by a comma, ",", while to insert a line break a semicolon, ";", should be used to separate the variables.

Also optional attributes bold="BOLD" and color="COLOR" can be set, such that if they are not provided BOLD will be replaced by false, and COLOR by white. These options are useless if AQUAgpusph was compiled without ncurses support.

file

Specified variables will be printed at an output file.

To set the variables to be printed, the attribute fields="VARS" should be provided, replacing VARS by the variables to be printed, separated by a comma, ",".

Also the attribute path="PATH" should be added to define the path of the output file. PATH can be replace by the absolute or the relative path to be written.

particles

This a some kind of especial report because it is printing properties of a particles set, useful for instance to print sensors values. It is strongly not recommended using this method to print general fluid particles properties.

To set the particles fields to be printed, the attribute fields="VARS" should be provided, replacing VARS by the array variables to be printed, separated by a comma, ",".

Also the attribute path="PATH" should be added to define the path of the output file. PATH can be replace by the absolute or the relative path to be written.

In order to specify the set of particles to be printed, set="SET" attribute should be specified as well, replacing SET by the id of the Particlesparticles set used.

Optionally, the attributes ipf="IPF" and fps="FPS" can be set, replacing IPF by the number of time steps to be ran before writing an output (1 as default value), and FPS by the frames per second of simulation required (0 as default, i.e. disabled). If both printing criteria are set, an output file will be printed each time one of them are met.

performance

This method is printing at screen and output file some performance indicators:

  1. Memory allocated
  2. Elapsed time (per time step)
  3. Percentage of simulation accomplished
  4. Time to finish the whole simulation

The attribute path="PATH" should be set to define the path of the output file. PATH can be replace by the absolute or the relative path to be written.

Also optional attributes bold="BOLD" and color="COLOR" can be set, such that if they are not provided BOLD will be replaced by false, and COLOR by white. These options are useless if AQUAgpusph was compiled without ncurses support.