World Ocean Simulation System (WOSS) library
woss::Sediment Class Reference

Surficial sediment geoacoustic parameters definitions. More...

#include <sediment-definitions.h>

Inheritance diagram for woss::Sediment:
Inheritance graph
Collaboration diagram for woss::Sediment:
Collaboration graph

Public Member Functions

 Sediment ()
 Sediment (const std::string &name, double velc, double vels, double dens, double attc, double atts, double bottom_depth=1.0)
 Sediment (const Sediment &copy)=default
 Sediment (Sediment &&tmp)=default
virtual ~Sediment ()=default
virtual std::unique_ptr< Sedimentcreate () const
virtual std::unique_ptr< Sedimentcreate (const std::string &name, double velc, double vels, double dens, double attc, double atts, double bottom_depth=1.0) const
virtual std::unique_ptr< Sedimentclone () const
SedimentsetType (const std::string &name)
SedimentsetVelocityC (double vel)
SedimentsetVelocityS (double vel)
SedimentsetDensity (double dens)
SedimentsetAttenuationC (double att)
SedimentsetAttenuationS (double att)
SedimentsetDepth (double bottom_depth)
Sedimentset (const std::string &name, double velc, double vels, double dens, double attc, double atts, double bottom_depth)
double getVelocityC () const
double getVelocityS () const
double getDensity () const
double getAttenuationC () const
double getAttenuationS () const
double getDepth () const
std::string getType () const
virtual bool isValid () const
virtual const std::string getStringValues () const
Sedimentoperator= (const Sediment &sed)=default
Sedimentoperator= (Sediment &&tmp)=default

Static Public Member Functions

static void setDebug (bool flag)

Protected Attributes

std::string type
double depth
double vel_c
double vel_s
double density
double att_c
double att_s

Static Protected Attributes

static bool debug = false

Friends

const Sediment operator+ (const Sediment &left, const Sediment &right)
const Sediment operator- (const Sediment &left, const Sediment &right)
const Sediment operator/ (const Sediment &left, const Sediment &right)
const Sediment operator* (const Sediment &left, const Sediment &right)
Sedimentoperator+= (Sediment &left, const Sediment &right)
Sedimentoperator-= (Sediment &left, const Sediment &right)
Sedimentoperator/= (Sediment &left, const Sediment &right)
Sedimentoperator*= (Sediment &left, const Sediment &right)
Sedimentoperator+= (Sediment &left, double right)
Sedimentoperator-= (Sediment &left, double right)
Sedimentoperator/= (Sediment &left, double right)
Sedimentoperator*= (Sediment &left, double right)
bool operator== (const Sediment &left, const Sediment &right)
bool operator!= (const Sediment &left, const Sediment &right)
const Sediment operator+ (const double left, const Sediment &right)
const Sediment operator- (const double left, const Sediment &right)
const Sediment operator/ (const double left, const Sediment &right)
const Sediment operator* (const double left, const Sediment &right)
const Sediment operator+ (const Sediment &left, double right)
const Sediment operator- (const Sediment &left, double right)
const Sediment operator/ (const Sediment &left, double right)
const Sediment operator* (const Sediment &left, double right)
std::ostream & operator<< (std::ostream &os, const Sediment &instance)

Detailed Description

Surficial sediment geoacoustic parameters definitions.

The Sediment class provide an interface for creating and manipulating surficialg eoacoustic parameters.

Constructor & Destructor Documentation

◆ Sediment() [1/4]

◆ Sediment() [2/4]

Sediment::Sediment ( const std::string & name,
double velc,
double vels,
double dens,
double attc,
double atts,
double bottom_depth = 1.0 )

Sediment constructor

Parameters
nametextual name
velccompressional wave velocity [m/s]
velsshear wave velocity [m/s]
denssediment density [g/cm^3 or user defined]
attccompressional wave attenuation [db/wavelength or user defined]
attsshear wave attenuation [db/wavelength or user defined]
bottom_depthbottom depth [m]

References att_c, att_s, density, depth, type, vel_c, and vel_s.

◆ Sediment() [3/4]

woss::Sediment::Sediment ( const Sediment & copy)
default

References Sediment().

Here is the call graph for this function:

◆ Sediment() [4/4]

woss::Sediment::Sediment ( Sediment && tmp)
default

References Sediment().

Here is the call graph for this function:

◆ ~Sediment()

virtual woss::Sediment::~Sediment ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual std::unique_ptr< Sediment > woss::Sediment::clone ( ) const
inlinevirtual

Sediment virtual factory method

Returns
std::unique_ptr to a heap-created copy of this instance

Referenced by woss::WossDbManager::setCustomSediment().

◆ create() [1/2]

virtual std::unique_ptr< Sediment > woss::Sediment::create ( ) const
inlinevirtual

Sediment virtual factory method

Returns
a heap-created invalid Sediment object

◆ create() [2/2]

virtual std::unique_ptr< Sediment > woss::Sediment::create ( const std::string & name,
double velc,
double vels,
double dens,
double attc,
double atts,
double bottom_depth = 1.0 ) const
inlinevirtual

Sediment virtual factory method

Parameters
nametextual name
velccompressional wave velocity [m/s]
velsshear wave velocity [m/s]
denssediment density [g/cm^3 or user defined]
attccompressional wave attenuation [db/wavelength or user defined]
attsshear wave attenuation [db/wavelength or user defined]
bottom_depthbottom depth [m]
Returns
std::unique_ptr to a heap-created Sediment object

◆ getAttenuationC()

double woss::Sediment::getAttenuationC ( ) const
inline

Gets compressional wave attenuation

Returns
attenuation [db/wavelength or user defined]

References att_c.

◆ getAttenuationS()

double woss::Sediment::getAttenuationS ( ) const
inline

Gets shear wave attenuation

Returns
attenuation [db/wavelength or user defined]

References att_s.

◆ getDensity()

double woss::Sediment::getDensity ( ) const
inline

Gets sediment density

Returns
density [g/cm^3 or user defined]

References density.

◆ getDepth()

double woss::Sediment::getDepth ( ) const
inline

Gets bottom depth

Returns
depth [m]

References depth.

◆ getStringValues()

const std::string Sediment::getStringValues ( ) const
virtual

Gets geoacoustic parameters in a formatted fashion

Returns
formatted string

References att_c, att_s, density, vel_c, and vel_s.

◆ getType()

std::string woss::Sediment::getType ( ) const
inline

Gets sediment type name

Returns
type

References type.

Referenced by WossUnitTest::testSediment().

◆ getVelocityC()

double woss::Sediment::getVelocityC ( ) const
inline

Gets compressional wave velocity

Returns
velocity [m/s]

References vel_c.

◆ getVelocityS()

double woss::Sediment::getVelocityS ( ) const
inline

Gets shear wave velocity

Returns
velocity [m/s]

References vel_s.

◆ isValid()

virtual bool woss::Sediment::isValid ( ) const
inlinevirtual

Checks the validity of geoacoustic parameters provided

Returns
true if Sediment is valid, false otherwise

References att_c, att_s, density, vel_c, and vel_s.

◆ operator=() [1/2]

Sediment & woss::Sediment::operator= ( const Sediment & sed)
default

References Sediment().

Here is the call graph for this function:

◆ operator=() [2/2]

Sediment & woss::Sediment::operator= ( Sediment && tmp)
default

References Sediment().

Here is the call graph for this function:

◆ set()

Sediment & woss::Sediment::set ( const std::string & name,
double velc,
double vels,
double dens,
double attc,
double atts,
double bottom_depth )
inline

Sets all parameters at one.

Parameters
nametextual name
velccompressional wave velocity [m/s]
velsshear wave velocity [m/s]
denssediment density [g/cm^3 or user defined]
attccompressional wave attenuation [db/wavelength or user defined]
attsshear wave attenuation [db/wavelength or user defined]
bottom_depthbottom depth ( > 0 ) [m]
Returns
reference to *this

References att_c, att_s, density, depth, Sediment(), type, vel_c, and vel_s.

Here is the call graph for this function:

◆ setAttenuationC()

Sediment & woss::Sediment::setAttenuationC ( double att)
inline

Sets compressional wave attenuation

Parameters
attattenuation [db/wavelength or user defined]
Returns
reference to *this

References att_c, and Sediment().

Here is the call graph for this function:

◆ setAttenuationS()

Sediment & woss::Sediment::setAttenuationS ( double att)
inline

Sets shear wave attenuation

Parameters
attattenuation [db/wavelength or user defined]
Returns
reference to *this

References att_s, and Sediment().

Here is the call graph for this function:

◆ setDebug()

void woss::Sediment::setDebug ( bool flag)
inlinestatic

Sets debug for the whole class

Parameters
flagdebug value

References debug.

◆ setDensity()

Sediment & woss::Sediment::setDensity ( double dens)
inline

Sets sediment density

Parameters
densdensity [g/cm^3 or user defined]
Returns
reference to *this

References density, and Sediment().

Here is the call graph for this function:

◆ setDepth()

Sediment & woss::Sediment::setDepth ( double bottom_depth)
inline

Sets bottom depth

Parameters
bottom_depthpositive depth [m/s]
Returns
reference to *this

References depth, and Sediment().

Here is the call graph for this function:

◆ setType()

Sediment & woss::Sediment::setType ( const std::string & name)
inline

Sets textual type name

Parameters
namestring name
Returns
reference to *this

References Sediment(), and type.

Here is the call graph for this function:

◆ setVelocityC()

Sediment & woss::Sediment::setVelocityC ( double vel)
inline

Sets compressional wave velocity

Parameters
velvelocity [m/s]
Returns
reference to *this

References Sediment(), and vel_c.

Here is the call graph for this function:

◆ setVelocityS()

Sediment & woss::Sediment::setVelocityS ( double vel)
inline

Sets shear wave velocity

Parameters
velvelocity [m/s]
Returns
reference to *this

References Sediment(), and vel_s.

Here is the call graph for this function:

◆ operator!=

bool operator!= ( const Sediment & left,
const Sediment & right )
friend

Inequality operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
true if left != right, false otherwise

References att_c, att_s, density, Sediment(), vel_c, and vel_s.

◆ operator* [1/3]

const Sediment operator* ( const double left,
const Sediment & right )
friend

Scalar multiplication operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References Sediment().

◆ operator* [2/3]

const Sediment operator* ( const Sediment & left,
const Sediment & right )
friend

Multiplication operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References att_c, att_s, density, Sediment(), type, vel_c, and vel_s.

◆ operator* [3/3]

const Sediment operator* ( const Sediment & left,
double right )
friend

Scalar multiplication operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References Sediment().

◆ operator*= [1/2]

Sediment & operator*= ( Sediment & left,
const Sediment & right )
friend

Compound assignment multiplication operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

References Sediment().

◆ operator*= [2/2]

Sediment & operator*= ( Sediment & left,
double right )
friend

Compound assignment multiplication operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

References Sediment().

◆ operator+ [1/3]

const Sediment operator+ ( const double left,
const Sediment & right )
friend

Scalar sum operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References Sediment().

◆ operator+ [2/3]

const Sediment operator+ ( const Sediment & left,
const Sediment & right )
friend

Sum operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References att_c, att_s, density, Sediment(), type, vel_c, and vel_s.

◆ operator+ [3/3]

const Sediment operator+ ( const Sediment & left,
double right )
friend

Scalar sum operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References Sediment().

◆ operator+= [1/2]

Sediment & operator+= ( Sediment & left,
const Sediment & right )
friend

Compound assignment sum operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

References Sediment().

◆ operator+= [2/2]

Sediment & operator+= ( Sediment & left,
double right )
friend

Compound assignment sum operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

References Sediment().

◆ operator- [1/3]

const Sediment operator- ( const double left,
const Sediment & right )
friend

Scalar subtraction operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References Sediment().

◆ operator- [2/3]

const Sediment operator- ( const Sediment & left,
const Sediment & right )
friend

Subtraction operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References att_c, att_s, density, Sediment(), type, vel_c, and vel_s.

◆ operator- [3/3]

const Sediment operator- ( const Sediment & left,
double right )
friend

Scalar subtraction operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References Sediment().

◆ operator-= [1/2]

Sediment & operator-= ( Sediment & left,
const Sediment & right )
friend

Compound assignment subtraction operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

References Sediment().

◆ operator-= [2/2]

Sediment & operator-= ( Sediment & left,
double right )
friend

Compound assignment subtraction operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

References Sediment().

◆ operator/ [1/3]

const Sediment operator/ ( const double left,
const Sediment & right )
friend

Scalar division operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References Sediment().

◆ operator/ [2/3]

const Sediment operator/ ( const Sediment & left,
const Sediment & right )
friend

Division operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References att_c, att_s, density, Sediment(), type, vel_c, and vel_s.

◆ operator/ [3/3]

const Sediment operator/ ( const Sediment & left,
double right )
friend

Scalar division operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

References Sediment().

◆ operator/= [1/2]

Sediment & operator/= ( Sediment & left,
const Sediment & right )
friend

Compound assignment division operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

References Sediment().

◆ operator/= [2/2]

Sediment & operator/= ( Sediment & left,
double right )
friend

Compound assignment division operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

References Sediment().

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Sediment & instance )
friend

<< operator

Parameters
osleft operand ostream reference
instanceright operand const Sediment reference
Returns
os reference after the operation

References att_c, att_s, density, Sediment(), type, vel_c, and vel_s.

◆ operator==

bool operator== ( const Sediment & left,
const Sediment & right )
friend

Equality operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
true if left == right, false otherwise

References att_c, att_s, density, Sediment(), vel_c, and vel_s.

Member Data Documentation

◆ att_c

◆ att_s

◆ debug

bool Sediment::debug = false
staticprotected

Debug flag

Referenced by setDebug().

◆ density

◆ depth

double woss::Sediment::depth
protected

Bottom depth. Used for shear wave velocity calculations [m]

Referenced by getDepth(), Sediment(), Sediment(), set(), and setDepth().

◆ type

◆ vel_c

◆ vel_s


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