Nektar++
|
Records activation and repolarisation times. More...
#include <FilterBenchmark.h>
Public Member Functions | |
FilterBenchmark (const LibUtilities::SessionReaderSharedPtr &pSession, const std::shared_ptr< SolverUtils::EquationSystem > &pEquation, const ParamMap &pParams) | |
Construct the benchmark filter. More... | |
~FilterBenchmark () override | |
Destructor for the benchmark filter. More... | |
Public Member Functions inherited from Nektar::SolverUtils::Filter | |
SOLVER_UTILS_EXPORT | Filter (const LibUtilities::SessionReaderSharedPtr &pSession, const std::shared_ptr< EquationSystem > &pEquation) |
virtual SOLVER_UTILS_EXPORT | ~Filter () |
SOLVER_UTILS_EXPORT void | Initialise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) |
SOLVER_UTILS_EXPORT void | Update (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) |
SOLVER_UTILS_EXPORT void | Finalise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) |
SOLVER_UTILS_EXPORT bool | IsTimeDependent () |
Static Public Member Functions | |
static SolverUtils::FilterSharedPtr | create (const LibUtilities::SessionReaderSharedPtr &pSession, const std::shared_ptr< SolverUtils::EquationSystem > &pEquation, const ParamMap &pParams) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static std::string | className |
Name of the class. More... | |
Protected Member Functions | |
void | v_Initialise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override |
Initialises the benchmark filter and allocates storage. More... | |
void | v_Update (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override |
Update recorded times. More... | |
void | v_Finalise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override |
Finalises the benchmark filter and write out recorded data. More... | |
bool | v_IsTimeDependent () override |
Identifies that the benchmark filter is time dependent. More... | |
virtual void | v_Initialise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)=0 |
virtual void | v_Update (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)=0 |
virtual void | v_Finalise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)=0 |
virtual bool | v_IsTimeDependent ()=0 |
Private Attributes | |
std::vector< Array< OneD, NekDouble > > | m_threshold |
Storage for activation and repolarisation times. More... | |
Array< OneD, int > | m_idx |
Number of activations and repolarisations detected for each point. More... | |
Array< OneD, int > | m_polarity |
Indicates if the previous event was an activation or repolarisation. More... | |
NekDouble | m_startTime |
Time at which to start detecting activations and repolarisations. More... | |
NekDouble | m_thresholdValue |
Value at which tissue is considered active. More... | |
NekDouble | m_initialValue |
Initial time to use in storage array. More... | |
std::string | m_outputFile |
Filename of output files. More... | |
LibUtilities::FieldIOSharedPtr | m_fld |
FieldIO object used for writing output files. More... | |
Friends | |
class | MemoryManager< FilterBenchmark > |
Additional Inherited Members | |
Public Types inherited from Nektar::SolverUtils::Filter | |
typedef std::map< std::string, std::string > | ParamMap |
Protected Attributes inherited from Nektar::SolverUtils::Filter | |
LibUtilities::SessionReaderSharedPtr | m_session |
const std::weak_ptr< EquationSystem > | m_equ |
Records activation and repolarisation times.
This class records the sequence of activation and repolarisation times across the entire domain into a two-dimensional storage structure. At each timestep, the voltage at each point in the domain is examined to identify if it has crossed the threshold value. If so, the time of crossing is recorded. Auxiliary arrays hold the current index of each point (i.e. the number of crossings of the threshold) and the type of the last crossing (activation or repolarisation).
Definition at line 44 of file FilterBenchmark.h.
Nektar::FilterBenchmark::FilterBenchmark | ( | const LibUtilities::SessionReaderSharedPtr & | pSession, |
const std::shared_ptr< SolverUtils::EquationSystem > & | pEquation, | ||
const ParamMap & | pParams | ||
) |
Construct the benchmark filter.
pSession | Session reader for IO |
pParams | Parameters of filter |
Definition at line 59 of file FilterBenchmark.cpp.
References ASSERTL0, Nektar::LibUtilities::FieldIO::CreateDefault(), Nektar::LibUtilities::Equation::Evaluate(), m_fld, m_initialValue, m_outputFile, Nektar::SolverUtils::Filter::m_session, m_startTime, and m_thresholdValue.
|
override |
|
inlinestatic |
Creates an instance of this class.
Definition at line 50 of file FilterBenchmark.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.
|
overrideprotectedvirtual |
Finalises the benchmark filter and write out recorded data.
Writes out the crossings to file.
pFields | Field storage expansion list. |
time | Current time. |
Implements Nektar::SolverUtils::Filter.
Definition at line 175 of file FilterBenchmark.cpp.
References m_fld, m_outputFile, and m_threshold.
|
overrideprotectedvirtual |
Initialises the benchmark filter and allocates storage.
Implements Nektar::SolverUtils::Filter.
Definition at line 106 of file FilterBenchmark.cpp.
References m_idx, m_initialValue, m_polarity, and m_threshold.
|
overrideprotectedvirtual |
Identifies that the benchmark filter is time dependent.
Implements Nektar::SolverUtils::Filter.
Definition at line 206 of file FilterBenchmark.cpp.
|
overrideprotectedvirtual |
Update recorded times.
Checks each point in the domain to determine if it has crossed the threshold. The direction of crossing is determined. Additional storage is allocated if needed.
pFields | Field storage expansion lists |
time | Current time |
Implements Nektar::SolverUtils::Filter.
Definition at line 124 of file FilterBenchmark.cpp.
References m_idx, m_initialValue, m_polarity, m_startTime, m_threshold, m_thresholdValue, Nektar::LibUtilities::ReduceMax, and Vmath::Vmax().
|
friend |
Definition at line 1 of file FilterBenchmark.h.
|
static |
Name of the class.
Definition at line 62 of file FilterBenchmark.h.
|
private |
FieldIO object used for writing output files.
Definition at line 105 of file FilterBenchmark.h.
Referenced by FilterBenchmark(), and v_Finalise().
Number of activations and repolarisations detected for each point.
Definition at line 93 of file FilterBenchmark.h.
Referenced by v_Initialise(), and v_Update().
|
private |
Initial time to use in storage array.
Definition at line 101 of file FilterBenchmark.h.
Referenced by FilterBenchmark(), v_Initialise(), and v_Update().
|
private |
Filename of output files.
Definition at line 103 of file FilterBenchmark.h.
Referenced by FilterBenchmark(), and v_Finalise().
Indicates if the previous event was an activation or repolarisation.
Definition at line 95 of file FilterBenchmark.h.
Referenced by v_Initialise(), and v_Update().
|
private |
Time at which to start detecting activations and repolarisations.
Definition at line 97 of file FilterBenchmark.h.
Referenced by FilterBenchmark(), and v_Update().
Storage for activation and repolarisation times.
Definition at line 91 of file FilterBenchmark.h.
Referenced by v_Finalise(), v_Initialise(), and v_Update().
|
private |
Value at which tissue is considered active.
Definition at line 99 of file FilterBenchmark.h.
Referenced by FilterBenchmark(), and v_Update().