IFEM  90A354
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
PressureField Class Reference

Traction field based on a given scalar pressure function. More...

#include <TractionField.h>

Inheritance diagram for PressureField:
Inheritance graph
[legend]
Collaboration diagram for PressureField:
Collaboration graph
[legend]

Public Member Functions

 PressureField (Real p, int dir=0)
 Constructor initializing a constant pressure field. More...
 
 PressureField (const RealFunc *p, int dir=0)
 Constructor initializing the scalar pressure field function. More...
 
 PressureField (const RealFunc *p, const VecFunc *dir)
 Constructor initializing the scalar pressure field function. More...
 
virtual ~PressureField ()
 The destructor frees the scalar and vector field functions.
 
virtual bool isNormalPressure () const
 Returns whether the traction is always normal to the face or not.
 
virtual bool isZero () const
 Returns whether the function is identically zero or not.
 
virtual Vec3 deriv (const Vec3 &x, const Vec3 &n) const
 Returns the time-derivative of the function. More...
 
- Public Member Functions inherited from TractionFunc
virtual Vec3 timeDerivative (const Vec3 &, const Vec3 &) const
 Returns the time-derivative of the function.
 
- Public Member Functions inherited from utl::Function2< Vec3, Vec3 >
virtual ~Function2 ()
 Empty destructor.
 
Vec3 operator() (const Vec3 &x, const Vec3 &y) const
 Operator returning the function value for the given arguments.
 

Protected Member Functions

virtual Vec3 evaluate (const Vec3 &x, const Vec3 &n) const
 Evaluates the traction field function at the specified point. More...
 
- Protected Member Functions inherited from utl::Function2< Vec3, Vec3 >
 Function2 ()
 The constructor is protected to allow sub-class instances only.
 

Private Attributes

const RealFuncpressure
 Scalar field to derive the traction field from.
 
char pdir
 The global pressure direction (0...3)
 
const VecFuncpdfn
 Varying global pressure direction.
 

Additional Inherited Members

- Public Types inherited from utl::Function2< Vec3, Vec3 >
typedef Vec3 Input
 Input type.
 
typedef Vec3 Output
 Output type.
 

Detailed Description

Traction field based on a given scalar pressure function.

This class defines an explicit traction field function based on a specified scalar pressure function and a traction direction. The traction direction can either be one of the global coordinate axes, the surface normal vector (water pressure), or it can also be an arbitrary spatial and/or temporal function (the class member pdfn), which must evaluate to a vector of unit length.

Constructor & Destructor Documentation

◆ PressureField() [1/3]

PressureField::PressureField ( Real  p,
int  dir = 0 
)
explicit

Constructor initializing a constant pressure field.

Parameters
[in]pThe constant pressure value
[in]dirThe global direction the pressure is acting in

References pressure.

◆ PressureField() [2/3]

PressureField::PressureField ( const RealFunc p,
int  dir = 0 
)
inlineexplicit

Constructor initializing the scalar pressure field function.

Parameters
[in]pThe scalar field defining the spatial pressure distribution
[in]dirThe global direction the pressure is acting in

◆ PressureField() [3/3]

PressureField::PressureField ( const RealFunc p,
const VecFunc dir 
)
inline

Constructor initializing the scalar pressure field function.

Parameters
[in]pThe scalar field defining the spatial pressure distribution
[in]dirThe global direction the pressure is acting in

Member Function Documentation

◆ deriv()

Vec3 PressureField::deriv ( const Vec3 x,
const Vec3 n 
) const
virtual

Returns the time-derivative of the function.

Parameters
[in]xGlobal coordinates of evaluation point
[in]nOutward-directed unit normal vector at evaluation point

References utl::SpatialFunction< Result >::deriv(), Vec3::normalize(), pdfn, pdir, and pressure.

◆ evaluate()

Vec3 PressureField::evaluate ( const Vec3 x,
const Vec3 n 
) const
protectedvirtual

Evaluates the traction field function at the specified point.

Parameters
[in]xGlobal coordinates of evaluation point
[in]nOutward-directed unit normal vector at evaluation point

Implements utl::Function2< Vec3, Vec3 >.

References Vec3::normalize(), pdfn, pdir, and pressure.


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