My Project
programmer's documentation
|
Writers may be defined in the cs_user_postprocess_writers function.
The following local variable definitions can shared beween several examples:
In the following example, the default writer is redefined, so as to modify some parameters which have been set by default or by the GUI:
Polygons and polyhedra may also be divided into simpler elements, as in the example below (only for polyhedra here), using MED format output:
In the next example, the defined writer discards polyhedra, and allows for transient mesh connectivity (i.e. meshes changing with time); text output is also forced:
Default plot and probe writers, CS_POST_WRITER_PROBES and CS_POST_WRITER_PROFILES are defined by default. Redefining them here allows modifying some of their parameters.
In the following example, an additional plot writer is defined. Such a writer may be used to output probe, profile, or other point data (probes may be output to 3D formats, but plot and time plot outputs drop cell or face-based ouptut).
In the next example, the default profile output writer is redefined so as to modify its defaults, including the output format (.dat instead of the default CSV).
Due to buffering, plots may not be updated at every time step, and frequency of that update depends both on the volume of data produced and the machine. Forcing updates at each time step while not required may degrade performance, so it is not done by default.
Flushing parameters for time plots may be defined here. By default, for best performance, time plot files are kept open, and flushing is not forced. This behavior may be modified, as in the following example. The default settings should be changed before time plots are defined.
In this last example, a histogram writer is defined. The format can be changed, as well as the number of subdivisions in the format options. Here the format is tex (resulting tex file can be input in any tex document with package tikz and pgfplots), and the number of subdivisions is 10.