Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
Citations Class Reference

#include <Citations.hpp>

+ Collaboration diagram for Citations:

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
 

Detailed Description

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.

Member Function Documentation

◆ Print()

void Citations::Print ( )
static

◆ Register()

void Citations::Register ( const char *  pCitation,
PetscBool *  pSet 
)
static

Method to register a citation. Just passes through to PETSc for v3.5+.

Parameters
pCitationthe citation in BibTeX format.
pSetpointer 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().

Friends And Related Symbol Documentation

◆ TestCitations

friend class TestCitations
friend

Definition at line 79 of file Citations.hpp.

Member Data Documentation

◆ mCitations

std::vector< const char * > Citations::mCitations
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().

◆ mUseChasteImplementation

bool Citations::mUseChasteImplementation = false
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().


The documentation for this class was generated from the following files: