|
Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
|
Abstract optimizer class. More...

Public Member Functions | |
| procedure(optimizer_init_from_json), deferred, pass, public | init_from_json (this, parameters, problem, design, simulation) |
| Initialize the optimizer, associate it with a specific problem. | |
| procedure(optimizer_free), deferred, pass, public | free (this) |
| Free resources. | |
| procedure(optimizer_initialize), deferred, pass, public | initialize (this, problem, design, simulation) |
| Prepare the optimizer before starting the optimization loop. | |
| procedure(optimizer_step), deferred, pass, public | step (this, iter, problem, design, simulation) |
| Perform a single optimization step. | |
| procedure(optimizer_validate), deferred, pass, public | validate (this, problem, design) |
| Validate the solution. | |
| procedure(optimizer_write), deferred, pass, public | write (this, iter, problem) |
| Write the progress of the optimizer to the log file. | |
| procedure(optimizer_save_checkpoint_components), deferred, pass | save_checkpoint_components (this, filename, overwrite) |
| Save optimizer-specific components to checkpoint. | |
| procedure(optimizer_load_checkpoint_components), deferred, pass | load_checkpoint_components (this, filename) |
| Load optimizer-specific components from checkpoint. | |
| procedure, pass(this) | save_checkpoint (this, filename, iter, design, overwrite) |
| Save a checkpoint of the optimizer state. | |
| procedure, pass(this) | load_checkpoint (this, filename, iter, design) |
| Restore the optimizer state from a checkpoint. | |
| procedure, pass, public | run (this, problem, design, simulation) |
| Run the optimization loop. | |
| procedure, pass(this) | init_base (this, optimizer_type, max_iterations, max_runtime) |
| The base initializer. | |
| procedure, pass(this) | free_base (this) |
| Free base resources. | |
| procedure, pass(this) | print_status (this, stop_flag, iter) |
| Print status message. | |
| procedure, pass(this) | out_of_time (this, step_time) |
| Estimate if we are out of time. | |
Definition at line 54 of file optimizer.f90.
|
pure virtual |
Definition at line 80 of file optimizer.f90.
| this | The optimizer object. |
Definition at line 115 of file optimizer.f90.
| procedure, pass(this) optimizer::optimizer_t::init_base | ( | class(optimizer_t), intent(inout) | this, |
| character(len=*), intent(in) | optimizer_type, | ||
| integer, intent(in) | max_iterations, | ||
| real(kind=rp), intent(in), optional | max_runtime | ||
| ) |
Interface for reading a checkpoint Base initializer for the optimizer
| this | The optimizer object. |
| optimizer_type | The type of the optimizer. |
| max_iterations | The maximum number of iterations. |
| max_runtime | The maximum runtime in seconds. |
Definition at line 113 of file optimizer.f90.
|
pure virtual |
Definition at line 77 of file optimizer.f90.
|
pure virtual |
Definition at line 83 of file optimizer.f90.
| procedure, pass(this) optimizer::optimizer_t::load_checkpoint | ( | class(optimizer_t), intent(inout) | this, |
| character(len=*), intent(in) | filename, | ||
| integer, intent(out) | iter, | ||
| class(design_t), intent(inout) | design | ||
| ) |
| this | The optimizer object. |
| filename | The name of the file to load the checkpoint from. |
| iter | The current iteration number. |
| design | The design object. |
Definition at line 101 of file optimizer.f90.
|
pure virtual |
Definition at line 95 of file optimizer.f90.
| procedure, pass(this) optimizer::optimizer_t::out_of_time | ( | class(optimizer_t), intent(inout) | this, |
| real(kind=rp), intent(in) | step_time | ||
| ) |
| this | The optimizer object. |
| step_time | The time taken for the latest iteration. |
Definition at line 119 of file optimizer.f90.
| procedure, pass(this) optimizer::optimizer_t::print_status | ( | class(optimizer_t), intent(in) | this, |
| integer, intent(in) | stop_flag, | ||
| integer, intent(in) | iter | ||
| ) |
| this | The optimizer object. |
| stop_flag | The stopping flag. |
| iter | The number of iterations performed. |
Definition at line 117 of file optimizer.f90.
| procedure, pass, public optimizer::optimizer_t::run | ( | class(optimizer_t), intent(inout) | this, |
| class(problem_t), intent(inout) | problem, | ||
| class(design_t), intent(inout) | design, | ||
| type(simulation_t), intent(inout), optional | simulation | ||
| ) |
The optimization loop can be terminated based on a maximum runtime. In this case, a cumulative average is used to determine if the next iteration would exceed the maximum runtime.
| this | The optimizer object. |
| problem | The problem object. |
| design | The design object. |
| simulation | The simulation object. |
Definition at line 107 of file optimizer.f90.
| procedure, pass(this) optimizer::optimizer_t::save_checkpoint | ( | class(optimizer_t), intent(inout) | this, |
| character(len=*), intent(in) | filename, | ||
| integer, intent(in) | iter, | ||
| class(design_t), intent(inout) | design, | ||
| logical, intent(in), optional | overwrite | ||
| ) |
| this | The optimizer object. |
| filename | The name of the file to save the checkpoint. |
| iter | The current iteration number. |
| design | The design object. |
| overwrite | Whether to overwrite the file if it exists. |
Definition at line 99 of file optimizer.f90.
|
pure virtual |
Definition at line 92 of file optimizer.f90.
|
pure virtual |
Definition at line 85 of file optimizer.f90.
|
pure virtual |
Definition at line 87 of file optimizer.f90.
|
pure virtual |
Definition at line 90 of file optimizer.f90.