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
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef SUNDANCE_NONLINEARPROBLEM_H
00043 #define SUNDANCE_NONLINEARPROBLEM_H
00044
00045 #include "SundanceDefs.hpp"
00046 #include "SundanceNLOp.hpp"
00047 #include "PlayaNOXSolver.hpp"
00048 #include "PlayaNonlinearSolver.hpp"
00049 #include "PlayaNewtonArmijoSolverDecl.hpp"
00050 #ifndef HAVE_TEUCHOS_EXPLICIT_INSTANTIATION
00051 #include "PlayaNewtonArmijoSolverImpl.hpp"
00052 #endif
00053
00054 namespace Sundance
00055 {
00056 using namespace Teuchos;
00057
00058
00059
00060
00061
00062 class NonlinearProblem
00063 : public ObjectWithClassVerbosity<NonlinearProblem>
00064 {
00065 public:
00066
00067 NonlinearProblem();
00068
00069
00070
00071 NonlinearProblem(const Mesh& mesh, const Expr& eqn, const Expr& bc,
00072 const Expr& test, const Expr& unk, const Expr& u0,
00073 const Playa::VectorType<double>& vecType);
00074
00075
00076
00077 NonlinearProblem(const Mesh& mesh, const Expr& eqn, const Expr& bc,
00078 const Expr& test, const Expr& unk, const Expr& u0,
00079 const Expr& params, const Expr& paramVals,
00080 const Playa::VectorType<double>& vecType);
00081
00082
00083
00084 NonlinearProblem(const Mesh& mesh, const Expr& eqn, const Expr& bc,
00085 const BlockArray& test, const BlockArray& unk, const Expr& u0);
00086
00087
00088
00089 NonlinearProblem(const RCP<Assembler>& assembler,
00090 const Expr& u0);
00091
00092
00093 Expr computeSensitivities(const LinearSolver<double>& solver) const
00094 {return op_->computeSensitivities(solver);}
00095
00096
00097 SolverState<double> solve(const NOXSolver& solver) const ;
00098
00099
00100 SolverState<double> solve(const NonlinearSolver<double>& solver) const ;
00101
00102
00103 Expr getU0() const {return op_->getU0();}
00104
00105
00106 void setInitialGuess(const Expr& u0New) {op_->setInitialGuess(u0New);}
00107
00108
00109 void setEvalPoint(const Expr& u0New) {op_->setInitialGuess(u0New);}
00110
00111
00112
00113 LinearOperator<double> computeJacobianAndFunction(Vector<double>& functionValue) const
00114 {return op_->computeJacobianAndFunction(functionValue);}
00115
00116
00117 void computeJacobianAndFunction(LinearOperator<double>& J,
00118 Vector<double>& resid) const
00119 {op_->computeJacobianAndFunction(J, resid);}
00120
00121
00122 Playa::Vector<double> computeFunctionValue() const
00123 {return op_->computeFunctionValue();}
00124
00125
00126 void computeFunctionValue(Vector<double>& resid) const
00127 {op_->computeFunctionValue(resid);}
00128
00129
00130 Playa::Vector<double> getInitialGuess() const
00131 {return op_->getInitialGuess();}
00132
00133
00134 LinearOperator<double> allocateJacobian() const
00135 {return op_->allocateJacobian();}
00136
00137
00138 void reAssembleProblem() const { op_->reAssembleProblem();}
00139
00140 private:
00141 RCP<NLOp> op_;
00142 };
00143 }
00144
00145
00146
00147
00148 #endif