![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <postprocessing_probes.h>
Public Member Functions | |
| PostprocessingProbes (std::shared_ptr< SimulationControl > &simulation_control, const Parameters::PostProcessing< dim >::ProbingPoints &probing_points_parameters, const unsigned int output_frequency, const Parameters::Verbosity &verbosity) | |
| template<typename VectorType> | |
| void | postprocess_probes (const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const VectorType &present_solution, const Variable variable, const ConditionalOStream &pcout, std::vector< double > &evaluated_scalar_values) |
| template<typename VectorType> | |
| void | postprocess_probes (const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const VectorType &present_solution, const Variable variable, const ConditionalOStream &pcout, std::vector< Tensor< 1, dim, double > > &evaluated_vector_values) |
| void | write_probing_points_tables () |
| void | reset_current_time_set () |
| std::vector< OutputStructTableHandler > | gather_tables () |
| void | write_checkpoint () |
| void | read_checkpoint () |
Public Attributes | |
| const std::set< Variable > | implemented_scalar_variables |
| const std::set< Variable > | implemented_vector_variables = {Variable::velocity} |
Private Member Functions | |
| void | prepare_probe_tables (const Variable &variable) |
| bool | check_if_table_contains_current_time (const unsigned int &probe_id) |
Private Attributes | |
| std::shared_ptr< SimulationControl > | simulation_control |
| const Parameters::PostProcessing< dim >::ProbingPoints | probing_points_parameters |
| const unsigned int | output_frequency |
| const std::string | output_folder |
| const Parameters::Verbosity | verbosity |
| std::set< unsigned int > | probe_tables_with_current_time |
| std::vector< TableHandler > | probe_tables |
| std::map< Variable, Utilities::MPI::RemotePointEvaluation< dim > > | remote_point_evaluators |
| const unsigned int | table_precision |
Definition at line 15 of file postprocessing_probes.h.
| PostprocessingProbes< dim >::PostprocessingProbes | ( | std::shared_ptr< SimulationControl > & | simulation_control, |
| const Parameters::PostProcessing< dim >::ProbingPoints & | probing_points_parameters, | ||
| const unsigned int | output_frequency, | ||
| const Parameters::Verbosity & | verbosity ) |
Object that evaluates variables (e.g., velocity) at specified points in the domain.
Within every physics postprocessing attribute (either NavierStokesBase::postprocess_fd() or AuxiliaryPhysics::postprocess()) the evaluation can made by calling the postprocess_probes() attribute of this object through the MultiphysicsInterface object. All evaluated values of variables of a same probe are stored within a same table. All tables are grouped in the PostprocessingProbes::probe_tables vector. Within the vector, the tables are ordered in increasing order of probe IDs.
| [in] | simulation_control | SimulationControl object which is used to obtain the current time and current iteration number. |
| [in] | probing_points_parameters | Set of parameters describing the specified probing point and variables of interest. |
| [in] | output_frequency | Output iteration frequency for postprocessing. |
| [in] | verbosity | Verbosity level for console output. |
Definition at line 7 of file postprocessing_probes.cc.
References output_folder, output_frequency, prepare_probe_tables(), probe_tables, probing_points_parameters, remote_point_evaluators, simulation_control, table_precision, and verbosity.
|
inlineprivate |
Checks if the table of a specified probing point (probe_id) already has a row entry for the current time step.
| [in] | probe_id | Identifier of the probing point investigated. |
true if there already is an entry for the current time step.false if there is no row for the current time step. Definition at line 233 of file postprocessing_probes.h.
References probe_tables_with_current_time.
| std::vector< OutputStructTableHandler > PostprocessingProbes< dim >::gather_tables | ( | ) |
Returns a vector of references to TableHandler objects that needs to be serialized/deserialized for the postprocessed probes.
Definition at line 301 of file postprocessing_probes.cc.
References output_folder, probe_tables, and probing_points_parameters.
| void PostprocessingProbes< dim >::postprocess_probes | ( | const Mapping< dim > & | mapping, |
| const DoFHandler< dim > & | dof_handler, | ||
| const VectorType & | present_solution, | ||
| const Variable | variable, | ||
| const ConditionalOStream & | pcout, | ||
| std::vector< double > & | evaluated_scalar_values ) |
Evaluates scalar variables (e.g., pressure) at specified points in the domain using evaluate_values_at_points and fills appropriate probe tables.
| VectorType | Type of vector of the solution vector. |
| [in] | mapping | Mapping of the domain. |
| [in] | dof_handler | DoF handler associated to the solution field. |
| [in] | present_solution | Vector containing the scalar solution field. |
| [in] | variable | Variable of interest. |
| [in] | pcout | Parallel console output stream. |
| [out] | evaluated_scalar_values | Vector of evaluated scalar values. |
Definition at line 45 of file postprocessing_probes.cc.
References announce_string(), check_if_table_contains_current_time(), chemical_potential_cahn_hilliard, evaluate_values_at_points(), get_variable_string(), get_variable_string_with_underscores(), pressure, probe_tables, probing_points_parameters, remote_point_evaluators, simulation_control, Parameters::verbose, and verbosity.
| void PostprocessingProbes< dim >::postprocess_probes | ( | const Mapping< dim > & | mapping, |
| const DoFHandler< dim > & | dof_handler, | ||
| const VectorType & | present_solution, | ||
| const Variable | variable, | ||
| const ConditionalOStream & | pcout, | ||
| std::vector< Tensor< 1, dim, double > > & | evaluated_vector_values ) |
Evaluates vector variables (e.g., velocity) at specified points in the domain using evaluate_values_at_points() and fills appropriate probe tables.
| VectorType | Type of vector of the solution vector. |
| [in] | mapping | Mapping of the domain. |
| [in] | dof_handler | DoF handler associated to the solution field. |
| [in] | present_solution | Vector containing the vector solution field. For distributed meshes, ghost elements must be updated. |
| [in] | variable | Variable of interest. |
| [in] | pcout | Parallel console output stream. |
| [out] | evaluated_vector_values | Vector of evaluated vector values. |
Definition at line 170 of file postprocessing_probes.cc.
References announce_string(), check_if_table_contains_current_time(), evaluate_values_at_points(), get_variable_string(), get_variable_string_with_underscores(), probe_tables, probing_points_parameters, remote_point_evaluators, simulation_control, velocity, Parameters::verbose, and verbosity.
|
inlineprivate |
Prepares probe tables by setting the entry formats and precisions for all probes of the specified variable.
| [in] | variable | Variable of interest. |
Definition at line 183 of file postprocessing_probes.h.
References get_variable_string_with_underscores(), implemented_scalar_variables, implemented_vector_variables, probe_tables, probing_points_parameters, and table_precision.
|
inline |
Deserializes all probe tables.
Definition at line 160 of file postprocessing_probes.h.
References deserialize_tables_vector(), and gather_tables().
|
inline |
Clears the content of the set indicating if the current time has been added to a probe table. This is reset at every postprocessing time step.
Definition at line 129 of file postprocessing_probes.h.
References probe_tables_with_current_time.
|
inline |
Serializes all probe tables.
Definition at line 149 of file postprocessing_probes.h.
References gather_tables(), and serialize_tables_vector().
|
inline |
Writes the probe tables into output .dat file.
Definition at line 104 of file postprocessing_probes.h.
References output_folder, output_frequency, probe_tables, probing_points_parameters, and simulation_control.
| const std::set<Variable> PostprocessingProbes< dim >::implemented_scalar_variables |
Set of valid scalar variables.
Definition at line 168 of file postprocessing_probes.h.
| const std::set<Variable> PostprocessingProbes< dim >::implemented_vector_variables = {Variable::velocity} |
Set of valid vector variables.
Definition at line 172 of file postprocessing_probes.h.
|
private |
Path to the output folder where all .dat are saved.
Definition at line 257 of file postprocessing_probes.h.
|
private |
Postprocessing output frequency.
Definition at line 254 of file postprocessing_probes.h.
|
private |
Tables of probe measures (1 table per probe). The table index in the vector corresponds to the probe ID.
Definition at line 269 of file postprocessing_probes.h.
|
private |
Contains IDs of probe for which the current time has been added to the table to avoid duplication of time entries when a probing point contains multiple variables
Definition at line 265 of file postprocessing_probes.h.
|
private |
Set of parameters describing the specified probing point and variables of interest
Definition at line 251 of file postprocessing_probes.h.
|
private |
Remote point evaluators (1 evaluator per variable).
Definition at line 273 of file postprocessing_probes.h.
|
private |
Simulation control for current time and current iteration number.
Definition at line 246 of file postprocessing_probes.h.
|
private |
Precision of table entries.
Definition at line 276 of file postprocessing_probes.h.
|
private |
Postprocessing verbosity.
Definition at line 260 of file postprocessing_probes.h.