queso-0.53.0
Protected Attributes | List of all members
QUESO::FuncTimesFunc1D1DFunction Class Reference

Class for multiplication of a one-dimensional function by another. More...

#include <1D1DFunction.h>

Inheritance diagram for QUESO::FuncTimesFunc1D1DFunction:
Inheritance graph
[legend]
Collaboration diagram for QUESO::FuncTimesFunc1D1DFunction:
Collaboration graph
[legend]

Public Member Functions

Constructor/Destructor methods
 FuncTimesFunc1D1DFunction (const Base1D1DFunction &func1, const Base1D1DFunction &func2)
 Default constructor. More...
 
 ~FuncTimesFunc1D1DFunction ()
 Destructor. More...
 
Mathematical methods
double value (double domainValue) const
 Returns the value of the multiplication of a function func1 by another function func2 at the point domainValue, i.e. returnValue = func1(domainValue)*func2(domainValue) . More...
 
double deriv (double domainValue) const
 TODO: Returns the value of the derivative of the function func1 by another function func2 at the point domainValue. More...
 
- Public Member Functions inherited from QUESO::Base1D1DFunction
 Base1D1DFunction (double minDomainValue, double maxDomainValue)
 Default constructor. More...
 
virtual ~Base1D1DFunction ()
 Destructor. More...
 
double minDomainValue () const
 Returns the minimum value of the domain of the (one-dimensional) function. More...
 
double maxDomainValue () const
 Returns the maximum value of the domain of the (one-dimensional) function. More...
 
virtual double multiplyAndIntegrate (const Base1D1DFunction &func, unsigned int quadratureOrder, double *resultWithMultiplicationByTAsWell) const
 TODO: Multiplies this function with function, and integrates it numerically. See template specialization. More...
 

Protected Attributes

const Base1D1DFunctionm_func1
 
const Base1D1DFunctionm_func2
 
- Protected Attributes inherited from QUESO::Base1D1DFunction
double m_minDomainValue
 
double m_maxDomainValue
 

Detailed Description

Class for multiplication of a one-dimensional function by another.

This class implements the multiplication of a generic one-dimensional function by another (both functions may be of any type of functions derived from Base1D1DFunction).

Definition at line 462 of file 1D1DFunction.h.

Constructor & Destructor Documentation

QUESO::FuncTimesFunc1D1DFunction::FuncTimesFunc1D1DFunction ( const Base1D1DFunction func1,
const Base1D1DFunction func2 
)

Default constructor.

Definition at line 647 of file 1D1DFunction.C.

650  :
651  Base1D1DFunction(std::max(func1.minDomainValue(),func2.minDomainValue()),std::min(func1.maxDomainValue(),func2.maxDomainValue())),
652  m_func1(func1),
653  m_func2(func2)
654 {
655 }
const Base1D1DFunction & m_func2
Definition: 1D1DFunction.h:492
Base1D1DFunction(double minDomainValue, double maxDomainValue)
Default constructor.
Definition: 1D1DFunction.C:33
const Base1D1DFunction & m_func1
Definition: 1D1DFunction.h:491
QUESO::FuncTimesFunc1D1DFunction::~FuncTimesFunc1D1DFunction ( )

Destructor.

Definition at line 657 of file 1D1DFunction.C.

658 {
659 }

Member Function Documentation

double QUESO::FuncTimesFunc1D1DFunction::deriv ( double  domainValue) const
virtual

TODO: Returns the value of the derivative of the function func1 by another function func2 at the point domainValue.

Todo:
Please, implement me!
This method objective requires clarification: are we calculating either (func1*func2)' or func1'*func2'?

Implements QUESO::Base1D1DFunction.

Definition at line 672 of file 1D1DFunction.C.

References QUESO::Base1D1DFunction::m_maxDomainValue, QUESO::Base1D1DFunction::m_minDomainValue, queso_not_implemented, queso_require_msg, and value().

673 {
674  double value = 0.;
675 
676  if ((domainValue < m_minDomainValue) || (domainValue > m_maxDomainValue)) {
677  std::cerr << "In FuncTimes1D1DFunction::deriv()"
678  << ": requested x (" << domainValue
679  << ") is out of the interval (" << m_minDomainValue
680  << ", " << m_maxDomainValue
681  << ")"
682  << std::endl;
683  }
684 
685  queso_require_msg(!((domainValue < m_minDomainValue) || (domainValue > m_maxDomainValue)), "x out of range");
686 
688 
689  return value;
690 }
double value(double domainValue) const
Returns the value of the multiplication of a function func1 by another function func2 at the point do...
Definition: 1D1DFunction.C:662
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69
#define queso_not_implemented()
Definition: asserts.h:56
double QUESO::FuncTimesFunc1D1DFunction::value ( double  domainValue) const
virtual

Returns the value of the multiplication of a function func1 by another function func2 at the point domainValue, i.e. returnValue = func1(domainValue)*func2(domainValue) .

This function calls the value() method of the both functions and multiplies their return value with one another.

Implements QUESO::Base1D1DFunction.

Definition at line 662 of file 1D1DFunction.C.

References m_func1, m_func2, and QUESO::Base1D1DFunction::value().

Referenced by deriv().

663 {
664  double value = 0.;
665 
666  value += m_func1.value(domainValue)*m_func2.value(domainValue);
667 
668  return value;
669 }
double value(double domainValue) const
Returns the value of the multiplication of a function func1 by another function func2 at the point do...
Definition: 1D1DFunction.C:662
const Base1D1DFunction & m_func2
Definition: 1D1DFunction.h:492
virtual double value(double domainValue) const =0
Returns the value of the (one-dimensional) function. See template specialization. ...
const Base1D1DFunction & m_func1
Definition: 1D1DFunction.h:491

Member Data Documentation

const Base1D1DFunction& QUESO::FuncTimesFunc1D1DFunction::m_func1
protected

Definition at line 491 of file 1D1DFunction.h.

Referenced by value().

const Base1D1DFunction& QUESO::FuncTimesFunc1D1DFunction::m_func2
protected

Definition at line 492 of file 1D1DFunction.h.

Referenced by value().


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

Generated on Thu Jun 11 2015 13:52:35 for queso-0.53.0 by  doxygen 1.8.5