![]() |
ASPECT
|
Static Public Member Functions | |
static void | declare_parameters (ParameterHandler &prm) |
![]() | |
static void | declare_parameters (ParameterHandler &prm) |
![]() | |
static void | get_composition_values_at_q_point (const std::vector< std::vector< double >> &composition_values, const unsigned int q, std::vector< double > &composition_values_at_q_point) |
Private Member Functions | |
void | set_last_output_time (const double current_time) |
void | write_master_files (const internal::ParticleOutput< dim > &data_out, const std::string &solution_file_prefix, const std::vector< std::string > &filenames) |
Static Private Member Functions | |
static void | writer (const std::string filename, const std::string temporary_filename, const std::string *file_contents) |
Private Attributes | |
double | output_interval |
double | last_output_time |
unsigned int | output_file_number |
std::vector< std::string > | output_formats |
std::vector< std::pair< double, std::string > > | times_and_pvtu_file_names |
std::vector< std::pair< double, std::vector< std::string > > > | times_and_vtu_file_names |
std::vector< std::vector< std::string > > | output_file_names_by_timestep |
std::vector< XDMFEntry > | xdmf_entries |
unsigned int | group_files |
std::string | temporary_output_location |
bool | write_in_background_thread |
std::thread | background_thread |
std::vector< std::string > | exclude_output_properties |
A Postprocessor that creates particles, which follow the velocity field of the simulation. The particles can be generated and propagated in various ways and they can carry a number of constant or time-varying properties. The postprocessor can write output positions and properties of all particles at chosen intervals, although this is not mandatory. It also allows other parts of the code to query the particles for information.
Definition at line 120 of file particles.h.
aspect::Postprocess::Particles< dim >::Particles | ( | ) |
Constructor.
|
override |
Destructor.
|
overridevirtual |
Execute this postprocessor. Derived classes will implement this function to do whatever they want to do to evaluate the solution at the current time step.
[in,out] | statistics | An object that contains statistics that are collected throughout the simulation and that will be written to an output file at the end of each time step. Postprocessors may deposit data in these tables for later visualization or further processing. |
Implements aspect::Postprocess::Interface< dim >.
|
overridevirtual |
Save the state of this object.
Reimplemented from aspect::Postprocess::Interface< dim >.
|
overridevirtual |
Restore the state of the object.
Reimplemented from aspect::Postprocess::Interface< dim >.
void aspect::Postprocess::Particles< dim >::serialize | ( | Archive & | ar, |
const unsigned int | version | ||
) |
Serialize the contents of this class as far as they are not read from input parameter files.
|
static |
Declare the parameters this class takes through input files.
|
overridevirtual |
Read the parameters this class declares from the parameter file.
Reimplemented from aspect::Postprocess::Interface< dim >.
|
private |
Set the time output was supposed to be written. In the simplest case, this is the previous last output time plus the interval, but in general we'd like to ensure that it is the largest supposed output time, which is smaller than the current time, to avoid falling behind with last_output_time and having to catch up once the time step becomes larger. This is done after every output.
|
staticprivate |
A function that writes the text in the second argument to a file with the name given in the first argument. The function is run on a separate thread to allow computations to continue even though writing data is still continuing. The function takes over ownership of these arguments and deletes them at the end of its work.
|
private |
Write the various master record files. The master files are used by visualization programs to identify which of the output files in a directory, possibly one file written by each processor, belong to a single time step and/or form the different time steps of a simulation. For Paraview, this is a .pvtu
file per time step and a .pvd
for all time steps. For VisIt it is a .visit
file per time step and one for all time steps.
data_out | The DataOut object that was used to write the solutions. |
solution_file_prefix | The stem of the filename to be written. |
filenames | List of filenames for the current output from all processors. |
|
private |
Interval between output (in years if appropriate simulation parameter is set, otherwise seconds)
Definition at line 187 of file particles.h.
|
private |
Records time for next output to occur
Definition at line 192 of file particles.h.
|
private |
Consecutively counted number indicating the how-manyth time we will create output the next time we get to it.
Definition at line 208 of file particles.h.
|
private |
Graphical output format.
Definition at line 213 of file particles.h.
|
private |
A list of pairs (time, pvtu_filename) that have so far been written and that we will pass to DataOutInterface::write_pvd_record to create a master file that can make the association between simulation time and corresponding file name (this is done because there is no way to store the simulation time inside the .pvtu or .vtu files).
Definition at line 223 of file particles.h.
|
private |
A corresponding variable that we use for the .visit files created by DataOutInterface::write_visit_record. The second part of a pair contains all files that together form a time step.
Definition at line 230 of file particles.h.
|
private |
A list of list of filenames, sorted by timestep, that correspond to what has been created as output. This is used to create a master .visit file for the entire simulation.
Definition at line 237 of file particles.h.
|
private |
A set of data related to XDMF file sections describing the HDF5 heavy data files created. These contain things such as the dimensions and names of data written at all steps during the simulation.
Definition at line 245 of file particles.h.
|
private |
VTU file output supports grouping files from several CPUs into one file using MPI I/O when writing on a parallel filesystem. 0 means no grouping (and no parallel I/O). 1 will generate one big file containing the whole solution.
Definition at line 253 of file particles.h.
|
private |
On large clusters it can be advantageous to first write the output to a temporary file on a local file system and later move this file to a network file system. If this variable is set to a non-empty string it will be interpreted as a temporary storage location.
Definition at line 262 of file particles.h.
|
private |
File operations can potentially take a long time, blocking the progress of the rest of the model run. Setting this variable to 'true' moves this process into a background thread, while the rest of the model continues.
Definition at line 270 of file particles.h.
|
private |
Handle to a thread that is used to write data in the background. The writer() function runs on this background thread.
Definition at line 276 of file particles.h.
|
private |
Stores the particle property fields which are excluded from output to the visualization file.
Definition at line 282 of file particles.h.