Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
|
#include <Citations.hpp>
Static Public Member Functions | |
static void | Register (const char *pCitation, PetscBool *pSet) |
static void | Print () |
Static Private Attributes | |
static std::vector< const char * > | mCitations |
static bool | mUseChasteImplementation = false |
Friends | |
class | TestCitations |
A class to register citations placed throughout the codebase, and pass them through to PETSc (3.5+) or save them and print to screen/disk at program exit (pre-PETSc 3.5). The behaviour from the user's point of view should be the same regardless of PETSc version.
This feature may be switched on by passing the "-citations" flag at runtime to print to screen, or to file.txt using "-citations file.txt". Paths for the latter can be relative or absolute, if the file can't be written (because the directory doesn't exist, or otherwise) you'll get an exception.
See r22760 for an example of adding a new citation to the trunk and registering it.
Definition at line 59 of file Citations.hpp.
|
static |
Print the list of citations, called automatically when finalising the PETSc environment (see PetscSetupUtils).
Definition at line 71 of file Citations.cpp.
References PetscTools::AmMaster(), EXCEPT_IF_NOT, CommandLineArguments::GetNumberOfArgumentsForOption(), CommandLineArguments::GetStringCorrespondingToOption(), CommandLineArguments::Instance(), mCitations, and mUseChasteImplementation.
Referenced by PetscSetupUtils::CommonFinalize().
|
static |
Method to register a citation. Just passes through to PETSc for v3.5+.
pCitation | the citation in BibTeX format. |
pSet | pointer to a flag used to track whether the citation has been added before; will be set to true by this method. |
Definition at line 43 of file Citations.cpp.
References PetscTools::IsInitialised(), mCitations, and mUseChasteImplementation.
Referenced by AbstractCardiacCellInterface::AbstractCardiacCellInterface(), StreeterFibreGenerator< SPACE_DIM >::StreeterFibreGenerator(), and PetscSetupUtils::CommonSetup().
|
friend |
Definition at line 79 of file Citations.hpp.
|
staticprivate |
The list of citations if using Chaste's built-in manager (pre-PETSc 3.5 or PETSc not initialised).
Definition at line 82 of file Citations.hpp.
Referenced by Print(), and Register().
|
staticprivate |
Whether to use Chaste's own implementation rather than the PETSc one (e.g. if PETSc hasn't been initialised, or is too old).
Definition at line 85 of file Citations.hpp.
Referenced by Print(), and Register().