FEOutput< dim, VectorType > Class Template Reference#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
A class to output finite element data to disk as .vtu files and .pvd time series. More...
#include <fe_output.hh>
Classes | |
| struct | SerialMirrorDoFs |
| Serial mirror of the solution DoFHandler, plus the map from its dof numbering to ours. More... | |
Public Member Functions | |
| FEOutput (std::string top_folder, std::string output_name, std::string output_folder, const Config::OutputSettings &settings, bool active=true) | |
| Construct a new FEOutput object. | |
| FEOutput (std::string top_folder, std::string output_name, std::string output_folder, const ConfigTree &config, bool active=true) | |
| FEOutput () | |
| ~FEOutput () noexcept | |
| void | drain () |
| void | finish () |
| void | set_hdf5_output (HDF5Output *output, bool session_closes_file=false, std::string group_name="FE") |
| Route the finite-element frame data into an HDF5 file owned by someone else. | |
| bool | will_discard () const |
| std::size_t | pending_workers () const |
| void | attach (const DoFHandler< dim > &dof_handler, const VectorType &solution, const std::string &name) |
| Attach a solution to the output. | |
| void | attach (const DoFHandler< dim > &dof_handler, const VectorType &solution, const std::vector< std::string > &names) |
| Attach a solution to the output. | |
| void | flush (double time) |
| Flush all attached solutions to disk. | |
| FrameTimings | take_frame_timings () |
Private Types | |
| using | OutputVectorType |
| What the DataOut actually gets handed. | |
Private Member Functions | |
| const DoFHandler< safe_dim > & | prepare_output_vector (const DoFHandler< dim > &dof_handler, const VectorType &solution, OutputVectorType &target) |
| void | update_buffers () |
| void | retire_oldest () |
| void | reserve_bytes (std::size_t bytes) |
Private Attributes | |
| const std::string | top_folder |
| const std::string | output_name |
| const std::string | output_folder |
| const std::string | filename_pvd |
| const uint | buffer_size |
| const std::size_t | max_pending_bytes |
| uint | series_number |
| uint | subdivisions |
| std::vector< std::pair< double, std::string > > | time_series |
| std::vector< DataOut< safe_dim > > | data_outs |
| std::list< std::thread > | output_threads |
| std::list< uint > | output_thread_series |
| std::list< std::list< std::unique_ptr< OutputVectorType > > > | attached_solutions |
| std::list< std::size_t > | attached_bytes |
| std::size_t | pending_bytes = 0 |
| std::mutex | output_mutex |
| std::condition_variable | output_condition |
| uint | next_published_series = 0 |
| bool | publication_failed = false |
| std::mutex | exception_mutex |
| std::exception_ptr | stored_exception |
| bool | finished = false |
| SerialMirrorDoFs | mirror_dofs |
| HDF5Output * | hdf5_output = nullptr |
| bool | hdf5_closed_by_session = false |
| std::string | hdf5_group_name = "FE" |
| bool | save_vtk |
| FrameTimings | frame_timings |
Static Private Attributes | |
| static constexpr uint | safe_dim = dim == 0 ? 1 : dim |
Detailed Description
class DiFfRG::FEOutput< dim, VectorType >
A class to output finite element data to disk as .vtu files and .pvd time series.
- Template Parameters
-
dim Dimension of the problem VectorType Type of the vector
Member Typedef Documentation
◆ OutputVectorType
|
private |
What the DataOut actually gets handed.
Never a distributed vector. DataOut::add_data_vector() routes every vector type through internal::DataOutImplementation::CreateVectors::create_dof_vector(), which builds a ghosted LinearAlgebra::distributed::BlockVector on dof_handler.get_mpi_communicator() and calls update_ghost_values() – two collectives, in a code path OutputSession runs on rank 0 alone. Under the replicated-mesh policy rank 0 already holds every dof, so it copies the replica into a plain serial vector and attaches that to a serial mirror DoFHandler instead. Nothing communicates and the whole domain still gets written.
Constructor & Destructor Documentation
◆ FEOutput() [1/3]
| DiFfRG::FEOutput< dim, VectorType >::FEOutput | ( | std::string | top_folder, |
| std::string | output_name, | ||
| std::string | output_folder, | ||
| const Config::OutputSettings & | settings, | ||
| bool | active = true ) |
Construct a new FEOutput object.
- Parameters
-
dof_handler DoFHandler associated with the solution top_folder Folder where the output will be written, i.e. the folder containing the .pvd file. output_name Name of the output, i.e. the name of the .pvd file. output_folder Folder where the .vtu files will be saved. Should be relative to top_folder. subdivisions Number of subdivisions of the cells in the .vtu files.
◆ FEOutput() [2/3]
|
inline |
◆ FEOutput() [3/3]
| DiFfRG::FEOutput< dim, VectorType >::FEOutput | ( | ) |
◆ ~FEOutput()
|
noexcept |
Member Function Documentation
◆ attach() [1/2]
| void DiFfRG::FEOutput< dim, VectorType >::attach | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | solution, | ||
| const std::string & | name ) |
Attach a solution to the output.
- Parameters
-
dof_handler The DoFHandler associated with the solution. solution The solution to attach. name The name of the solution.
◆ attach() [2/2]
| void DiFfRG::FEOutput< dim, VectorType >::attach | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | solution, | ||
| const std::vector< std::string > & | names ) |
Attach a solution to the output.
- Parameters
-
dof_handler The DoFHandler associated with the solution. solution The solution to attach. names The names of each component of the solution.
◆ drain()
| void DiFfRG::FEOutput< dim, VectorType >::drain | ( | ) |
Join pending writers and surface the first worker error without closing the output.
◆ finish()
| void DiFfRG::FEOutput< dim, VectorType >::finish | ( | ) |
Drain pending writers, release terminal resources, and close the output.
◆ flush()
| void DiFfRG::FEOutput< dim, VectorType >::flush | ( | double | time | ) |
Flush all attached solutions to disk.
- Parameters
-
time The time tag to attach to the solution.
◆ pending_workers()
|
inline |
Number of writer threads that have not been joined yet.
◆ prepare_output_vector()
|
private |
The DoFHandler to hand DataOut, and the values permuted into its numbering.
◆ reserve_bytes()
|
private |
◆ retire_oldest()
|
private |
◆ set_hdf5_output()
| void DiFfRG::FEOutput< dim, VectorType >::set_hdf5_output | ( | HDF5Output * | output, |
| bool | session_closes_file = false, | ||
| std::string | group_name = "FE" ) |
Route the finite-element frame data into an HDF5 file owned by someone else.
- Parameters
-
session_closes_file When true, flush() leaves the file open and relies on the owner to close it once per frame – which is what OutputSession does, since it flushes its HDF5Output sinks after this one. Standalone users, who may never call HDF5Output::flush() at all, keep the default and get a close per frame. group_name Top-level HDF5 group that owns this field series.
◆ take_frame_timings()
|
inline |
Timing buckets accumulated since the last call, and reset by it.
◆ update_buffers()
|
private |
◆ will_discard()
|
inline |
True when flush() would throw everything attached to it away.
Member Data Documentation
◆ attached_bytes
|
private |
◆ attached_solutions
|
private |
◆ buffer_size
|
private |
◆ data_outs
|
private |
◆ exception_mutex
|
private |
◆ filename_pvd
|
private |
◆ finished
|
private |
◆ frame_timings
|
private |
◆ hdf5_closed_by_session
|
private |
◆ hdf5_group_name
|
private |
◆ hdf5_output
|
private |
◆ max_pending_bytes
|
private |
◆ mirror_dofs
|
private |
◆ next_published_series
|
private |
◆ output_condition
|
private |
◆ output_folder
|
private |
◆ output_mutex
|
private |
◆ output_name
|
private |
◆ output_thread_series
|
private |
◆ output_threads
|
private |
◆ pending_bytes
|
private |
◆ publication_failed
|
private |
◆ safe_dim
|
staticconstexprprivate |
◆ save_vtk
|
private |
◆ series_number
|
private |
◆ stored_exception
|
private |
◆ subdivisions
|
private |
◆ time_series
|
private |
◆ top_folder
|
private |
The documentation for this class was generated from the following file:
- /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/data/fe_output.hh
Generated by