libSplash
Public Member Functions | Static Public Member Functions | List of all members
splash::Domain Class Reference

#include <Domain.hpp>

Inheritance diagram for splash::Domain:
Inheritance graph
[legend]

Public Member Functions

 Domain ()
 
 Domain (Dimensions offset_, Dimensions size_)
 
uint32_t getDims () const
 
DimensionsgetSize ()
 
const Dimensions getSize () const
 
DimensionsgetOffset ()
 
const Dimensions getOffset () const
 
Dimensions getBack () const
 
bool operator== (Domain const &other) const
 
bool operator!= (Domain const &other) const
 
std::string toString () const
 

Static Public Member Functions

static bool testIntersection (const Domain &d1, const Domain &d2)
 

Detailed Description

Represents a (1-3)-dimensional logical domain or subdomain, e.g. a logical grid in a simulation code.

Definition at line 39 of file Domain.hpp.

Constructor & Destructor Documentation

◆ Domain() [1/2]

splash::Domain::Domain ( )
inline

Default constructor.

Definition at line 46 of file Domain.hpp.

◆ Domain() [2/2]

splash::Domain::Domain ( Dimensions  offset_,
Dimensions  size_ 
)
inline

Constructor.

Parameters
offset_Offset of this domain in the parent domain.
size_Size of this domain in every dimension.

Definition at line 59 of file Domain.hpp.

Member Function Documentation

◆ getBack()

Dimensions splash::Domain::getBack ( ) const
inline

Returns the last index of this domain which is the combination of its offset and size - 1

Returns
Last index of domain.

Definition at line 122 of file Domain.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDims()

uint32_t splash::Domain::getDims ( void  ) const
inline

Returns the number of dimensions of this domain.

Returns
Number of dimensions (1-3).

Definition at line 71 of file Domain.hpp.

Here is the call graph for this function:

◆ getOffset() [1/2]

Dimensions& splash::Domain::getOffset ( )
inline

Returns the offset/offset of this domain in the parent domain.

Returns
Offset of this domain.

Definition at line 101 of file Domain.hpp.

Here is the caller graph for this function:

◆ getOffset() [2/2]

const Dimensions splash::Domain::getOffset ( ) const
inline

Returns the offset/offset of this domain in the parent domain.

Returns
Offset of this domain.

Definition at line 111 of file Domain.hpp.

◆ getSize() [1/2]

Dimensions& splash::Domain::getSize ( )
inline

Returns the size of this domain in every dimension.

Returns
Size of this domain.

Definition at line 81 of file Domain.hpp.

Here is the caller graph for this function:

◆ getSize() [2/2]

const Dimensions splash::Domain::getSize ( ) const
inline

Returns the size of this domain in every dimension.

Returns
Size of this domain.

Definition at line 91 of file Domain.hpp.

◆ testIntersection()

static bool splash::Domain::testIntersection ( const Domain d1,
const Domain d2 
)
inlinestatic

Tests if two domains intersect.

Parameters
d1First domain.
d2Decond domain.
Returns
True if domains overlap, false otherwise.

Definition at line 156 of file Domain.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

std::string splash::Domain::toString ( ) const
inline

Returns a string representation.

Returns
String representation.

Definition at line 142 of file Domain.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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