Reponse function representing the average of the solution values. More...
#include <Albany_SolutionMaxValueResponseFunction.hpp>
Public Member Functions | |
SolutionMaxValueResponseFunction (const Teuchos::RCP< const Epetra_Comm > &comm, int neq=1, int eq=0, bool interleavedOrdering=true) | |
Default constructor. | |
virtual | ~SolutionMaxValueResponseFunction () |
Destructor. | |
virtual unsigned int | numResponses () const |
Get the number of responses. | |
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_MultiVector *dg_dx, Epetra_MultiVector *dg_dxdot, Epetra_MultiVector *dg_dxdotdot, Epetra_MultiVector *dg_dp) |
Evaluate gradient = dg/dx, dg/dxdot, dg/dp. | |
Protected Member Functions | |
void | computeMaxValue (const Epetra_Vector &x, double &val, int &index) |
Compute max value and index. | |
Protected Attributes | |
int | neq |
Number of equations per node. | |
int | eq |
Equation we want to get the max value from. | |
bool | interleavedOrdering |
Flag for interleaved verus blocked unknown ordering. | |
Private Member Functions | |
SolutionMaxValueResponseFunction (const SolutionMaxValueResponseFunction &) | |
Private to prohibit copying. | |
SolutionMaxValueResponseFunction & | operator= (const SolutionMaxValueResponseFunction &) |
Private to prohibit copying. |
Reponse function representing the average of the solution values.
Definition at line 17 of file Albany_SolutionMaxValueResponseFunction.hpp.
Albany::SolutionMaxValueResponseFunction::SolutionMaxValueResponseFunction | ( | const Teuchos::RCP< const Epetra_Comm > & | comm, | |
int | neq = 1 , |
|||
int | eq = 0 , |
|||
bool | interleavedOrdering = true | |||
) |
Default constructor.
Definition at line 11 of file Albany_SolutionMaxValueResponseFunction.cpp.
Albany::SolutionMaxValueResponseFunction::~SolutionMaxValueResponseFunction | ( | ) | [virtual] |
Destructor.
Definition at line 19 of file Albany_SolutionMaxValueResponseFunction.cpp.
Albany::SolutionMaxValueResponseFunction::SolutionMaxValueResponseFunction | ( | const SolutionMaxValueResponseFunction & | ) | [private] |
Private to prohibit copying.
unsigned int Albany::SolutionMaxValueResponseFunction::numResponses | ( | ) | const [virtual] |
Get the number of responses.
Implements Albany::ScalarResponseFunction.
Definition at line 25 of file Albany_SolutionMaxValueResponseFunction.cpp.
void Albany::SolutionMaxValueResponseFunction::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 32 of file Albany_SolutionMaxValueResponseFunction.cpp.
void Albany::SolutionMaxValueResponseFunction::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 45 of file Albany_SolutionMaxValueResponseFunction.cpp.
void Albany::SolutionMaxValueResponseFunction::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 | |||
) | [virtual] |
Evaluate gradient = dg/dx, dg/dxdot, dg/dp.
Implements Albany::ScalarResponseFunction.
Definition at line 75 of file Albany_SolutionMaxValueResponseFunction.cpp.
SolutionMaxValueResponseFunction& Albany::SolutionMaxValueResponseFunction::operator= | ( | const SolutionMaxValueResponseFunction & | ) | [private] |
Private to prohibit copying.
void Albany::SolutionMaxValueResponseFunction::computeMaxValue | ( | const Epetra_Vector & | x, | |
double & | val, | |||
int & | index | |||
) | [protected] |
Compute max value and index.
Definition at line 118 of file Albany_SolutionMaxValueResponseFunction.cpp.
int Albany::SolutionMaxValueResponseFunction::neq [protected] |
Number of equations per node.
Definition at line 86 of file Albany_SolutionMaxValueResponseFunction.hpp.
int Albany::SolutionMaxValueResponseFunction::eq [protected] |
Equation we want to get the max value from.
Definition at line 89 of file Albany_SolutionMaxValueResponseFunction.hpp.
bool Albany::SolutionMaxValueResponseFunction::interleavedOrdering [protected] |
Flag for interleaved verus blocked unknown ordering.
Definition at line 92 of file Albany_SolutionMaxValueResponseFunction.hpp.