| kspaceFirstOrder3D-OMP 1.1 The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions Variables Typedefs Enumerations Friends Pages
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
TOutputStreamContainer Class Reference

A container for output streams. More...

`#include <MatrixContainer.h>`

Collaboration diagram for TOutputStreamContainer:
[legend]

## Public Member Functions
| TOutputStreamContainer ()
| Constructor.
virtual | ~TOutputStreamContainer ()
| Destructor. More...
size_t | size () const
| Get size of the container. More...
bool | empty () const
| Is the container empty? More...
TBaseOutputHDF5Stream & | operator[] (const TMatrixID MatrixID)
| Operator []. More...
void | AddStreamsIntoContainer (TMatrixContainer &MatrixContainer)
| Create all streams in container (no file manipulation). More...
void | CreateStreams ()
| Create all streams - opens the datasets. More...
void | ReopenStreams ()
| Reopen streams after checkpoint file (datasets). More...
void | SampleStreams ()
| Sample all streams. More...
void | PostProcessStreams ()
| Post-process all streams and flush them to the file. More...
void | CheckpointStreams ()
| Checkpoint streams. More...
void | CloseStreams ()
| Close all streams. More...
void | FreeAllStreams ()
| Free all streams - destroy them. More...

## Protected Member Functions
TBaseOutputHDF5Stream * | CreateNewOutputStream (TMatrixContainer &MatrixContainer, const TMatrixID SampledMatrixID, const char *HDF5_DatasetName, const TBaseOutputHDF5Stream::TReductionOperator ReductionOp, float *BufferToReuse=NULL)
| TOutputStreamContainer (const TOutputStreamContainer &)
| Copy constructor not allowed for public.
TOutputStreamContainer & | operator= (TOutputStreamContainer &)
| Operator = not allowed for public.

## Private Types
typedef map< TMatrixID, TBaseOutputHDF5Stream * > | TOutputStreamMap
| Output stream map.

## Private Attributes
TOutputStreamMap | OutputStreamContainer
| Map with output streams.

## Detailed Description

The output stream container maintains matrices used for sampling data. These may or may not require some scratch place or reuse temp matrices.

Definition at line 278 of file MatrixContainer.h.

## Constructor & Destructor Documentation

TOutputStreamContainer::~TOutputStreamContainer | ( |  | ) |
| virtual

Destructor

Definition at line 609 of file MatrixContainer.cpp.

## Member Function Documentation

void TOutputStreamContainer::AddStreamsIntoContainer | ( | TMatrixContainer & | MatrixContainer | ) |

Add all streams in simulation in the container, set all streams records here! Please note, the Matrixcontainer has to be populated before calling this routine.

Parameters

  [in] | MatrixContainer | - matrix container to link the steams with sampled matrices and sensor masks

Definition at line 622 of file MatrixContainer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void TOutputStreamContainer::CheckpointStreams | ( |  | ) |

Checkpoint streams without post-processing (flush to the file).

Definition at line 860 of file MatrixContainer.cpp.

Here is the caller graph for this function:

void TOutputStreamContainer::CloseStreams | ( |  | ) |

Close all streams (apply post-processing if necessary, flush data and close).

Definition at line 891 of file MatrixContainer.cpp.

Here is the caller graph for this function:

TBaseOutputHDF5Stream * TOutputStreamContainer::CreateNewOutputStream | ( | TMatrixContainer & | MatrixContainer,
|  | const TMatrixID | SampledMatrixID,
|  | const char * | HDF5_DatasetName,
|  | const TBaseOutputHDF5Stream::TReductionOperator | ReductionOp,
|  | float * | BufferToReuse = `NULL`
| ) |  |
| protected

Create a new output stream.

Parameters

  [in] | MatrixContainer | - name of the HDF5 dataset or group
  [in] | SampledMatrixID | - code id of the matrix
  [in] | HDF5_DatasetName | - name of the HDF5 dataset or group
  [in] | ReductionOp | - reduction operator
  [in] | BufferToReuse | - buffer to reuse

Returns
  new output stream with defined links.

Definition at line 934 of file MatrixContainer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void TOutputStreamContainer::CreateStreams | ( |  | ) |

Create all streams.

Definition at line 813 of file MatrixContainer.cpp.

Here is the caller graph for this function:

bool TOutputStreamContainer::empty | ( |  | ) | const
| inline

Is the container empty?

Definition at line 299 of file MatrixContainer.h.

void TOutputStreamContainer::FreeAllStreams | ( |  | ) |

Free all streams- destroy them.

Definition at line 906 of file MatrixContainer.cpp.

Here is the caller graph for this function:

TBaseOutputHDF5Stream& TOutputStreamContainer::operator[] | ( | const TMatrixID | MatrixID | ) |
| inline

Operator [].

Parameters

  [in] | MatrixID |

Returns
  Ouptut stream

Definition at line 310 of file MatrixContainer.h.

void TOutputStreamContainer::PostProcessStreams | ( |  | ) |

/// Post-process all streams and flush them to the file.

Definition at line 875 of file MatrixContainer.cpp.

Here is the caller graph for this function:

void TOutputStreamContainer::ReopenStreams | ( |  | ) |

Reopen all streams after restarting form checkpoint.

Definition at line 828 of file MatrixContainer.cpp.

Here is the caller graph for this function:

void TOutputStreamContainer::SampleStreams | ( |  | ) |

Sample all streams.

Definition at line 844 of file MatrixContainer.cpp.

Here is the caller graph for this function:

size_t TOutputStreamContainer::size | ( |  | ) | const
| inline

Get size of the container.

Definition at line 290 of file MatrixContainer.h.

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

- MatrixClasses/MatrixContainer.h
- MatrixClasses/MatrixContainer.cpp