Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
|
The abstract problem type. More...
Public Member Functions | |
procedure, pass, public | init (this, parameters, design, simulation) |
Constructor for the base class. | |
procedure, pass, public | free (this) |
Destructor for the base class. | |
procedure, pass, public | compute (this, design) |
Evaluate the optimization problem. This is the main function that evaluates the problem. It should be implemented in the derived classes. | |
procedure, pass, public | compute_sensitivity (this, design) |
Evaluate the sensitivity of the optimization problem. This is the main function that evaluates the problem sensitivity to the design. It should be implemented in the derived classes. | |
procedure, pass, public | read_objectives (this, parameters, simulation, design) |
Read objective json-file. | |
procedure, pass, public | read_constraints (this, parameters, simulation, design) |
Read constraint json-file. | |
procedure, pass, public | write (this, idx) |
Sample the problem. | |
procedure, pass, public | add_objective (this, objective) |
Add an objective to the list. | |
procedure, pass, public | add_constraint (this, constraint) |
Add a constraint to the list. | |
procedure, pass(this) | update_objectives (this, design) |
Update the objective function. | |
procedure, pass(this) | update_constraints (this, design) |
Update the volume constraint. | |
procedure, pass(this) | update_objective_sensitivities (this, design) |
Update the objective sensitivities. | |
procedure, pass(this) | update_constraint_sensitivities (this, design) |
Update the constraint sensitivities. | |
procedure, pass, public | get_objective_value (this, objective_value) |
Return the objective. | |
procedure, pass, public | get_all_objective_values (this, all_objective_values) |
Return all components of the objective. | |
procedure, pass, public | get_constraint_values (this, constraint_value) |
Return the constraints. | |
procedure, pass, public | get_objective_sensitivities (this, sensitivity) |
Return the sensitivity of the objective. | |
procedure, pass, public | get_constraint_sensitivities (this, sensitivity) |
Return the sensitivity of the constraints. | |
procedure, pass(this) | get_n_objectives (this) |
Return the number of objectives. | |
procedure, pass(this) | get_n_constraints (this) |
Return the number of constraints. | |
procedure, pass(this) | get_log_header (this) |
Return the logfile header. | |
Public Attributes | |
integer | n_objectives |
Number of objectives in the problem. | |
integer | n_constraints |
Number of constraints in the problem. | |
class(objective_wrapper_t), dimension(:), allocatable | objective_list |
The objective of the problem. | |
class(constraint_wrapper_t), dimension(:), allocatable | constraint_list |
The constraints of the problem. | |
Private Attributes | |
integer | n_design |
The number of design variables. | |
This module defines the problem_t
type which is the main interface for the optimization problem. The problem is defined by a set of objectives and constraints that are evaluated based on the design variables. The problem also handles the output of the problem and the simulation.
Definition at line 61 of file problem.f90.
procedure, pass, public problem::problem_t::add_constraint | ( | class(problem_t), intent(inout) | this, |
class(constraint_t), intent(inout), allocatable | constraint | ||
) |
Definition at line 115 of file problem.f90.
procedure, pass, public problem::problem_t::add_objective | ( | class(problem_t), intent(inout) | this, |
class(objective_t), intent(inout), allocatable | objective | ||
) |
Definition at line 113 of file problem.f90.
procedure, pass, public problem::problem_t::compute | ( | class(problem_t), intent(inout) | this, |
class(design_t), intent(inout) | design | ||
) |
Definition at line 89 of file problem.f90.
procedure, pass, public problem::problem_t::compute_sensitivity | ( | class(problem_t), intent(inout) | this, |
class(design_t), intent(inout) | design | ||
) |
Definition at line 94 of file problem.f90.
Definition at line 84 of file problem.f90.
procedure, pass, public problem::problem_t::get_all_objective_values | ( | class(problem_t), intent(inout) | this, |
type(vector_t), intent(out) | all_objective_values | ||
) |
This function returns all the indivual objectives comprising the objective function
[out] | all_objective_values | A vector containing all objectives |
Definition at line 140 of file problem.f90.
procedure, pass, public problem::problem_t::get_constraint_sensitivities | ( | class(problem_t), intent(inout) | this, |
type(matrix_t), intent(out) | sensitivity | ||
) |
This function constructs the sensitivity of the constraint values from the individual constraints.
[out] | sensitivity | The matrix of all constraint sensitivities. |
Definition at line 149 of file problem.f90.
procedure, pass, public problem::problem_t::get_constraint_values | ( | class(problem_t), intent(inout) | this, |
type(vector_t), intent(out) | constraint_value | ||
) |
This function constructs the constraint values from the individual constraints.
[out] | constraint_value | The vector of all constraint values. |
Definition at line 143 of file problem.f90.
Definition at line 158 of file problem.f90.
Definition at line 155 of file problem.f90.
Definition at line 153 of file problem.f90.
procedure, pass, public problem::problem_t::get_objective_sensitivities | ( | class(problem_t), intent(inout) | this, |
type(vector_t), intent(out) | sensitivity | ||
) |
This function constructs the sensitivity of the objective value from the individual objectives and their weights.
[out] | sensitivity | The weighted sum of all objective sensitivities. |
Definition at line 146 of file problem.f90.
procedure, pass, public problem::problem_t::get_objective_value | ( | class(problem_t), intent(inout) | this, |
real(kind=rp), intent(out) | objective_value | ||
) |
This function constructs the objective value from the individual objectives and their weights.
[out] | objective_value | The weighted sum of all objective values. |
Definition at line 137 of file problem.f90.
procedure, pass, public problem::problem_t::init | ( | class(problem_t), intent(inout) | this, |
type(json_file), intent(inout) | parameters, | ||
class(design_t), intent(in) | design, | ||
type(simulation_t), intent(inout) | simulation | ||
) |
Definition at line 82 of file problem.f90.
procedure, pass, public problem::problem_t::read_constraints | ( | class(problem_t), intent(inout) | this, |
type(json_file), intent(inout) | parameters, | ||
type(simulation_t), intent(inout) | simulation, | ||
class(design_t), intent(in) | design | ||
) |
Definition at line 103 of file problem.f90.
procedure, pass, public problem::problem_t::read_objectives | ( | class(problem_t), intent(inout) | this, |
type(json_file), intent(inout) | parameters, | ||
type(simulation_t), intent(inout) | simulation, | ||
class(design_t), intent(in) | design | ||
) |
Definition at line 101 of file problem.f90.
procedure, pass(this) problem::problem_t::update_constraint_sensitivities | ( | class(problem_t), intent(inout) | this, |
class(design_t), intent(in) | design | ||
) |
This function should be called after the design has been updated. It will update the sensitivity of all the constraints.
[in] | design | The design to update the constraints with. |
Definition at line 130 of file problem.f90.
procedure, pass(this) problem::problem_t::update_constraints | ( | class(problem_t), intent(inout) | this, |
class(design_t), intent(in) | design | ||
) |
This function should be called after the design has been updated. It will update the value of all the constraints.
[in] | design | The design to update the constraints with. |
Definition at line 124 of file problem.f90.
procedure, pass(this) problem::problem_t::update_objective_sensitivities | ( | class(problem_t), intent(inout) | this, |
class(design_t), intent(in) | design | ||
) |
This function should be called after the design has been updated. It will update the sensitivity of all the objectives.
[in] | design | The design to update the objectives with. |
Definition at line 127 of file problem.f90.
procedure, pass(this) problem::problem_t::update_objectives | ( | class(problem_t), intent(inout) | this, |
class(design_t), intent(in) | design | ||
) |
This function should be called after the design has been updated. It will update the value of all the objectives.
[in] | design | The design to update the objectives with. |
Definition at line 121 of file problem.f90.
procedure, pass, public problem::problem_t::write | ( | class(problem_t), intent(inout) | this, |
integer, intent(in) | idx | ||
) |
Definition at line 110 of file problem.f90.
class(constraint_wrapper_t), dimension(:), allocatable problem::problem_t::constraint_list |
Definition at line 74 of file problem.f90.
integer problem::problem_t::n_constraints |
Definition at line 69 of file problem.f90.
|
private |
Definition at line 65 of file problem.f90.
integer problem::problem_t::n_objectives |
Definition at line 67 of file problem.f90.
class(objective_wrapper_t), dimension(:), allocatable problem::problem_t::objective_list |
Definition at line 72 of file problem.f90.