Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef SUNDANCE_NONLINEARPROBLEM_H
00032 #define SUNDANCE_NONLINEARPROBLEM_H
00033
00034 #include "SundanceDefs.hpp"
00035 #include "SundanceNLOp.hpp"
00036 #include "TSFNOXSolver.H"
00037
00038 namespace Sundance
00039 {
00040 using namespace Teuchos;
00041
00042
00043
00044
00045
00046 class NonlinearProblem
00047 : public ObjectWithClassVerbosity<NonlinearProblem>
00048 {
00049 public:
00050
00051 NonlinearProblem();
00052
00053
00054
00055 NonlinearProblem(const Mesh& mesh, const Expr& eqn, const Expr& bc,
00056 const Expr& test, const Expr& unk, const Expr& u0,
00057 const TSFExtended::VectorType<double>& vecType);
00058
00059
00060
00061 NonlinearProblem(const Mesh& mesh, const Expr& eqn, const Expr& bc,
00062 const Expr& test, const Expr& unk, const Expr& u0,
00063 const Expr& params, const Expr& paramVals,
00064 const TSFExtended::VectorType<double>& vecType);
00065
00066
00067
00068 NonlinearProblem(const RCP<Assembler>& assembler,
00069 const Expr& u0);
00070
00071
00072 Expr computeSensitivities(const LinearSolver<double>& solver) const
00073 {return op_->computeSensitivities(solver);}
00074
00075
00076 NOX::StatusTest::StatusType solve(const NOXSolver& solver) const ;
00077
00078
00079 Expr getU0() const {return op_->getU0();}
00080
00081
00082 void setInitialGuess(const Expr& u0New) {op_->setInitialGuess(u0New);}
00083
00084
00085
00086 LinearOperator<double> computeJacobianAndFunction(Vector<double>& functionValue) const
00087 {return op_->computeJacobianAndFunction(functionValue);}
00088
00089
00090 void computeJacobianAndFunction(LinearOperator<double>& J,
00091 Vector<double>& resid) const
00092 {op_->computeJacobianAndFunction(J, resid);}
00093
00094
00095 TSFExtended::Vector<double> computeFunctionValue() const
00096 {return op_->computeFunctionValue();}
00097
00098
00099 void computeFunctionValue(Vector<double>& resid) const
00100 {op_->computeFunctionValue(resid);}
00101
00102
00103 TSFExtended::Vector<double> getInitialGuess() const
00104 {return op_->getInitialGuess();}
00105
00106
00107 LinearOperator<double> allocateJacobian() const
00108 {return op_->allocateJacobian();}
00109
00110 private:
00111 RCP<NLOp> op_;
00112 };
00113 }
00114
00115
00116
00117
00118 #endif