57 auto core_log = logging::core::get();
101 friend PetscErrorCode
TaoSetHessian(Tao tao, Vec x, Mat
H, Mat Hpre,
124PetscErrorCode
TaoSetObjective(Tao tao, Vec x, PetscReal *f,
void *ctx);
171PetscErrorCode
TaoSetHessian(Tao tao, Vec x, Mat
H, Mat Hpre,
void *ctx);
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
PetscErrorCode TaoSetObjective(Tao tao, Vec x, PetscReal *f, void *ctx)
Sets the objective function value for a TAO optimization context.
std::deque< BasicMethodPtr > BasicMethodsSequence
std::deque< PairNameFEMethodPtr > FEMethodsSequence
PetscErrorCode TaoSetObjectiveAndGradient(Tao tao, Vec x, PetscReal *f, Vec g, void *ctx)
Sets the objective function value and gradient for a TAO optimization solver.
PetscErrorCode TaoSetGradient(Tao tao, Vec x, Vec f, void *ctx)
Sets the gradient vector for a TAO optimization context.
PetscErrorCode TaoSetHessian(Tao tao, Vec x, Mat H, Mat Hpre, void *ctx)
Sets the Hessian matrix for a TAO optimization context.
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
static bool checkIfChannelExist(const std::string channel)
Check if channel exist.
Interface for TAO solvers.
TaoCtx(Interface &m_field, const std::string &problem_name)
MoFEMErrorCode copyLoops(const TaoCtx &tao_ctx)
Copy sequences from another TaoCtx.
boost::movelib::unique_ptr< bool > vecAssembleSwitch
MoFEM::FEMethodsSequence FEMethodsSequence
MoFEM::Interface & mField
database Interface
moab::Interface & moab
moab Interface
virtual ~TaoCtx()=default
FEMethodsSequence & getGradientLoops()
BasicMethodsSequence postObjective
Sequence of methods run after objective is evaluated.
BasicMethodsSequence & getPreProcGradient()
PetscLogEvent MOFEM_EVENT_TaoGradient
Log event for TAO Gradient.
PetscLogEvent MOFEM_EVENT_SnesMat
Log events to assemble tangent matrix.
std::string problemName
problem name
BasicMethodsSequence & getPostProcGradient()
BasicMethodsSequence & getPostProcObjective()
BasicMethodsSequence postGradient
Sequence of methods run after gradient is assembled.
PetscLogEvent MOFEM_EVENT_TaoHessian
Log event for TAO Hessian.
boost::movelib::unique_ptr< bool > matAssembleSwitch
BasicMethodsSequence preObjective
Sequence of methods run before objective is evaluated.
friend PetscErrorCode TaoSetHessian(Tao tao, Vec x, Mat H, Mat Hpre, void *ctx)
Sets the Hessian matrix for a TAO optimization context.
FEMethodsSequence loopsObjective
BasicMethodsSequence preGradient
Sequence of methods run before gradient is assembled.
BasicMethodsSequence & getPostProcHessian()
PetscLogEvent MOFEM_EVENT_SnesRhs
Log events to assemble residual.
PetscLogEvent MOFEM_EVENT_TaoObjective
Log event for TAO Objective.
FEMethodsSequence & getObjectiveLoops()
friend PetscErrorCode TaoSetObjectiveAndGradient(Tao tao, Vec x, PetscReal *f, Vec g, void *ctx)
Sets the objective function value and gradient for a TAO optimization solver.
FEMethodsSequence & getHessianLoops()
MoFEMErrorCode clearLoops()
Clear loops.
bool vErify
If true verify vector.
friend PetscErrorCode TaoSetObjective(Tao tao, Vec x, PetscReal *f, void *ctx)
Sets the objective function value for a TAO optimization context.
BasicMethodsSequence postHessian
Sequence of methods run after Hessian is assembled.
BasicMethodsSequence preHessian
Sequence of methods run before Hessian is assembled.
friend PetscErrorCode TaoSetGradient(Tao tao, Vec x, Vec g, void *ctx)
Sets the gradient vector for a TAO optimization context.
FEMethodsSequence loopsGradient
BasicMethodsSequence & getPreProcObjective()
BasicMethodsSequence & getPreProcHessian()
MoFEM::BasicMethodsSequence BasicMethodsSequence
FEMethodsSequence loopsHessian