SPH
Public Member Functions | List of all members
IntegralsLogWriter Class Reference

Writer logging selected integrals of motion. More...

#include <LogWriter.h>

Inheritance diagram for IntegralsLogWriter:
ILogWriter PeriodicTrigger ITrigger Polymorphic

Public Member Functions

 IntegralsLogWriter (const Path &path, const Size interval)
 Creates a writer that writes the output into given file. More...
 
 IntegralsLogWriter (const SharedPtr< ILogger > &logger, const Size interval)
 
virtual void write (const Storage &storage, const Statistics &stats) override
 Writes to the log using provided storage and statistics. More...
 
- Public Member Functions inherited from ILogWriter
 ILogWriter (const SharedPtr< ILogger > &logger, const Float period=0._f)
 Constructs the log file. More...
 
virtual AutoPtr< ITriggeraction (Storage &storage, Statistics &stats) override final
 Writes to the log using provided storage and statistics. More...
 
- Public Member Functions inherited from PeriodicTrigger
 PeriodicTrigger (const Float period, const Float startTime)
 period Period in simulation time of triggered action. More...
 
virtual TriggerEnum type () const override
 Returns the type of the trigger. More...
 
virtual bool condition (const Storage &UNUSED(storage), const Statistics &stats) override
 
- Public Member Functions inherited from ITrigger
virtual bool condition (const Storage &storage, const Statistics &stats)=0
 Returns true if the trigger should be executed. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Additional Inherited Members

- Protected Attributes inherited from ILogWriter
SharedPtr< ILoggerlogger
 

Detailed Description

Writer logging selected integrals of motion.

Currently fixed to logging total momentum, total angular momentum and total energy.

Definition at line 75 of file LogWriter.h.

Constructor & Destructor Documentation

◆ IntegralsLogWriter() [1/2]

IntegralsLogWriter::IntegralsLogWriter ( const Path path,
const Size  interval 
)

Creates a writer that writes the output into given file.

Definition at line 149 of file LogWriter.cpp.

◆ IntegralsLogWriter() [2/2]

IntegralsLogWriter::IntegralsLogWriter ( const SharedPtr< ILogger > &  logger,
const Size  interval 
)

Definition at line 152 of file LogWriter.cpp.

Member Function Documentation

◆ write()

void IntegralsLogWriter::write ( const Storage storage,
const Statistics stats 
)
overridevirtual

Writes to the log using provided storage and statistics.

Used for const-correctness (loggers should not modify storage nor stats) and returning another (non-nullptr) trigger (loggers do not create more triggers).

Implements ILogWriter.

Definition at line 155 of file LogWriter.cpp.


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