High Performance implementation of the Feasible Newton algorythm. More...
#include <FeasibleNewton.hpp>
Public Member Functions | |
FeasibleNewton (ObjectiveFunction *of) | |
virtual | ~FeasibleNewton () |
void | set_lower_gradient_bound (double gradc) |
FeasibleNewton (ObjectiveFunction *of) | |
virtual | ~FeasibleNewton () |
void | set_lower_gradient_bound (double gradc) |
Public Member Functions inherited from VertexMover | |
virtual | ~VertexMover () |
virtual double | loop_over_mesh (MeshSet &ms, MsqError &err) |
Improves the quality of the MeshSet, calling some methods specified in a class derived from VertexMover. More... | |
virtual | ~VertexMover () |
virtual double | loop_over_mesh (MeshSet &ms, MsqError &err) |
This is the "run" function of PatchDataUser. It can do anything really. More... | |
Public Member Functions inherited from QualityImprover | |
virtual | ~QualityImprover () |
void | set_name (msq_std::string name) |
provides a name to the QualityImprover (use it in constructor). More... | |
virtual msq_std::string | get_name () |
retrieves the QualityImprover name. A default name should be set in the constructor. More... | |
virtual AlgorithmType | get_algorithm_type () |
Return the algorithm type (to avoid RTTI use). More... | |
void | set_inner_termination_criterion (TerminationCriterion *crit) |
Sets in the termination criterion for the concrete solver's optimization. More... | |
void | set_outer_termination_criterion (TerminationCriterion *crit) |
Sets in the termination criterion for the outer loop over patches. More... | |
virtual | ~QualityImprover () |
void | set_name (msq_std::string name) |
provides a name to the QualityImprover (use it in constructor). More... | |
virtual msq_std::string | get_name () |
retrieves the QualityImprover name. A default name should be set in the constructor. More... | |
virtual AlgorithmType | get_algorithm_type () |
Return the algorithm type (to avoid RTTI use). More... | |
void | set_inner_termination_criterion (TerminationCriterion *crit) |
Sets in the termination criterion for the concrete solver's optimization. More... | |
void | set_outer_termination_criterion (TerminationCriterion *crit) |
Sets in the termination criterion for the outer loop over patches. More... | |
Public Member Functions inherited from PatchDataUser | |
virtual | ~PatchDataUser () |
virtual void | set_patch_type (PatchData::PatchType patch_type, MsqError &err, int param1=0, int param2=0) |
Sets the Patch Type. More... | |
PatchData::PatchType | get_patch_type () |
Returns the Patch Type. More... | |
int | get_nb_layers (MsqError &err) |
Returns number of layers (if relevant for partition algorythm). More... | |
void | add_culling_method (enum PatchData::culling_method cm) |
Sets on the culling method passed as argument. More... | |
void | no_culling_method () |
Sets off all culling methods. More... | |
void | remove_culling_method (enum PatchData::culling_method cm) |
Sets off the culling method passed as argument. More... | |
long unsigned int | get_culling_method_bits () |
Returns the bitset containing culling methods flags. More... | |
void | set_all_parameters (PatchDataParameters ¶ms) |
PatchDataParameters & | get_all_parameters () |
Returns the PatchDataParameters object. More... | |
void | set_global_patch (PatchData *pd, MsqError &err) |
Sets the Global Patch, so that it can be use by contiguoug PatchDataUser. More... | |
PatchData * | get_global_patch () |
Returns the Global Patch. More... | |
void | no_global_patch () |
Sets the Global Patch pointer to NULL. More... | |
virtual | ~PatchDataUser () |
virtual void | set_patch_type (PatchData::PatchType patch_type, MsqError &err, int param1=0, int param2=0) |
Sets the Patch Type. More... | |
PatchData::PatchType | get_patch_type () |
Returns the Patch Type. More... | |
int | get_nb_layers (MsqError &err) |
Returns number of layers (if relevant for partition algorythm). More... | |
void | add_culling_method (enum PatchData::culling_method cm) |
Sets on the culling method passed as argument. More... | |
void | no_culling_method () |
Sets off all culling methods. More... | |
void | remove_culling_method (enum PatchData::culling_method cm) |
Sets off the culling method passed as argument. More... | |
long unsigned int | get_culling_method_bits () |
Returns the bitset containing culling methods flags. More... | |
void | set_all_parameters (PatchDataParameters ¶ms) |
PatchDataParameters & | get_all_parameters () |
Returns the PatchDataParameters object. More... | |
void | set_global_patch (PatchData *pd, MsqError &err) |
Sets the Global Patch, so that it can be use by contiguoug PatchDataUser. More... | |
PatchData * | get_global_patch () |
Returns the Global Patch. More... | |
void | no_global_patch () |
Sets the Global Patch pointer to NULL. More... | |
Protected Member Functions | |
virtual void | initialize (PatchData &pd, MsqError &err) |
virtual void | optimize_vertex_positions (PatchData &pd, MsqError &err) |
virtual void | initialize_mesh_iteration (PatchData &pd, MsqError &err) |
virtual void | terminate_mesh_iteration (PatchData &pd, MsqError &err) |
virtual void | cleanup () |
virtual void | initialize (PatchData &pd, MsqError &err) |
virtual void | optimize_vertex_positions (PatchData &pd, MsqError &err) |
virtual void | initialize_mesh_iteration (PatchData &pd, MsqError &err) |
virtual void | terminate_mesh_iteration (PatchData &pd, MsqError &err) |
virtual void | cleanup () |
Protected Member Functions inherited from VertexMover | |
VertexMover () | |
size_t | check_feasible (PatchData &pd, MsqError &err) |
CHECK FEASIBLE IS NOT YET IMPLEMENTED. More... | |
VertexMover () | |
size_t | check_feasible (PatchData &pd, MsqError &err) |
CHECK FEASIBLE IS NOT YET IMPLEMENTED. More... | |
Protected Member Functions inherited from QualityImprover | |
QualityImprover () | |
const MeshSet * | get_mesh_set () const |
MeshSet * | get_mesh_set () |
void | set_mesh_set (MeshSet *ms) |
TerminationCriterion * | get_outer_termination_criterion () |
return the outer termination criterion pointer More... | |
TerminationCriterion * | get_inner_termination_criterion () |
return the inner termination criterion pointer More... | |
QualityImprover () | |
const MeshSet * | get_mesh_set () const |
MeshSet * | get_mesh_set () |
void | set_mesh_set (MeshSet *ms) |
TerminationCriterion * | get_outer_termination_criterion () |
return the outer termination criterion pointer More... | |
TerminationCriterion * | get_inner_termination_criterion () |
return the inner termination criterion pointer More... | |
Protected Member Functions inherited from PatchDataUser | |
PatchDataUser () | |
PatchDataUser () | |
Private Attributes | |
double | convTol |
MsqHessian | mHessian |
PatchDataVerticesMemento * | coordsMem |
Additional Inherited Members | |
Public Types inherited from PatchDataUser | |
enum | AlgorithmType { QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR, QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR } |
enum | AlgorithmType { QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR, QUALITY_IMPROVER, QUALITY_ASSESSOR, MESH_TRANSFORM, TARGET_CALCULATOR } |
Protected Attributes inherited from VertexMover | |
ObjectiveFunction * | objFunc |
High Performance implementation of the Feasible Newton algorythm.
Consider our non-linear objective function where is the number of vertices of the mesh, and is therefore the number of degrees of freedom of the mesh. The Taylor expansion of around the point is
Each iteration of the Newton algorithm tries to find a descent vector that minimizes the above quadratic approximation, i.e. it looks for
We know that if a quadratic function has a finite minimum, it is reached at the point where the function gradient is null and that the function Hessian is then positive definite. Therefore we are looking for such that . We have
therefore we must solve for the system
We assume that the Hessian is positive definite and we use the conjugate gradient algebraic solver to solve the above system. If the conjugate gradient solver finds a direction of negative curvature, the Hessian was not positive definite and we take a step in that direction of negative curvature, which is a descent direction.
Definition at line 93 of file includeLinks/FeasibleNewton.hpp.
FeasibleNewton | ( | ObjectiveFunction * | of | ) |
Definition at line 57 of file QualityImprover/VertexMover/FeasibleNewton/FeasibleNewton.cpp.
References TerminationCriterion::add_criterion_type_with_double(), FeasibleNewton::convTol, FeasibleNewton::coordsMem, QualityImprover::get_inner_termination_criterion(), PatchData::GLOBAL_PATCH, TerminationCriterion::GRADIENT_L2_NORM_ABSOLUTE, MSQ_CHKERR, VertexMover::objFunc, QualityImprover::set_name(), and PatchDataUser::set_patch_type().
|
inlinevirtual |
Definition at line 98 of file includeLinks/FeasibleNewton.hpp.
References FeasibleNewton::coordsMem.
FeasibleNewton | ( | ObjectiveFunction * | of | ) |
|
inlinevirtual |
Definition at line 98 of file src/QualityImprover/VertexMover/FeasibleNewton/FeasibleNewton.hpp.
References FeasibleNewton::coordsMem.
|
protectedvirtual |
Implements VertexMover.
Definition at line 351 of file QualityImprover/VertexMover/FeasibleNewton/FeasibleNewton.cpp.
References FeasibleNewton::coordsMem.
|
protectedvirtual |
Implements VertexMover.
Implements VertexMover.
Implements VertexMover.
Definition at line 73 of file QualityImprover/VertexMover/FeasibleNewton/FeasibleNewton.cpp.
References FeasibleNewton::coordsMem, PatchData::create_vertices_memento(), and MSQ_CHKERR.
Implements VertexMover.
Definition at line 80 of file QualityImprover/VertexMover/FeasibleNewton/FeasibleNewton.cpp.
References PatchData::reorder().
Implements VertexMover.
Implements VertexMover.
Implements VertexMover.
Definition at line 85 of file QualityImprover/VertexMover/FeasibleNewton/FeasibleNewton.cpp.
References TerminationCriterion::accumulate_inner(), TerminationCriterion::accumulate_patch(), MsqHessian::cg_solver(), ObjectiveFunction::compute_gradient(), ObjectiveFunction::compute_hessian(), FeasibleNewton::convTol, FeasibleNewton::coordsMem, d, ObjectiveFunction::evaluate(), QualityImprover::get_inner_termination_criterion(), PatchData::get_vertex_array(), i, MsqHessian::initialize(), Mesquite::inner(), MsqError::INTERNAL_ERROR, Mesquite::length(), FeasibleNewton::mHessian, PatchData::move_free_vertices_constrained(), MSQ_DBG, MSQ_DBGOUT, MSQ_ERRRTN, MSQ_FUNCTION_TIMER, MSQ_PRINT, MSQ_SETERR, MsqFreeVertexIndexIterator::next(), PatchData::num_free_vertices(), PatchData::num_vertices(), VertexMover::objFunc, PatchData::recreate_vertices_memento(), MsqFreeVertexIndexIterator::reset(), PatchData::set_to_vertices_memento(), TerminationCriterion::terminate(), and MsqFreeVertexIndexIterator::value().
|
inline |
Sets a minimum value for the gradient. If the gradient is below that value, we stop iterating.
Definition at line 103 of file src/QualityImprover/VertexMover/FeasibleNewton/FeasibleNewton.hpp.
References FeasibleNewton::convTol.
|
inline |
Sets a minimum value for the gradient. If the gradient is below that value, we stop iterating.
Definition at line 103 of file includeLinks/FeasibleNewton.hpp.
References FeasibleNewton::convTol.
Implements VertexMover.
Definition at line 344 of file QualityImprover/VertexMover/FeasibleNewton/FeasibleNewton.cpp.
Implements VertexMover.
|
private |
Definition at line 116 of file includeLinks/FeasibleNewton.hpp.
Referenced by FeasibleNewton::FeasibleNewton(), FeasibleNewton::optimize_vertex_positions(), and FeasibleNewton::set_lower_gradient_bound().
|
private |
Definition at line 118 of file includeLinks/FeasibleNewton.hpp.
Referenced by FeasibleNewton::cleanup(), FeasibleNewton::FeasibleNewton(), FeasibleNewton::initialize(), FeasibleNewton::optimize_vertex_positions(), and FeasibleNewton::~FeasibleNewton().
|
private |
Definition at line 117 of file includeLinks/FeasibleNewton.hpp.
Referenced by FeasibleNewton::optimize_vertex_positions().