#include <data_out.h>
Public Member Functions | |
DataOut (const std::string §ion_name="", const std::string &base_name="solution", const std::string &output_format="vtu", const unsigned int &subdivisions=0, const bool &write_higher_order_cells=true, const MPI_Comm &comm=MPI_COMM_WORLD) | |
Construct a new DataOut object. More... | |
void | attach_dof_handler (const DoFHandler< dim, spacedim > &dh, const std::string &suffix="") |
Prepare to output data on the given file. More... | |
template<typename VECTOR > | |
void | add_data_vector (const VECTOR &data_vector, const std::string &desc, const typename DataOut< dim, spacedim >::DataVectorType &type=DataOut< dim, spacedim >::type_automatic) |
Add the given vector to the output file. More... | |
template<typename VECTOR > | |
void | add_data_vector (const VECTOR &data_vector, const DataPostprocessor< spacedim > &postproc) |
Wrapper for the corrisponding function in dealii. More... | |
void | write_data_and_clear (const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim, spacedim >::mapping) |
Actually write the file. More... | |
void | clear_pvd_record () |
Resets the pvd_record. More... | |
![]() | |
ParameterAcceptor (const std::string §ion_name="") | |
unsigned int | get_acceptor_id () const |
virtual | ~ParameterAcceptor () override |
virtual void | declare_parameters (ParameterHandler &prm) |
virtual void | parse_parameters (ParameterHandler &prm) |
std::string | get_section_name () const |
std::vector< std::string > | get_section_path () const |
void | add_parameter (const std::string &entry, ParameterType ¶meter, const std::string &documentation="", ParameterHandler &prm_=prm, const Patterns::PatternBase &pattern=*Patterns::Tools::Convert< ParameterType >::to_pattern()) |
void | enter_subsection (const std::string &subsection) |
void | leave_subsection () |
void | enter_my_subsection (ParameterHandler &prm) |
void | leave_my_subsection (ParameterHandler &prm) |
void | serialize (Archive &ar, const unsigned int version) |
void | subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
void | unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
unsigned int | n_subscriptions () const |
void | list_subscribers (StreamType &stream) const |
void | list_subscribers () const |
void | subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
void | unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
unsigned int | n_subscriptions () const |
void | list_subscribers (StreamType &stream) const |
void | list_subscribers () const |
![]() | |
Subscriptor () | |
Subscriptor (const Subscriptor &) | |
Subscriptor (Subscriptor &&) noexcept | |
virtual | ~Subscriptor () |
Subscriptor & | operator= (const Subscriptor &) |
Subscriptor & | operator= (Subscriptor &&) noexcept |
void | serialize (Archive &ar, const unsigned int version) |
void | subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
void | unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
unsigned int | n_subscriptions () const |
void | list_subscribers (StreamType &stream) const |
void | list_subscribers () const |
void | subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
void | unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
unsigned int | n_subscriptions () const |
void | list_subscribers (StreamType &stream) const |
void | list_subscribers () const |
Private Attributes | |
const std::string | component_names |
Initialization flag. More... | |
const MPI_Comm & | comm |
MPI communicator. More... | |
const unsigned int | n_mpi_processes |
Number of processes. More... | |
const unsigned int | this_mpi_process |
My mpi process. More... | |
std::string | output_format |
Output format. More... | |
unsigned int | subdivisions |
Number of subdivisions. More... | |
bool | write_higher_order_cells |
If available, output high order data. More... | |
std::string | base_name |
Base name for output files. More... | |
std::string | current_directory |
Folder where solutions are stored. More... | |
std::string | current_filename |
The name of last written filew. More... | |
std::string | master_name |
The name used for the master pvd file. More... | |
std::string | current_name |
Current output name. More... | |
bool | output_partitioning |
Output the partitioning of the domain. More... | |
bool | output_material_ids |
Output the material ids of the domain. More... | |
std::ofstream | output_file |
Output file. More... | |
std::unique_ptr< DataOut< dim, spacedim > > | data_out |
Outputs only the data that refers to this process. More... | |
DataOut< dim, spacedim >::CurvedCellRegion | curved_cells_region = DataOut<dim, spacedim>::curved_inner_cells |
std::vector< std::pair< double, std::string > > | pvd_record |
Record of all output files and times. More... | |
Additional Inherited Members | |
![]() | |
static void | initialize (const std::string &filename="", const std::string &output_filename="", const ParameterHandler::OutputStyle output_style_for_output_filename=ParameterHandler::Short, ParameterHandler &prm=ParameterAcceptor::prm, const ParameterHandler::OutputStyle output_style_for_filename=ParameterHandler::DefaultStyle) |
static void | initialize (std::istream &input_stream, ParameterHandler &prm=ParameterAcceptor::prm) |
static void | clear () |
static void | parse_all_parameters (ParameterHandler &prm=ParameterAcceptor::prm) |
static void | declare_all_parameters (ParameterHandler &prm=ParameterAcceptor::prm) |
static ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
![]() | |
static ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
![]() | |
boost::signals2::signal< void()> | declare_parameters_call_back |
boost::signals2::signal< void()> | parse_parameters_call_back |
![]() | |
static ParameterHandler | prm |
![]() | |
const std::string | section_name |
std::vector< std::string > | subsections |
Definition at line 41 of file data_out.h.
DataOut< dim, spacedim >::DataOut | ( | const std::string & | section_name = "" , |
const std::string & | base_name = "solution" , |
||
const std::string & | output_format = "vtu" , |
||
const unsigned int & | subdivisions = 0 , |
||
const bool & | write_higher_order_cells = true , |
||
const MPI_Comm & | comm = MPI_COMM_WORLD |
||
) |
Construct a new DataOut object.
name | |
base_name | |
output_format | |
subdivisions | |
output_high_order | |
comm |
Definition at line 72 of file data_out.cc.
References ParameterAcceptor::add_parameter(), comm, ParsedTools::DataOut< dim, spacedim >::curved_cells_region, DataOutBase::get_output_format_names(), MPI, ParsedTools::DataOut< dim, spacedim >::output_material_ids, ParsedTools::DataOut< dim, spacedim >::output_partitioning, and ParameterAcceptor::prm.
void DataOut< dim, spacedim >::attach_dof_handler | ( | const DoFHandler< dim, spacedim > & | dh, |
const std::string & | suffix = "" |
||
) |
Prepare to output data on the given file.
This will initialize the data_out object and a file with a filename that is the combination of the base_name
, the optional suffix
, eventually a processor number and the output suffix.
Definition at line 119 of file data_out.cc.
References DoFHandler< int dim, int spacedim >::active_cell_iterators(), AssertThrow, FiniteElement< int dim, int spacedim >::degree, StandardExceptions::ExcIO(), DoFHandler< int dim, int spacedim >::get_fe(), DoFHandler< int dim, int spacedim >::get_triangulation(), Utilities::int_to_string(), Triangulation< int dim, int spacedim >::n_active_cells(), DataOutBase::parse_output_format(), Vector< typename Number >::reinit(), Vector< typename Number >::size(), Vector< typename Number >::swap(), and DataOutBase::VtkFlags::write_higher_order_cells.
Referenced by main().
void DataOut< dim, spacedim >::add_data_vector | ( | const VECTOR & | data_vector, |
const std::string & | desc, | ||
const typename DataOut< dim, spacedim >::DataVectorType & | type = DataOut<dim, spacedim>::type_automatic |
||
) |
Add the given vector to the output file.
Prior to calling this method, you have to call the attach_dof_handler() method. The string can be a comma separated list of components, or a single description. In this latter case, a progressive number per component is added in the end. In the former case, if a string is reapeated, its respective components are interepreted as components of a vector.
Definition at line 183 of file data_out.h.
References DataComponentInterpretation::component_is_scalar, Utilities::split_string_list(), and ParsedTools::Components::type().
Referenced by main().
void DataOut< dim, spacedim >::add_data_vector | ( | const VECTOR & | data_vector, |
const DataPostprocessor< spacedim > & | postproc | ||
) |
Wrapper for the corrisponding function in dealii.
Definition at line 233 of file data_out.h.
void DataOut< dim, spacedim >::write_data_and_clear | ( | const Mapping< dim, spacedim > & | mapping = StaticMappingQ1<dim, spacedim>::mapping | ) |
Actually write the file.
Once the data_out has been prepared, vectors have been added, the data can be written to a file. This is done in this method. At the end of this function call the process can be started again. used_files
is an optional variable that takes a list of useful files (ex. "parameter.prm time.dat") and copies these files in the incremental_run_prefix
of the costructor function.
Definition at line 194 of file data_out.cc.
References AssertThrow, StandardExceptions::ExcIO(), Utilities::int_to_string(), and DataOutBase::write_pvd_record().
Referenced by main().
void DataOut< dim, spacedim >::clear_pvd_record |
Resets the pvd_record.
Definition at line 110 of file data_out.cc.
|
private |
Initialization flag.
Definition at line 116 of file data_out.h.
|
private |
MPI communicator.
Definition at line 119 of file data_out.h.
|
private |
Number of processes.
Definition at line 122 of file data_out.h.
|
private |
My mpi process.
Definition at line 125 of file data_out.h.
|
private |
Output format.
Definition at line 128 of file data_out.h.
|
private |
Number of subdivisions.
Definition at line 131 of file data_out.h.
|
private |
If available, output high order data.
Definition at line 134 of file data_out.h.
|
private |
Base name for output files.
This base is used to generate all filenames.
Definition at line 138 of file data_out.h.
|
private |
Folder where solutions are stored.
Definition at line 141 of file data_out.h.
|
private |
The name of last written filew.
Definition at line 144 of file data_out.h.
|
private |
The name used for the master pvd file.
Definition at line 147 of file data_out.h.
|
private |
Current output name.
When preparing data_out, this name will contain the base for the current output. This allows the user to use a different output name in different part of the program.
Definition at line 152 of file data_out.h.
|
private |
Output the partitioning of the domain.
Definition at line 155 of file data_out.h.
Referenced by ParsedTools::DataOut< dim, spacedim >::DataOut().
|
private |
Output the material ids of the domain.
Definition at line 158 of file data_out.h.
Referenced by ParsedTools::DataOut< dim, spacedim >::DataOut().
|
private |
Output file.
Definition at line 161 of file data_out.h.
|
private |
Outputs only the data that refers to this process.
Definition at line 164 of file data_out.h.
|
private |
Definition at line 167 of file data_out.h.
Referenced by ParsedTools::DataOut< dim, spacedim >::DataOut().
|
private |
Record of all output files and times.
Definition at line 172 of file data_out.h.