Nektar++
|
#include <FilterElectrogram.h>
Public Member Functions | |
FilterElectrogram (const LibUtilities::SessionReaderSharedPtr &pSession, const std::shared_ptr< SolverUtils::EquationSystem > &pEquation, const ParamMap &pParams) | |
Electrogram filter constructor. More... | |
~FilterElectrogram () override | |
Electrogram filter destructor. 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 electrogram filter and open output file. More... | |
void | v_Update (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override |
Compute extracellular potential at egm points at current time. More... | |
void | v_Finalise (const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override |
Finalise the electrogram filter and close output file. More... | |
bool | v_IsTimeDependent () override |
Filter is time-dependent and should be called at each time-step. 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 | |
Array< OneD, Array< OneD, NekDouble > > | m_grad_R_x |
Gradient of the radius from each electrogram point in x-direction. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_grad_R_y |
Gradient of the radius from each electrogram point in y-direction. More... | |
Array< OneD, Array< OneD, NekDouble > > | m_grad_R_z |
Gradient of the radius from each electrogram point in z-direction. More... | |
SpatialDomains::PointGeomVector | m_electrogramPoints |
List of electrogram points. More... | |
unsigned int | m_index |
Counts number of calls to update (number of timesteps) More... | |
unsigned int | m_outputFrequency |
Number of timesteps between outputs. More... | |
std::string | m_outputFile |
Filename to output electrogram data to. More... | |
std::ofstream | m_outputStream |
Output file stream for electrogram data. More... | |
std::stringstream | m_electrogramStream |
Point coordinate input string. More... | |
Friends | |
class | MemoryManager< FilterElectrogram > |
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 |
Definition at line 44 of file FilterElectrogram.h.
Nektar::FilterElectrogram::FilterElectrogram | ( | const LibUtilities::SessionReaderSharedPtr & | pSession, |
const std::shared_ptr< SolverUtils::EquationSystem > & | pEquation, | ||
const ParamMap & | pParams | ||
) |
Electrogram filter constructor.
Definition at line 50 of file FilterElectrogram.cpp.
References ASSERTL0, Nektar::LibUtilities::Equation::Evaluate(), m_electrogramStream, m_index, m_outputFile, m_outputFrequency, and Nektar::SolverUtils::Filter::m_session.
|
override |
|
inlinestatic |
Creates an instance of this class.
Definition at line 50 of file FilterElectrogram.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.
|
overrideprotectedvirtual |
Finalise the electrogram filter and close output file.
Implements Nektar::SolverUtils::Filter.
Definition at line 259 of file FilterElectrogram.cpp.
References m_outputStream.
|
overrideprotectedvirtual |
Initialises the electrogram filter and open output file.
Implements Nektar::SolverUtils::Filter.
Definition at line 102 of file FilterElectrogram.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, m_electrogramPoints, m_electrogramStream, m_grad_R_x, m_grad_R_y, m_grad_R_z, m_index, m_outputFile, m_outputStream, Nektar::SolverUtils::Filter::m_session, Vmath::Sadd(), Vmath::Sdiv(), v_Update(), Vmath::Vsqrt(), Vmath::Vvtvp(), Vmath::Vvtvvtp(), and Nektar::UnitTests::z().
|
overrideprotectedvirtual |
Filter is time-dependent and should be called at each time-step.
Implements Nektar::SolverUtils::Filter.
Definition at line 272 of file FilterElectrogram.cpp.
|
overrideprotectedvirtual |
Compute extracellular potential at egm points at current time.
Implements Nektar::SolverUtils::Filter.
Definition at line 204 of file FilterElectrogram.cpp.
References m_electrogramPoints, m_grad_R_x, m_grad_R_y, m_grad_R_z, m_index, m_outputFrequency, m_outputStream, Nektar::LibUtilities::ReduceSum, Vmath::Vvtvp(), and Vmath::Vvtvvtp().
Referenced by v_Initialise().
|
friend |
Definition at line 1 of file FilterElectrogram.h.
|
static |
Name of the class.
Definition at line 62 of file FilterElectrogram.h.
|
private |
List of electrogram points.
Definition at line 97 of file FilterElectrogram.h.
Referenced by v_Initialise(), and v_Update().
|
private |
Point coordinate input string.
Definition at line 107 of file FilterElectrogram.h.
Referenced by FilterElectrogram(), and v_Initialise().
Gradient of the radius from each electrogram point in x-direction.
Definition at line 91 of file FilterElectrogram.h.
Referenced by v_Initialise(), and v_Update().
Gradient of the radius from each electrogram point in y-direction.
Definition at line 93 of file FilterElectrogram.h.
Referenced by v_Initialise(), and v_Update().
Gradient of the radius from each electrogram point in z-direction.
Definition at line 95 of file FilterElectrogram.h.
Referenced by v_Initialise(), and v_Update().
|
private |
Counts number of calls to update (number of timesteps)
Definition at line 99 of file FilterElectrogram.h.
Referenced by FilterElectrogram(), v_Initialise(), and v_Update().
|
private |
Filename to output electrogram data to.
Definition at line 103 of file FilterElectrogram.h.
Referenced by FilterElectrogram(), and v_Initialise().
|
private |
Number of timesteps between outputs.
Definition at line 101 of file FilterElectrogram.h.
Referenced by FilterElectrogram(), and v_Update().
|
private |
Output file stream for electrogram data.
Definition at line 105 of file FilterElectrogram.h.
Referenced by v_Finalise(), v_Initialise(), and v_Update().