|
My Project
|
Encapsulating object for thread processing producer's convergence output requests. More...
#include <ExtraConvergenceOutputThread.hpp>
Classes | |
| class | Impl |
Public Types | |
| using | ComponentToPhaseName = std::function< std::string_view(int)> |
| Protocol for converting a phase/component ID into a human readable phase/component name. | |
| using | ConvertToTimeUnits = std::function< double(double)> |
| Protocol for converting an SI elapsed time value into an equivalent time value in the run's output conventions. | |
Public Member Functions | |
| ConvergenceOutputThread (std::string_view outputDir, std::string_view baseName, ComponentToPhaseName getPhaseName, ConvertToTimeUnits convertTime, ConvergenceOutputConfiguration config, ConvergenceReportQueue &queue) | |
| Constructor. | |
| ConvergenceOutputThread (const ConvergenceOutputThread &src)=delete | |
| Deleted copy constructor. | |
| ConvergenceOutputThread (ConvergenceOutputThread &&src) | |
| Move constructor. | |
| ConvergenceOutputThread & | operator= (const ConvergenceOutputThread &src)=delete |
| Deleted assignment operator. | |
| ConvergenceOutputThread & | operator= (ConvergenceOutputThread &&src)=delete |
| Deleted move-assignment operator. | |
| ~ConvergenceOutputThread () | |
| Destructor. | |
| void | writeSynchronous (std::vector< ConvergenceReportQueue::OutputRequest > &&requests) |
| Perform synchronous file output of a sequence of requests. | |
| void | writeASynchronous () |
| Output thread worker function. | |
Encapsulating object for thread processing producer's convergence output requests.
| using Opm::ConvergenceOutputThread::ConvertToTimeUnits = std::function<double(double)> |
Protocol for converting an SI elapsed time value into an equivalent time value in the run's output conventions.
Will typically use
.
|
explicit |
Constructor.
| [in] | outputDir | – Name of run's output directory. Any file output will be written to this directory. |
| [in] | baseName | – Run's base name. Output files will have this name and a type-specific file extension. |
| [in] | getPhaseName | – Callable object for converting component indices into human readable component names. |
| [in] | convertTime | – Callable object for converting SI elapsed time values into equivalent elapsed time values using run's time conventions. |
| [in] | config | – Convergence output configuration options. Determines whether to output additional convergence information and, if so, what information to output. |
| [in] | queue | – Communication channel between producer thread and this output thread. User must form a valid queue prior to creating the output thread object. |
|
default |
Destructor.
Needed for pimpl idiom.
| void Opm::ConvergenceOutputThread::writeASynchronous | ( | ) |
Output thread worker function.
This is the endpoint that users should associate to a
object.
Returns once last pending output request is written (cf.
.)
| void Opm::ConvergenceOutputThread::writeSynchronous | ( | std::vector< ConvergenceReportQueue::OutputRequest > && | requests | ) |
Perform synchronous file output of a sequence of requests.
Mostly for development and debugging purposes.
| [in] | requests | Output request sequence. Thread takes ownership. |