All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ConstScalarFunction Class Reference

#include <ScalarFunctionsImpl.h>

Inheritance diagram for ConstScalarFunction:
Collaboration diagram for ConstScalarFunction:

Public Member Functions

 ConstScalarFunction (const doublereal v)
virtual ~ConstScalarFunction (void)
virtual doublereal operator() (const doublereal x) const
virtual doublereal ComputeDiff (const doublereal t, const integer order=1) const
- Public Member Functions inherited from DifferentiableScalarFunction
virtual ~DifferentiableScalarFunction ()
- Public Member Functions inherited from BasicScalarFunction
virtual ~BasicScalarFunction ()

Private Attributes

const doublereal y

Detailed Description

Definition at line 57 of file ScalarFunctionsImpl.h.

Constructor & Destructor Documentation

ConstScalarFunction::ConstScalarFunction ( const doublereal  v)

Definition at line 143 of file ScalarFunctionsImpl.cc.

References NO_OP.

144 : y(v)
145 {
146  NO_OP;
147 }
#define NO_OP
Definition: myassert.h:74
ConstScalarFunction::~ConstScalarFunction ( void  )

Definition at line 149 of file ScalarFunctionsImpl.cc.

References NO_OP.

150 {
151  NO_OP;
152 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

doublereal ConstScalarFunction::ComputeDiff ( const doublereal  t,
const integer  order = 1 
) const

Implements DifferentiableScalarFunction.

Definition at line 161 of file ScalarFunctionsImpl.cc.

References ASSERTMSGBREAK, and operator()().

162 {
163  ASSERTMSGBREAK(order >=0, "Error in ConstScalarFunction::ComputeDiff, order<0");
164  switch (order) {
165  case 0:
166  return this->operator()(x);
167  break;
168  default:
169  return 0;
170  break;
171  }
172 }
#define ASSERTMSGBREAK(expr, msg)
Definition: myassert.h:222
enum @55 order
virtual doublereal operator()(const doublereal x) const

Here is the call graph for this function:

doublereal ConstScalarFunction::operator() ( const doublereal  x) const

Implements DifferentiableScalarFunction.

Definition at line 155 of file ScalarFunctionsImpl.cc.

References y.

Referenced by ComputeDiff().

156 {
157  return y;
158 }

Member Data Documentation

const doublereal ConstScalarFunction::y

Definition at line 59 of file ScalarFunctionsImpl.h.

Referenced by operator()().

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