Interface for scalar response functions. More...
#include <Albany_ScalarResponseFunction.hpp>
Public Member Functions | |
ScalarResponseFunction (const Teuchos::RCP< const Epetra_Comm > &comm_) | |
Default constructor. | |
virtual | ~ScalarResponseFunction () |
Destructor. | |
virtual unsigned int | numResponses () const =0 |
Get the number of responses. | |
virtual Teuchos::RCP< const Epetra_Comm > | getComm () const |
Get the comm. | |
virtual void | evaluateGradient (const double current_time, const Epetra_Vector *xdot, const Epetra_Vector *xdotdot, const Epetra_Vector &x, const Teuchos::Array< ParamVec > &p, ParamVec *deriv_p, Epetra_Vector *g, Epetra_MultiVector *dg_dx, Epetra_MultiVector *dg_dxdot, Epetra_MultiVector *dg_dxdotdot, Epetra_MultiVector *dg_dp)=0 |
Evaluate gradient = dg/dx, dg/dxdot, dg/dp. | |
Implementation of AbstractResponseFunction virtual methods | |
virtual void | setup () |
Setup response function. | |
virtual bool | isScalarResponse () const |
Is this response function "scalar" valued, i.e., has a replicated local response map. | |
virtual Teuchos::RCP < Epetra_Operator > | createGradientOp () const |
Create operator for gradient. | |
virtual Teuchos::RCP< const Epetra_Map > | responseMap () const |
Get the map associate with this response. | |
virtual void | evaluateDerivative (const double current_time, const Epetra_Vector *xdot, const Epetra_Vector *xdotdot, const Epetra_Vector &x, const Teuchos::Array< ParamVec > &p, ParamVec *deriv_p, Epetra_Vector *g, const EpetraExt::ModelEvaluator::Derivative &dg_dx, const EpetraExt::ModelEvaluator::Derivative &dg_dxdot, const EpetraExt::ModelEvaluator::Derivative &dg_dxdotdot, const EpetraExt::ModelEvaluator::Derivative &dg_dp) |
Evaluate derivative dg/dx, dg/dxdot, dg/dp. | |
Protected Attributes | |
Teuchos::RCP< const Epetra_Comm > | comm |
Comm for forming response map. | |
Private Member Functions | |
ScalarResponseFunction (const ScalarResponseFunction &) | |
Private to prohibit copying. | |
ScalarResponseFunction & | operator= (const ScalarResponseFunction &) |
Private to prohibit copying. |
Interface for scalar response functions.
Implements a few methods of AbstractResponseFunction specifically for "scalar" valued responses, i.e., those that just return a few values. In this case, the derivative is a multi-vector and the response map is simpler.
Definition at line 22 of file Albany_ScalarResponseFunction.hpp.
Albany::ScalarResponseFunction::ScalarResponseFunction | ( | const Teuchos::RCP< const Epetra_Comm > & | comm_ | ) | [inline] |
Default constructor.
Definition at line 27 of file Albany_ScalarResponseFunction.hpp.
virtual Albany::ScalarResponseFunction::~ScalarResponseFunction | ( | ) | [inline, virtual] |
Destructor.
Definition at line 31 of file Albany_ScalarResponseFunction.hpp.
Albany::ScalarResponseFunction::ScalarResponseFunction | ( | const ScalarResponseFunction & | ) | [private] |
Private to prohibit copying.
virtual unsigned int Albany::ScalarResponseFunction::numResponses | ( | ) | const [pure virtual] |
Get the number of responses.
Implemented in QCAD::SaddleValueResponseFunction, Albany::AggregateScalarResponseFunction, Albany::FieldManagerScalarResponseFunction, Albany::SolutionAverageResponseFunction, Albany::SolutionFileResponseFunction< VectorNorm >, Albany::SolutionMaxValueResponseFunction, Albany::SolutionTwoNormResponseFunction, and Albany::SolutionValuesResponseFunction.
virtual Teuchos::RCP<const Epetra_Comm> Albany::ScalarResponseFunction::getComm | ( | ) | const [inline, virtual] |
Get the comm.
Definition at line 37 of file Albany_ScalarResponseFunction.hpp.
virtual void Albany::ScalarResponseFunction::evaluateGradient | ( | const double | current_time, | |
const Epetra_Vector * | xdot, | |||
const Epetra_Vector * | xdotdot, | |||
const Epetra_Vector & | x, | |||
const Teuchos::Array< ParamVec > & | p, | |||
ParamVec * | deriv_p, | |||
Epetra_Vector * | g, | |||
Epetra_MultiVector * | dg_dx, | |||
Epetra_MultiVector * | dg_dxdot, | |||
Epetra_MultiVector * | dg_dxdotdot, | |||
Epetra_MultiVector * | dg_dp | |||
) | [pure virtual] |
Evaluate gradient = dg/dx, dg/dxdot, dg/dp.
Implemented in QCAD::SaddleValueResponseFunction, Albany::AggregateScalarResponseFunction, Albany::FieldManagerScalarResponseFunction, Albany::SolutionAverageResponseFunction, Albany::SolutionFileResponseFunction< VectorNorm >, Albany::SolutionMaxValueResponseFunction, Albany::SolutionTwoNormResponseFunction, and Albany::SolutionValuesResponseFunction.
virtual void Albany::ScalarResponseFunction::setup | ( | ) | [inline, virtual] |
Setup response function.
Implements Albany::AbstractResponseFunction.
Reimplemented in Albany::AggregateScalarResponseFunction, and Albany::SolutionValuesResponseFunction.
Definition at line 93 of file Albany_ScalarResponseFunction.hpp.
virtual bool Albany::ScalarResponseFunction::isScalarResponse | ( | ) | const [inline, virtual] |
Is this response function "scalar" valued, i.e., has a replicated local response map.
Implements Albany::AbstractResponseFunction.
Definition at line 99 of file Albany_ScalarResponseFunction.hpp.
Teuchos::RCP< Epetra_Operator > Albany::ScalarResponseFunction::createGradientOp | ( | ) | const [virtual] |
Create operator for gradient.
Here we just throw an error. We could actually support this a coupled of ways if we wanted to.
Implements Albany::AbstractResponseFunction.
Definition at line 23 of file Albany_ScalarResponseFunction.cpp.
Teuchos::RCP< const Epetra_Map > Albany::ScalarResponseFunction::responseMap | ( | ) | const [virtual] |
Get the map associate with this response.
Implements Albany::AbstractResponseFunction.
Definition at line 13 of file Albany_ScalarResponseFunction.cpp.
void Albany::ScalarResponseFunction::evaluateDerivative | ( | const double | current_time, | |
const Epetra_Vector * | xdot, | |||
const Epetra_Vector * | xdotdot, | |||
const Epetra_Vector & | x, | |||
const Teuchos::Array< ParamVec > & | p, | |||
ParamVec * | deriv_p, | |||
Epetra_Vector * | g, | |||
const EpetraExt::ModelEvaluator::Derivative & | dg_dx, | |||
const EpetraExt::ModelEvaluator::Derivative & | dg_dxdot, | |||
const EpetraExt::ModelEvaluator::Derivative & | dg_dxdotdot, | |||
const EpetraExt::ModelEvaluator::Derivative & | dg_dp | |||
) | [virtual] |
Evaluate derivative dg/dx, dg/dxdot, dg/dp.
Implements Albany::AbstractResponseFunction.
Definition at line 34 of file Albany_ScalarResponseFunction.cpp.
ScalarResponseFunction& Albany::ScalarResponseFunction::operator= | ( | const ScalarResponseFunction & | ) | [private] |
Private to prohibit copying.
Teuchos::RCP<const Epetra_Comm> Albany::ScalarResponseFunction::comm [protected] |
Comm for forming response map.
Reimplemented in QCAD::SaddleValueResponseFunction.
Definition at line 173 of file Albany_ScalarResponseFunction.hpp.