oomph::SolutionFunctorBase Class Referenceabstract

#include <oomph_utilities.h>

+ Inheritance diagram for oomph::SolutionFunctorBase:

Public Types

typedef double(* TimeSpaceToDoubleFctPt) (const double &t, const Vector< double > &x)
 General function of space and time which returns a double. More...
 
typedef Vector< double >(* TimeSpaceToDoubleVectFctPt) (const double &t, const Vector< double > &x)
 General function of space and time which returns a vector of doubles. More...
 
typedef Vector< double >(* TimeSpaceValueToDoubleVectFctPt) (const double &t, const Vector< double > &x, const Vector< double > &u)
 

Public Member Functions

virtual ~SolutionFunctorBase ()
 Virtual destructor. More...
 
virtual Vector< doubleoperator() (const double &t, const Vector< double > &x) const =0
 Call the function. More...
 
virtual Vector< doublederivative (const double &t, const Vector< double > &x, const Vector< double > &u) const =0
 Call the derivative function. More...
 
virtual void jacobian (const double &t, const Vector< double > &x, const Vector< double > &u, DenseMatrix< double > &jacobian) const
 
virtual bool have_jacobian () const
 Is a jacobian function implemented? More...
 
virtual void initialise_from_problem (const Problem *problem_pt)
 Overload to grab data from the problem. More...
 

Detailed Description

Function base class for exact solutions/initial conditions/boundary conditions. This is needed so that we can have solutions that depend on problem parameters with resorting to global variables.

Member Typedef Documentation

◆ TimeSpaceToDoubleFctPt

typedef double(* oomph::SolutionFunctorBase::TimeSpaceToDoubleFctPt) (const double &t, const Vector< double > &x)

General function of space and time which returns a double.

◆ TimeSpaceToDoubleVectFctPt

typedef Vector<double>(* oomph::SolutionFunctorBase::TimeSpaceToDoubleVectFctPt) (const double &t, const Vector< double > &x)

General function of space and time which returns a vector of doubles.

◆ TimeSpaceValueToDoubleVectFctPt

typedef Vector<double>(* oomph::SolutionFunctorBase::TimeSpaceValueToDoubleVectFctPt) (const double &t, const Vector< double > &x, const Vector< double > &u)

General function of time, space and a value vector which returns a vector of doubles.

Constructor & Destructor Documentation

◆ ~SolutionFunctorBase()

virtual oomph::SolutionFunctorBase::~SolutionFunctorBase ( )
inlinevirtual

Virtual destructor.

1127 {}

Member Function Documentation

◆ derivative()

virtual Vector<double> oomph::SolutionFunctorBase::derivative ( const double t,
const Vector< double > &  x,
const Vector< double > &  u 
) const
pure virtual

◆ have_jacobian()

virtual bool oomph::SolutionFunctorBase::have_jacobian ( ) const
inlinevirtual

Is a jacobian function implemented?

1154  {
1155  return false;
1156  }

Referenced by oomph::IMRODEElement::fill_in_contribution_to_jacobian(), and oomph::ODEElement::fill_in_contribution_to_jacobian().

◆ initialise_from_problem()

virtual void oomph::SolutionFunctorBase::initialise_from_problem ( const Problem problem_pt)
inlinevirtual

Overload to grab data from the problem.

1159 {}

◆ jacobian()

virtual void oomph::SolutionFunctorBase::jacobian ( const double t,
const Vector< double > &  x,
const Vector< double > &  u,
DenseMatrix< double > &  jacobian 
) const
inlinevirtual

The derivatives of the derivative function with respect to u (note that this is not quite the jacobian of the residuals for an ODE problem defined by this solution: you also need the time derivative part there). Broken virtual function because not often needed.

1146  {
1147  std::string err = "No Jacobian function implemented";
1148  throw OomphLibError(
1150  }
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().

Referenced by oomph::IMRODEElement::fill_in_contribution_to_jacobian(), and oomph::ODEElement::fill_in_contribution_to_jacobian().

◆ operator()()

virtual Vector<double> oomph::SolutionFunctorBase::operator() ( const double t,
const Vector< double > &  x 
) const
pure virtual

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