A response function given by (possibly a portion of) the solution. More...
#include <Albany_SolutionResponseFunction.hpp>
Public Member Functions | |
SolutionResponseFunction (const Teuchos::RCP< Albany::Application > &application, Teuchos::ParameterList &responseParams) | |
Default constructor. | |
virtual | ~SolutionResponseFunction () |
Destructor. | |
virtual void | setup () |
Setup response function. | |
virtual Teuchos::RCP< const Epetra_Map > | responseMap () const |
Get the map associate with this response. | |
virtual Teuchos::RCP < Epetra_Operator > | createGradientOp () const |
Create operator for gradient. | |
Deterministic evaluation functions | |
virtual void | evaluateResponse (const double current_time, const Epetra_Vector *xdot, const Epetra_Vector *xdotdot, const Epetra_Vector &x, const Teuchos::Array< ParamVec > &p, Epetra_Vector &g) |
Evaluate responses. | |
virtual void | evaluateTangent (const double alpha, const double beta, const double omega, const double current_time, bool sum_derivs, const Epetra_Vector *xdot, const Epetra_Vector *xdotdot, const Epetra_Vector &x, const Teuchos::Array< ParamVec > &p, ParamVec *deriv_p, const Epetra_MultiVector *Vxdot, const Epetra_MultiVector *Vxdotdot, const Epetra_MultiVector *Vx, const Epetra_MultiVector *Vp, Epetra_Vector *g, Epetra_MultiVector *gx, Epetra_MultiVector *gp) |
Evaluate tangent = dg/dx*dx/dp + dg/dxdot*dxdot/dp + dg/dp. | |
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_Operator *dg_dx, Epetra_Operator *dg_dxdot, Epetra_Operator *dg_dxdotdot, Epetra_MultiVector *dg_dp) |
Evaluate gradient = dg/dx, dg/dxdot, dg/dp. | |
Protected Member Functions | |
Teuchos::RCP< Epetra_Map > | buildCulledMap (const Epetra_Map &x_map, const Teuchos::Array< int > &keepDOF) const |
void | cullSolution (const Epetra_MultiVector &x, Epetra_MultiVector &x_culled) const |
Protected Attributes | |
Teuchos::RCP< Albany::Application > | application |
Application to get global maps. | |
Teuchos::Array< int > | keepDOF |
Mask for DOFs to keep. | |
Teuchos::RCP< const Epetra_Map > | culled_map |
Epetra map for response. | |
Teuchos::RCP< Epetra_Import > | importer |
Importer mapping between full and culled solution. | |
Teuchos::RCP< Epetra_CrsGraph > | gradient_graph |
Graph of gradient operator. | |
Private Member Functions | |
SolutionResponseFunction (const SolutionResponseFunction &) | |
Private to prohibit copying. | |
SolutionResponseFunction & | operator= (const SolutionResponseFunction &) |
Private to prohibit copying. |
A response function given by (possibly a portion of) the solution.
Definition at line 25 of file Albany_SolutionResponseFunction.hpp.
Albany::SolutionResponseFunction::SolutionResponseFunction | ( | const Teuchos::RCP< Albany::Application > & | application, | |
Teuchos::ParameterList & | responseParams | |||
) |
Default constructor.
Definition at line 12 of file Albany_SolutionResponseFunction.cpp.
Albany::SolutionResponseFunction::~SolutionResponseFunction | ( | ) | [virtual] |
Destructor.
Definition at line 53 of file Albany_SolutionResponseFunction.cpp.
Albany::SolutionResponseFunction::SolutionResponseFunction | ( | const SolutionResponseFunction & | ) | [private] |
Private to prohibit copying.
void Albany::SolutionResponseFunction::setup | ( | ) | [virtual] |
Setup response function.
Implements Albany::AbstractResponseFunction.
Definition at line 34 of file Albany_SolutionResponseFunction.cpp.
Teuchos::RCP< const Epetra_Map > Albany::SolutionResponseFunction::responseMap | ( | ) | const [virtual] |
Get the map associate with this response.
Implements Albany::AbstractResponseFunction.
Definition at line 59 of file Albany_SolutionResponseFunction.cpp.
Teuchos::RCP< Epetra_Operator > Albany::SolutionResponseFunction::createGradientOp | ( | ) | const [virtual] |
Create operator for gradient.
Implements Albany::AbstractResponseFunction.
Definition at line 66 of file Albany_SolutionResponseFunction.cpp.
void Albany::SolutionResponseFunction::evaluateResponse | ( | const double | current_time, | |
const Epetra_Vector * | xdot, | |||
const Epetra_Vector * | xdotdot, | |||
const Epetra_Vector & | x, | |||
const Teuchos::Array< ParamVec > & | p, | |||
Epetra_Vector & | g | |||
) | [virtual] |
Evaluate responses.
Implements Albany::AbstractResponseFunction.
Definition at line 76 of file Albany_SolutionResponseFunction.cpp.
void Albany::SolutionResponseFunction::evaluateTangent | ( | const double | alpha, | |
const double | beta, | |||
const double | omega, | |||
const double | current_time, | |||
bool | sum_derivs, | |||
const Epetra_Vector * | xdot, | |||
const Epetra_Vector * | xdotdot, | |||
const Epetra_Vector & | x, | |||
const Teuchos::Array< ParamVec > & | p, | |||
ParamVec * | deriv_p, | |||
const Epetra_MultiVector * | Vxdot, | |||
const Epetra_MultiVector * | Vxdotdot, | |||
const Epetra_MultiVector * | Vx, | |||
const Epetra_MultiVector * | Vp, | |||
Epetra_Vector * | g, | |||
Epetra_MultiVector * | gx, | |||
Epetra_MultiVector * | gp | |||
) | [virtual] |
Evaluate tangent = dg/dx*dx/dp + dg/dxdot*dxdot/dp + dg/dp.
Implements Albany::AbstractResponseFunction.
Definition at line 88 of file Albany_SolutionResponseFunction.cpp.
void Albany::SolutionResponseFunction::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_Operator * | dg_dx, | |||
Epetra_Operator * | dg_dxdot, | |||
Epetra_Operator * | dg_dxdotdot, | |||
Epetra_MultiVector * | dg_dp | |||
) | [virtual] |
Evaluate gradient = dg/dx, dg/dxdot, dg/dp.
Implements Albany::DistributedResponseFunction.
Definition at line 123 of file Albany_SolutionResponseFunction.cpp.
SolutionResponseFunction& Albany::SolutionResponseFunction::operator= | ( | const SolutionResponseFunction & | ) | [private] |
Private to prohibit copying.
Teuchos::RCP< Epetra_Map > Albany::SolutionResponseFunction::buildCulledMap | ( | const Epetra_Map & | x_map, | |
const Teuchos::Array< int > & | keepDOF | |||
) | const [protected] |
Definition at line 364 of file Albany_SolutionResponseFunction.cpp.
void Albany::SolutionResponseFunction::cullSolution | ( | const Epetra_MultiVector & | x, | |
Epetra_MultiVector & | x_culled | |||
) | const [protected] |
Definition at line 396 of file Albany_SolutionResponseFunction.cpp.
Teuchos::RCP<Albany::Application> Albany::SolutionResponseFunction::application [protected] |
Application to get global maps.
Definition at line 232 of file Albany_SolutionResponseFunction.hpp.
Teuchos::Array<int> Albany::SolutionResponseFunction::keepDOF [protected] |
Mask for DOFs to keep.
Definition at line 235 of file Albany_SolutionResponseFunction.hpp.
Teuchos::RCP<const Epetra_Map> Albany::SolutionResponseFunction::culled_map [protected] |
Epetra map for response.
Definition at line 238 of file Albany_SolutionResponseFunction.hpp.
Teuchos::RCP<Epetra_Import> Albany::SolutionResponseFunction::importer [protected] |
Importer mapping between full and culled solution.
Definition at line 241 of file Albany_SolutionResponseFunction.hpp.
Teuchos::RCP<Epetra_CrsGraph> Albany::SolutionResponseFunction::gradient_graph [protected] |
Graph of gradient operator.
Definition at line 244 of file Albany_SolutionResponseFunction.hpp.