kspaceFirstOrder3D-OMP  1.2
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
DimensionSizes Struct Reference

Structure with 4D dimension sizes (3 in space and 1 in time). More...

#include <DimensionSizes.h>

Public Member Functions

 DimensionSizes ()
 Default constructor.
 
 DimensionSizes (size_t x, size_t y, size_t z, size_t t=0)
 Constructor. More...
 
size_t nElements () const
 Get the number of elements, in 3D only spatial domain, in 4D with time. More...
 
bool is3D () const
 Does the object include spatial dimensions only? More...
 
bool is4D () const
 Does the object include spatial and temporal dimensions? More...
 
bool operator== (const DimensionSizes &other) const
 Operator ==. More...
 
bool operator!= (const DimensionSizes &other) const
 Operator !=. More...
 

Public Attributes

size_t nx
 Number of elements in the x direction.
 
size_t ny
 Number of elements in the y direction.
 
size_t nz
 Number of elements in the z direction.
 
size_t nt
 Number of time steps (for time series datasets).
 

Friends

DimensionSizes operator- (const DimensionSizes &op1, const DimensionSizes &op2)
 Operator -. More...
 

Detailed Description

Structure with 4D dimension sizes (3 in space and 1 in time). The structure can be used for 3D (the time is then set to 1).
The structure contains only POD, so no C++ stuff is necessary.

Definition at line 66 of file DimensionSizes.h.

Constructor & Destructor Documentation

◆ DimensionSizes()

DimensionSizes::DimensionSizes ( size_t  x,
size_t  y,
size_t  z,
size_t  t = 0 
)
inline

Constructor.

Parameters
[in]x,y,z,t- Three spatial dimensions and time.

Definition at line 76 of file DimensionSizes.h.

Member Function Documentation

◆ is3D()

bool DimensionSizes::is3D ( ) const
inline
Returns
true if the dimensions are 3D.

Definition at line 95 of file DimensionSizes.h.

◆ is4D()

bool DimensionSizes::is4D ( ) const
inline
Returns
true if the dimensions are 4D.

Definition at line 104 of file DimensionSizes.h.

◆ nElements()

size_t DimensionSizes::nElements ( ) const
inline

Get element count, in 3D only spatial domain, in 4D with time.

Returns
the number of elements the domain holds.

Definition at line 86 of file DimensionSizes.h.

◆ operator!=()

bool DimensionSizes::operator!= ( const DimensionSizes other) const
inline
Parameters
[in]other- the second operand to compare with.
Returns
true if !=

Definition at line 124 of file DimensionSizes.h.

◆ operator==()

bool DimensionSizes::operator== ( const DimensionSizes other) const
inline
Parameters
[in]other- The second operand to compare with.
Returns
true if the dimension sizes are equal.

Definition at line 114 of file DimensionSizes.h.

Friends And Related Function Documentation

◆ operator-

DimensionSizes operator- ( const DimensionSizes op1,
const DimensionSizes op2 
)
friend

Get the size of the cube defined by two corners.

Parameters
[in]op1- Usually bottom right corner.
[in]op2- Usually top left corner.
Returns
the size of the inner cuboid

Definition at line 138 of file DimensionSizes.h.


The documentation for this struct was generated from the following file: