Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
problem::problem_t Type Reference

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, simulation)
 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, simulation)
 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 run_forward_unsteady (this, simulation, design)
 Run the unsteady problem forward in time while time integrating the objective function.
 
procedure, pass, public run_backward_unsteady (this, simulation, design)
 Run the unsteady adjoint backwards in time while time integrating the sensitivity.
 
procedure, pass, public read_objectives (this, parameters, design, simulation)
 Read objective json-file.
 
procedure, pass, public read_constraints (this, parameters, design, simulation)
 Read constraint json-file.
 
procedure, pass, public write (this, idx)
 Sample the problem.
 
procedure, pass, public get_log_values (this, values, include_constraints)
 Fill optimization log values.
 
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(thisupdate_objectives (this, design)
 Update the objective function.
 
procedure, pass(thisupdate_constraints (this, design)
 Update the constraints.
 
procedure, pass(thisupdate_objective_sensitivities (this, design)
 Update the objective sensitivities.
 
procedure, pass(thisupdate_constraint_sensitivities (this, design)
 Update the constraint sensitivities.
 
procedure, pass(thisreset_objectives (this)
 Reset the objective function.
 
procedure, pass(thisreset_constraints (this)
 Reset the constraints.
 
procedure, pass(thisreset_objective_sensitivities (this)
 Reset the objective sensitivities.
 
procedure, pass(thisreset_constraint_sensitivities (this)
 Reset the constraint sensitivities.
 
procedure, pass(thisaccumulate_objectives (this, design, time)
 Accumulate the objective function.
 
procedure, pass(thisaccumulate_constraints (this, design, time)
 Accumulate the constraints.
 
procedure, pass(thisaccumulate_objective_sensitivities (this, design, time)
 Accumulate the objective sensitivities.
 
procedure, pass(thisaccumulate_constraint_sensitivities (this, design, time)
 Accumulate 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(thisget_n_objectives (this)
 Return the number of objectives.
 
procedure, pass(thisget_n_constraints (this)
 Return the number of constraints.
 
procedure, pass(thisget_log_header (this, include_constraints)
 Return the logfile header.
 
procedure, pass(thisget_log_size (this, include_constraints)
 Return the logfile base size (excluding iter and optimizer extras)
 

Public Attributes

integer n_objectives = 0
 Number of objectives in the problem.
 
integer n_constraints = 0
 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.
 

Detailed Description

Definition at line 67 of file problem.f90.

Member Function/Subroutine Documentation

◆ accumulate_constraint_sensitivities()

procedure, pass(this) problem::problem_t::accumulate_constraint_sensitivities ( class(problem_t), intent(inout this,
class(design_t), intent(in design,
type(time_state_t), intent(in time 
)

This function will accumulate all the constraint sensitivity.

Parameters
[in,out]thisThe problem to accumulate the objectives with.
[in]designThe design to accumulate the constraints with.
[in]timeThe current time state.

Definition at line 170 of file problem.f90.

◆ accumulate_constraints()

procedure, pass(this) problem::problem_t::accumulate_constraints ( class(problem_t), intent(inout this,
class(design_t), intent(in design,
type(time_state_t), intent(in time 
)

This function will accumulate all the constraints.

Parameters
[in,out]thisThe problem to accumulate the objectives with.
[in]designThe design to accumulate the constraints with.
[in]timeThe current time state.

Definition at line 164 of file problem.f90.

◆ accumulate_objective_sensitivities()

procedure, pass(this) problem::problem_t::accumulate_objective_sensitivities ( class(problem_t), intent(inout this,
class(design_t), intent(in design,
type(time_state_t), intent(in time 
)

This function will accumulate all the objective sensitivity.

Parameters
[in,out]thisThe problem to accumulate the objectives with.
[in]designThe design to accumulate the objectives with.
[in]timeThe current time state.

Definition at line 167 of file problem.f90.

◆ accumulate_objectives()

procedure, pass(this) problem::problem_t::accumulate_objectives ( class(problem_t), intent(inout this,
class(design_t), intent(in design,
type(time_state_t), intent(in time 
)

This function will accumulate all objectives.

Parameters
[in,out]thisThe problem to accumulate the objectives with.
[in]designThe design to accumulate the objectives with.
[in]timeThe current time state.

Definition at line 161 of file problem.f90.

◆ add_constraint()

procedure, pass, public problem::problem_t::add_constraint ( class(problem_t), intent(inout this,
class(constraint_t), intent(inout), allocatable  constraint 
)

Definition at line 129 of file problem.f90.

◆ add_objective()

procedure, pass, public problem::problem_t::add_objective ( class(problem_t), intent(inout this,
class(objective_t), intent(inout), allocatable  objective 
)

Definition at line 127 of file problem.f90.

◆ compute()

procedure, pass, public problem::problem_t::compute ( class(problem_t), intent(inout this,
class(design_t), intent(inout design,
class(simulation_t), intent(inout), optional  simulation 
)

Definition at line 94 of file problem.f90.

◆ compute_sensitivity()

procedure, pass, public problem::problem_t::compute_sensitivity ( class(problem_t), intent(inout this,
class(design_t), intent(inout design,
class(simulation_t), intent(inout), optional  simulation 
)

Definition at line 99 of file problem.f90.

◆ free()

procedure, pass, public problem::problem_t::free ( class(problem_t), intent(inout this)

Definition at line 89 of file problem.f90.

◆ get_all_objective_values()

procedure, pass, public problem::problem_t::get_all_objective_values ( class(problem_t), intent(in this,
type(vector_t), intent(inout all_objective_values 
)

This function returns all the indivual objectives comprising the objective function

Parameters
[in]thisThe problem to update the objectives with.
[in,out]all_objective_valuesA vector containing all objectives

Definition at line 180 of file problem.f90.

◆ get_constraint_sensitivities()

procedure, pass, public problem::problem_t::get_constraint_sensitivities ( class(problem_t), intent(inout this,
type(matrix_t), intent(inout), target  sensitivity 
)

This function constructs the sensitivity of the constraint values from the individual constraints.

Parameters
[in]thisThe problem to update the objectives with.
[in,out]sensitivityThe matrix of all constraint sensitivities.

Definition at line 189 of file problem.f90.

◆ get_constraint_values()

procedure, pass, public problem::problem_t::get_constraint_values ( class(problem_t), intent(in this,
type(vector_t), intent(inout constraint_value 
)

This function constructs the constraint values from the individual constraints.

Parameters
[in]thisThe problem to update the objectives with.
[in,out]constraint_valueThe vector of all constraint values.

Definition at line 183 of file problem.f90.

◆ get_log_header()

procedure, pass(this) problem::problem_t::get_log_header ( class(problem_t), intent(in this,
logical, intent(in), optional  include_constraints 
)
Parameters
[in]thisThe problem object.
[in]include_constraintsInclude constraints in the header.
Returns
buff Comma-separated header string.

Definition at line 198 of file problem.f90.

◆ get_log_size()

procedure, pass(this) problem::problem_t::get_log_size ( class(problem_t), intent(in this,
logical, intent(in), optional  include_constraints 
)
Parameters
[in]thisThe problem object.
[in]include_constraintsInclude constraints in the size count.
Returns
n Number of log entries excluding iteration and optimizer extras.

Definition at line 200 of file problem.f90.

◆ get_log_values()

procedure, pass, public problem::problem_t::get_log_values ( class(problem_t), intent(in this,
real(kind=rp), dimension(:), intent(out values,
logical, intent(in), optional  include_constraints 
)
Parameters
[in]thisThe problem object.
[out]valuesArray to populate with log values.
[in]include_constraintsInclude constraints in the log values.

Definition at line 124 of file problem.f90.

◆ get_n_constraints()

procedure, pass(this) problem::problem_t::get_n_constraints ( class(problem_t), intent(in this)

Definition at line 195 of file problem.f90.

◆ get_n_objectives()

procedure, pass(this) problem::problem_t::get_n_objectives ( class(problem_t), intent(in this)

Definition at line 193 of file problem.f90.

◆ get_objective_sensitivities()

procedure, pass, public problem::problem_t::get_objective_sensitivities ( class(problem_t), intent(in this,
type(vector_t), intent(inout sensitivity 
)

This function constructs the sensitivity of the objective value from the individual objectives and their weights.

Parameters
[in]thisThe problem to update the objectives with.
[in,out]sensitivityThe weighted sum of all objective sensitivities.

Definition at line 186 of file problem.f90.

◆ get_objective_value()

procedure, pass, public problem::problem_t::get_objective_value ( class(problem_t), intent(in this,
real(kind=rp), intent(out objective_value 
)

This function constructs the objective value from the individual objectives and their weights.

Parameters
[in]thisThe problem to update the objectives with.
[out]objective_valueThe weighted sum of all objective values.

Definition at line 177 of file problem.f90.

◆ init()

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), optional  simulation 
)

Definition at line 87 of file problem.f90.

◆ read_constraints()

procedure, pass, public problem::problem_t::read_constraints ( class(problem_t), intent(inout this,
type(json_file), intent(inout parameters,
class(design_t), intent(in design,
type(simulation_t), intent(inout), optional  simulation 
)

Definition at line 115 of file problem.f90.

◆ read_objectives()

procedure, pass, public problem::problem_t::read_objectives ( class(problem_t), intent(inout this,
type(json_file), intent(inout parameters,
class(design_t), intent(in design,
type(simulation_t), intent(inout), optional  simulation 
)

Definition at line 113 of file problem.f90.

◆ reset_constraint_sensitivities()

procedure, pass(this) problem::problem_t::reset_constraint_sensitivities ( class(problem_t), intent(inout this)

This function will reset all the constraint sensitivity to zero.

Parameters
[in,out]thisThe problem to reset the objectives with.

Definition at line 157 of file problem.f90.

◆ reset_constraints()

procedure, pass(this) problem::problem_t::reset_constraints ( class(problem_t), intent(inout this)

This function will reset all the constraints to zero.

Parameters
[in,out]thisThe problem to reset the objectives with.

Definition at line 151 of file problem.f90.

◆ reset_objective_sensitivities()

procedure, pass(this) problem::problem_t::reset_objective_sensitivities ( class(problem_t), intent(inout this)

This function will reset all the objective sensitivity to zero.

Parameters
[in,out]thisThe problem to reset the objectives with.

Definition at line 154 of file problem.f90.

◆ reset_objectives()

procedure, pass(this) problem::problem_t::reset_objectives ( class(problem_t), intent(inout this)

This function will reset all objectives to zero.

Parameters
[in,out]thisThe problem to reset the objectives with.

Definition at line 148 of file problem.f90.

◆ run_backward_unsteady()

procedure, pass, public problem::problem_t::run_backward_unsteady ( class(problem_t), intent(inout this,
class(simulation_t), intent(inout simulation,
class(design_t), intent(inout design 
)

Definition at line 107 of file problem.f90.

◆ run_forward_unsteady()

procedure, pass, public problem::problem_t::run_forward_unsteady ( class(problem_t), intent(inout this,
class(simulation_t), intent(inout simulation,
class(design_t), intent(inout design 
)

Definition at line 103 of file problem.f90.

◆ update_constraint_sensitivities()

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.

Parameters
[in,out]thisThe problem to update the objectives with.
[in]designThe design to update the constraints with.

Definition at line 144 of file problem.f90.

◆ update_constraints()

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.

Parameters
[in,out]thisThe problem to update the objectives with.
[in]designThe design to update the constraints with.

Definition at line 138 of file problem.f90.

◆ update_objective_sensitivities()

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.

Parameters
[in,out]thisThe problem to update the objectives with.
[in]designThe design to update the objectives with.

Definition at line 141 of file problem.f90.

◆ update_objectives()

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.

Parameters
[in,out]thisThe problem to update the objectives with.
[in]designThe design to update the objectives with.

Definition at line 135 of file problem.f90.

◆ write()

procedure, pass, public problem::problem_t::write ( class(problem_t), intent(inout this,
integer, intent(in idx 
)

Definition at line 122 of file problem.f90.

Member Data Documentation

◆ constraint_list

class(constraint_wrapper_t), dimension(:), allocatable problem::problem_t::constraint_list

Definition at line 80 of file problem.f90.

◆ n_constraints

integer problem::problem_t::n_constraints = 0

Definition at line 75 of file problem.f90.

◆ n_objectives

integer problem::problem_t::n_objectives = 0

Definition at line 73 of file problem.f90.

◆ objective_list

class(objective_wrapper_t), dimension(:), allocatable problem::problem_t::objective_list

Definition at line 78 of file problem.f90.


The documentation for this type was generated from the following file: