Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef ALBANY_SOLUTIONMAXVALUERESPONSEFUNCTION_HPP
00008 #define ALBANY_SOLUTIONMAXVALUERESPONSEFUNCTION_HPP
00009
00010 #include "Albany_SamplingBasedScalarResponseFunction.hpp"
00011
00012 namespace Albany {
00013
00017 class SolutionMaxValueResponseFunction :
00018 public SamplingBasedScalarResponseFunction {
00019 public:
00020
00022 SolutionMaxValueResponseFunction(
00023 const Teuchos::RCP<const Epetra_Comm>& comm,
00024 int neq = 1, int eq = 0, bool interleavedOrdering=true);
00025
00027 virtual ~SolutionMaxValueResponseFunction();
00028
00030 virtual unsigned int numResponses() const;
00031
00033 virtual void
00034 evaluateResponse(const double current_time,
00035 const Epetra_Vector* xdot,
00036 const Epetra_Vector* xdotdot,
00037 const Epetra_Vector& x,
00038 const Teuchos::Array<ParamVec>& p,
00039 Epetra_Vector& g);
00040
00042 virtual void
00043 evaluateTangent(const double alpha,
00044 const double beta,
00045 const double omega,
00046 const double current_time,
00047 bool sum_derivs,
00048 const Epetra_Vector* xdot,
00049 const Epetra_Vector* xdotdot,
00050 const Epetra_Vector& x,
00051 const Teuchos::Array<ParamVec>& p,
00052 ParamVec* deriv_p,
00053 const Epetra_MultiVector* Vxdot,
00054 const Epetra_MultiVector* Vxdotdot,
00055 const Epetra_MultiVector* Vx,
00056 const Epetra_MultiVector* Vp,
00057 Epetra_Vector* g,
00058 Epetra_MultiVector* gx,
00059 Epetra_MultiVector* gp);
00060
00062 virtual void
00063 evaluateGradient(const double current_time,
00064 const Epetra_Vector* xdot,
00065 const Epetra_Vector* xdotdot,
00066 const Epetra_Vector& x,
00067 const Teuchos::Array<ParamVec>& p,
00068 ParamVec* deriv_p,
00069 Epetra_Vector* g,
00070 Epetra_MultiVector* dg_dx,
00071 Epetra_MultiVector* dg_dxdot,
00072 Epetra_MultiVector* dg_dxdotdot,
00073 Epetra_MultiVector* dg_dp);
00074
00075 private:
00076
00078 SolutionMaxValueResponseFunction(const SolutionMaxValueResponseFunction&);
00079
00081 SolutionMaxValueResponseFunction& operator=(const SolutionMaxValueResponseFunction&);
00082
00083 protected:
00084
00086 int neq;
00087
00089 int eq;
00090
00092 bool interleavedOrdering;
00093
00095 void computeMaxValue(const Epetra_Vector& x, double& val, int& index);
00096
00097 };
00098
00099 }
00100
00101 #endif // ALBANY_SOLUTIONMAXVALUERESPONSEFUNCTION_HPP