Information for documentation of results: Directory and file number to enable output in the form RESLT/filename11.dat, say. Documentation can be switched on and off. More...
#include <oomph_utilities.h>
Public Member Functions | |
DocInfo () | |
Constructor. Default settings: Current directory, step ‘0’, label="", full documentation enabled and output directory is required to exist when set_directory() is called. More... | |
DocInfo (const std::string &directory) | |
Constructor with specific directory. More... | |
std::string | directory () const |
Output directory. More... | |
void | set_directory (const std::string &directory) |
Set output directory (we try to open a file in it to see if the directory exists – if it doesn't we'll issue a warning – or, if directory_must_exist()==true, throw and OomphLibError. More... | |
void | enable_doc () |
Enable documentation. More... | |
void | disable_doc () |
Disable documentation. More... | |
bool | is_doc_enabled () const |
Are we documenting? More... | |
unsigned & | number () |
Number used (e.g.) for labeling output files. More... | |
unsigned | number () const |
Number used (e.g.) for labeling output files. Const version. More... | |
std::string | number_as_string () const |
Get number as a string (useful to completely avoid C-strings). More... | |
std::string & | label () |
String used (e.g.) for labeling output files. More... | |
std::string | label () const |
String used (e.g.) for labeling output files. Const version. More... | |
void | enable_error_if_directory_does_not_exist () |
Call to throw an error if directory does not exist. More... | |
void | disable_error_if_directory_does_not_exist () |
Call to issue a warning if the directory does not exists. More... | |
Private Attributes | |
std::string | Directory |
Directory name. More... | |
bool | Doc_flag |
Doc or don't? More... | |
unsigned | Number |
Number to label output file, say. More... | |
std::string | Label |
String to label output file, say. More... | |
bool | Directory_must_exist |
Boolean flag to decide response if an output directory doesn't exist: If true, we terminate code execution by throwing an OomphLibError rather than just issuing a warning. More... | |
Information for documentation of results: Directory and file number to enable output in the form RESLT/filename11.dat, say. Documentation can be switched on and off.
Definition at line 498 of file oomph_utilities.h.
|
inline |
Constructor. Default settings: Current directory, step ‘0’, label="", full documentation enabled and output directory is required to exist when set_directory() is called.
Definition at line 504 of file oomph_utilities.h.
|
inline |
Constructor with specific directory.
Definition at line 514 of file oomph_utilities.h.
|
inline |
Output directory.
Definition at line 524 of file oomph_utilities.h.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), oomph::BinaryTreeForest::check_all_neighbours(), oomph::OcTreeForest::check_all_neighbours(), oomph::QuadTreeForest::check_all_neighbours(), oomph::Mesh::check_halo_schemes(), oomph::Mesh::distribute(), oomph::SolidHelpers::doc_2D_principal_stress(), oomph::Z2ErrorEstimator::doc_flux(), oomph::FSI_functions::doc_fsi(), oomph::Mesh::doc_mesh_distribution(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::doc_solution(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::doc_solution(), oomph::BiharmonicProblem< DIM >::doc_solution(), oomph::BiharmonicFluidProblem< DIM >::doc_solution(), oomph::WomersleyProblem< ELEMENT, DIM >::doc_solution(), oomph::OcTreeForest::open_hanging_node_files(), oomph::QuadTreeForest::open_hanging_node_files(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), oomph::RefineableMeshBase::p_refine_uniformly(), oomph::Problem::partition_global_mesh(), oomph::Mesh::prune_halo_elements_and_nodes(), oomph::RefineableMeshBase::refine_uniformly(), oomph::RefineableQuadFromTriangleMesh< ELEMENT >::refine_uniformly(), and oomph::TetMeshBase::snap_to_quadratic_surface().
|
inline |
Disable documentation.
Definition at line 542 of file oomph_utilities.h.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt(), oomph::TreeBasedRefineableMeshBase::adapt_mesh(), oomph::Problem::check_halo_schemes(), oomph::Mesh::classify_halo_and_haloed_nodes(), oomph::TreeBasedRefineableMeshBase::classify_halo_and_haloed_nodes(), oomph::Problem::distribute(), oomph::Mesh::distribute(), oomph::Problem::doc_errors(), oomph::ErrorEstimator::get_element_errors(), oomph::Z2ErrorEstimator::get_element_errors(), oomph::Problem::load_balance(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), oomph::TreeBasedRefineableMeshBase::p_adapt(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), oomph::RefineableMeshBase::p_refine_uniformly(), oomph::Problem::p_refine_uniformly(), oomph::Problem::p_refine_uniformly_and_prune(), oomph::Problem::prune_halo_elements_and_nodes(), oomph::Mesh::prune_halo_elements_and_nodes(), oomph::Problem::read(), oomph::VorticitySmoother< ELEMENT >::recover_vorticity(), oomph::RefineableMeshBase::refine_uniformly(), oomph::RefineableQuadFromTriangleMesh< ELEMENT >::refine_uniformly(), oomph::Problem::refine_uniformly(), oomph::Problem::refine_uniformly_and_prune(), oomph::RefineableTriangleMesh< ELEMENT >::reset_halo_haloed_scheme(), oomph::Problem::self_test(), and oomph::TetMeshBase::snap_to_quadratic_surface().
|
inline |
Call to issue a warning if the directory does not exists.
Definition at line 590 of file oomph_utilities.h.
|
inline |
Enable documentation.
Definition at line 536 of file oomph_utilities.h.
|
inline |
Call to throw an error if directory does not exist.
Definition at line 584 of file oomph_utilities.h.
|
inline |
Are we documenting?
Definition at line 548 of file oomph_utilities.h.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt(), oomph::TreeBasedRefineableMeshBase::adapt_mesh(), oomph::BinaryTreeForest::check_all_neighbours(), oomph::OcTreeForest::check_all_neighbours(), oomph::QuadTreeForest::check_all_neighbours(), oomph::Mesh::check_halo_schemes(), oomph::TreeForest::close_hanging_node_files(), oomph::Mesh::distribute(), oomph::Problem::doc_errors(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::doc_solution(), oomph::Z2ErrorEstimator::get_element_errors(), oomph::DummyErrorEstimator::get_element_errors(), oomph::OcTreeForest::open_hanging_node_files(), oomph::QuadTreeForest::open_hanging_node_files(), oomph::TreeBasedRefineableMeshBase::p_adapt(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), oomph::Problem::partition_global_mesh(), oomph::Mesh::prune_halo_elements_and_nodes(), and oomph::TetMeshBase::snap_to_quadratic_surface().
|
inline |
String used (e.g.) for labeling output files.
Definition at line 572 of file oomph_utilities.h.
Referenced by oomph::Problem::check_halo_schemes(), oomph::Mesh::check_halo_schemes(), oomph::Mesh::doc_mesh_distribution(), oomph::BiharmonicFluidProblem< DIM >::doc_solution(), and oomph::TetMeshBase::snap_to_quadratic_surface().
|
inline |
String used (e.g.) for labeling output files. Const version.
Definition at line 578 of file oomph_utilities.h.
|
inline |
Number used (e.g.) for labeling output files.
Definition at line 554 of file oomph_utilities.h.
References oomph::Global_unsigned::Number.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), oomph::BinaryTreeForest::check_all_neighbours(), oomph::OcTreeForest::check_all_neighbours(), oomph::QuadTreeForest::check_all_neighbours(), oomph::Mesh::check_halo_schemes(), oomph::Problem::distribute(), oomph::Mesh::distribute(), oomph::SolidHelpers::doc_2D_principal_stress(), oomph::Z2ErrorEstimator::doc_flux(), oomph::FSI_functions::doc_fsi(), oomph::Mesh::doc_mesh_distribution(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::doc_solution(), oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::doc_solution(), oomph::BiharmonicProblem< DIM >::doc_solution(), oomph::WomersleyProblem< ELEMENT, DIM >::doc_solution(), oomph::Problem::load_balance(), oomph::OcTreeForest::open_hanging_node_files(), oomph::QuadTreeForest::open_hanging_node_files(), oomph::NonLinearElasticitySmoothMesh< ELEMENT >::operator()(), oomph::TreeBasedRefineableMeshBase::p_adapt_mesh(), oomph::Problem::partition_global_mesh(), and oomph::Mesh::prune_halo_elements_and_nodes().
|
inline |
Number used (e.g.) for labeling output files. Const version.
Definition at line 560 of file oomph_utilities.h.
References oomph::Global_unsigned::Number.
|
inline |
Get number as a string (useful to completely avoid C-strings).
Definition at line 566 of file oomph_utilities.h.
References oomph::Global_unsigned::Number, and oomph::StringConversion::to_string().
void oomph::DocInfo::set_directory | ( | const std::string & | directory | ) |
Set output directory (we try to open a file in it to see if the directory exists – if it doesn't we'll issue a warning – or, if directory_must_exist()==true, throw and OomphLibError.
Set output directory (we try to open a file in it to see if the directory exists – if it doesn't we'll issue a warning – or, if directory_must_exist()==true, die by throwing and OomphLibError.
Definition at line 298 of file oomph_utilities.cc.
References Directory, Directory_must_exist, and oomph::Global_string_for_annotation::string().
|
private |
|
private |
Boolean flag to decide response if an output directory doesn't exist: If true, we terminate code execution by throwing an OomphLibError rather than just issuing a warning.
Definition at line 612 of file oomph_utilities.h.
Referenced by set_directory().
|
private |
Doc or don't?
Definition at line 600 of file oomph_utilities.h.
|
private |
String to label output file, say.
Definition at line 606 of file oomph_utilities.h.
|
private |
Number to label output file, say.
Definition at line 603 of file oomph_utilities.h.