#include <ArchiveLocationInfo.hpp>
Static Public Member Functions | |
static void | SetMeshPathname (const std::string &rDirectory, const std::string &rFilename) |
static void | SetMeshFilename (const std::string &rFilename) |
static std::string | GetMeshFilename () |
static std::string | GetArchiveDirectory () |
static std::string | GetProcessUniqueFilePath (const std::string &rFileName) |
static void | SetArchiveDirectory (const std::string &rDirectory) |
static std::string | GetArchiveRelativePath () |
Static Private Attributes | |
static std::string | mDirPath = "" |
static std::string | mMeshFilename = "mesh" |
This functionality is used by the meshes, LinearSystem and HeartConfig.
For the benefit of the meshes (and the cancer code), there are also shortcut methods SetMeshPathname and GetMeshFilename, allowing you to specify the base file name for the mesh. This is needed because the cancer code adds timestamp information to the file name.
Definition at line 54 of file ArchiveLocationInfo.hpp.
static void ArchiveLocationInfo::SetMeshPathname | ( | const std::string & | rDirectory, | |
const std::string & | rFilename | |||
) | [inline, static] |
Set the location to write mesh files.
rDirectory | the directory to write to. | |
rFilename | the base name (minus extension) for the mesh files. |
Definition at line 70 of file ArchiveLocationInfo.hpp.
References mMeshFilename, and SetArchiveDirectory().
Referenced by TissueSimulationArchiver< DIM, SIM >::GetArchivePathname().
static void ArchiveLocationInfo::SetMeshFilename | ( | const std::string & | rFilename | ) | [inline, static] |
Set the filename for mesh files.
rFilename | the base name (minus extension) for the mesh files, used to put on a timestamp. |
Definition at line 80 of file ArchiveLocationInfo.hpp.
References mMeshFilename.
Referenced by TissueSimulationArchiver< DIM, SIM >::Save().
static std::string ArchiveLocationInfo::GetMeshFilename | ( | ) | [inline, static] |
Get the filename that the mesh should be written to
Definition at line 89 of file ArchiveLocationInfo.hpp.
References mMeshFilename.
Referenced by AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM >::load(), and AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM >::save().
static std::string ArchiveLocationInfo::GetArchiveDirectory | ( | ) | [inline, static] |
Get the directory that archives are being written to. Will always end in a '/'.
Definition at line 103 of file ArchiveLocationInfo.hpp.
References mDirPath.
Referenced by GetProcessUniqueFilePath(), AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM >::load(), HeartConfig::load(), and HeartConfig::Write().
static std::string ArchiveLocationInfo::GetProcessUniqueFilePath | ( | const std::string & | rFileName | ) | [inline, static] |
Get the full path to an output file which has a name unique to the current process. Useful for ensuring that each process writes to / reads from a separate file when running in parallel.
The path will have the form "path_to_output_dir/rFileName.process_rank"
rFileName | the base file name |
Definition at line 122 of file ArchiveLocationInfo.hpp.
References GetArchiveDirectory(), and PetscTools::GetMyRank().
static void ArchiveLocationInfo::SetArchiveDirectory | ( | const std::string & | rDirectory | ) | [inline, static] |
Set the directory that archives are being written to.
rDirectory | the directory in question. |
Definition at line 134 of file ArchiveLocationInfo.hpp.
References mDirPath.
Referenced by TissueSimulationArchiver< DIM, SIM >::Save(), OutputFileHandler::SetArchiveDirectory(), and SetMeshPathname().
static std::string ArchiveLocationInfo::GetArchiveRelativePath | ( | ) | [inline, static] |
Get the directory to which the archives are being written. Remove CHASTE_TEST_OUTPUT prefix (assuming it exists) Will always end in a '/'.
Definition at line 149 of file ArchiveLocationInfo.hpp.
References OutputFileHandler::GetChasteTestOutputDirectory(), and mDirPath.
Referenced by AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM >::save().
std::string ArchiveLocationInfo::mDirPath = "" [static, private] |
Directory that archives are being written to.
Definition at line 59 of file ArchiveLocationInfo.hpp.
Referenced by GetArchiveDirectory(), GetArchiveRelativePath(), and SetArchiveDirectory().
std::string ArchiveLocationInfo::mMeshFilename = "mesh" [static, private] |
Mesh filename (relative to mDirPath).
Definition at line 62 of file ArchiveLocationInfo.hpp.
Referenced by GetMeshFilename(), SetMeshFilename(), and SetMeshPathname().