Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
brinkman_design::brinkman_design_t Type Referenceabstract

A topology optimization design variable. More...

Inheritance diagram for brinkman_design::brinkman_design_t:
Collaboration diagram for brinkman_design::brinkman_design_t:

Public Member Functions

generic, public init init_from_json_sim
 Initialize the design.
 
generic, public init init_from_components
 Initialize the design.
 
procedure, pass, public init_from_json_sim (this, parameters, simulation)
 Initialize the design from a JSON file.
 
procedure, pass, public init_from_components (this, name, simulation, dealias)
 Initialize the design from components.
 
procedure, pass(thisget_values (this, values)
 Retrieve the design variables.
 
procedure, pass(thisget_sensitivity (this, values)
 Retrieve the sensitivity.
 
procedure, pass(thisdesign_get_x (this, x)
 Retrieve the x location of the design variables.
 
procedure, pass(thisdesign_get_x_i (this, i)
 Retrieve the x location of the i'th design variable.
 
procedure, pass(thisdesign_get_y (this, y)
 Retrieve the y location of the design variables.
 
procedure, pass(thisdesign_get_y_i (this, i)
 Retrieve the y location of the i'th design variable.
 
procedure, pass(thisdesign_get_z (this, z)
 Retrieve the z location of the design variables.
 
procedure, pass(thisdesign_get_z_i (this, i)
 Retrieve the z location of the i'th design variable.
 
procedure, pass(thisupdate_design (this, values)
 Update the design.
 
procedure, pass(thismap_forward (this)
 map (this will include everything from mapping
 
procedure, pass(thismap_backward (this, sensitivity)
 this will contain chain rule for going backwards
 
procedure, pass(thiswrite (this, idx)
 
procedure, pass(thisfree (this)
 Destructor.
 
procedure, pass(thisinit_from_json_sim (this, parameters, simulation)
 Initialize the design.
 
procedure, pass(thisinit_from_json (this, parameters)
 Initialize the design.
 
procedure(design_free), deferred, pass, public free (this)
 Free the design.
 
procedure(design_get_values), deferred, pass, public get_values (this, values)
 Retrieve the design variables.
 
generic get_x (this, x)
 Retrieve the x location of the design variables.
 
generic x (this, i)
 Getter of i'th element of x.
 
generic get_y (this, y)
 Retrieve the y location of the design variables.
 
generic y (this, i)
 Getter of i'th element of y.
 
generic get_z (this, z)
 Retrieve the z location of the design variables.
 
generic z (this, i)
 Getter of i'th element of z.
 
procedure(design_update_design), deferred, pass, public update_design (this, values)
 Update the design variables.
 
procedure(design_map_forward), deferred, pass, public map_forward (this)
 Run the forward mapping of the design.
 
procedure(design_map_backward), deferred, pass, public map_backward (this, sensitivity)
 Run the backward mapping of the design.
 
procedure(design_write), deferred, pass, public write (this, idx)
 Write the design.
 
procedure, pass(this), public save_checkpoint (this, filename, overwrite)
 Save the design to a checkpoint file.
 
procedure, pass(this), public load_checkpoint (this, filename)
 Load the design from a checkpoint file.
 
procedure, pass(thisinit_base (this, name, n)
 Initialize the base design.
 
procedure, pass(thisfree_base (this)
 Free the base design.
 
procedure, pass(this), public get_name (this)
 Get the name of the design.
 
procedure, pass(this), public size (this)
 Return the number of design variables.
 
procedure, pass(this), public size_global (this)
 Return the number of global design variables.
 
procedure, pass(thisdesign_get_x (this, x)
 Getter of x vector.
 
procedure, pass(thisdesign_get_x_i (this, i)
 Getter of i'th element of x.
 
procedure, pass(thisdesign_get_y (this, y)
 Getter of y vector.
 
procedure, pass(thisdesign_get_y_i (this, i)
 Getter of i'th element of y.
 
procedure, pass(thisdesign_get_z (this, z)
 Getter of z vector.
 
procedure, pass(thisdesign_get_z_i (this, i)
 Getter of i'th element of z.
 

Public Attributes

type(field_t), pointer brinkman_amplitude
 the mapped coefficient (Brinkman term)
 
type(field_t), pointer sensitivity
 
type(mapping_handler_tmapping
 A mapper to map the design into coefficients in the PDE.
 
class(point_zone_t), pointer optimization_domain
 A mask indicating the optimization domain.
 
logical has_mask
 A logical if we're restricting the optimization domain.
 
integer n = 0
 The number of design variables.
 
integer n_global = 0
 The global number of design variables.
 

Detailed Description

Definition at line 69 of file design_brinkman.f90.

Member Function/Subroutine Documentation

◆ design_get_x() [1/2]

procedure, pass(this) design::design_t::design_get_x ( class(design_t), intent(in this,
type(vector_t), intent(inout x 
)
inherited

Definition at line 140 of file design.f90.

◆ design_get_x() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::design_get_x ( class(brinkman_design_t), intent(in this,
type(vector_t), intent(inout x 
)

Definition at line 205 of file design_brinkman.f90.

◆ design_get_x_i() [1/2]

procedure, pass(this) design::design_t::design_get_x_i ( class(design_t), intent(in this,
integer, intent(in i 
)
inherited

Definition at line 142 of file design.f90.

◆ design_get_x_i() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::design_get_x_i ( class(brinkman_design_t), intent(in this,
integer, intent(in i 
)

Definition at line 207 of file design_brinkman.f90.

◆ design_get_y() [1/2]

procedure, pass(this) design::design_t::design_get_y ( class(design_t), intent(in this,
type(vector_t), intent(inout y 
)
inherited

Definition at line 144 of file design.f90.

◆ design_get_y() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::design_get_y ( class(brinkman_design_t), intent(in this,
type(vector_t), intent(inout y 
)

Definition at line 209 of file design_brinkman.f90.

◆ design_get_y_i() [1/2]

procedure, pass(this) design::design_t::design_get_y_i ( class(design_t), intent(in this,
integer, intent(in i 
)
inherited

Definition at line 146 of file design.f90.

◆ design_get_y_i() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::design_get_y_i ( class(brinkman_design_t), intent(in this,
integer, intent(in i 
)

Definition at line 211 of file design_brinkman.f90.

◆ design_get_z() [1/2]

procedure, pass(this) design::design_t::design_get_z ( class(design_t), intent(in this,
type(vector_t), intent(inout z 
)
inherited

Definition at line 148 of file design.f90.

◆ design_get_z() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::design_get_z ( class(brinkman_design_t), intent(in this,
type(vector_t), intent(inout z 
)

Definition at line 213 of file design_brinkman.f90.

◆ design_get_z_i() [1/2]

procedure, pass(this) design::design_t::design_get_z_i ( class(design_t), intent(in this,
integer, intent(in i 
)
inherited

Definition at line 150 of file design.f90.

◆ design_get_z_i() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::design_get_z_i ( class(brinkman_design_t), intent(in this,
integer, intent(in i 
)

Definition at line 215 of file design_brinkman.f90.

◆ free() [1/2]

procedure(design_free), deferred, pass, public design::design_t::free ( class(design_t), intent(inout this)
pure virtualinherited

Definition at line 92 of file design.f90.

◆ free() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::free ( class(brinkman_design_t), intent(inout this)

Definition at line 238 of file design_brinkman.f90.

◆ free_base()

procedure, pass(this) design::design_t::free_base ( class(design_t), intent(inout this)
inherited
Parameters
thisThe design object.

Definition at line 130 of file design.f90.

◆ get_name()

procedure, pass(this), public design::design_t::get_name ( class(design_t), intent(in this)
inherited
Parameters
thisThe design object.
Returns
The name of the design.

Definition at line 133 of file design.f90.

◆ get_sensitivity()

procedure, pass(this) brinkman_design::brinkman_design_t::get_sensitivity ( class(brinkman_design_t), intent(in this,
type(vector_t), intent(inout values 
)

Definition at line 202 of file design_brinkman.f90.

◆ get_values() [1/2]

procedure(design_get_values), deferred, pass, public design::design_t::get_values ( class(design_t), intent(in this,
type(vector_t), intent(inout values 
)
pure virtualinherited

Definition at line 95 of file design.f90.

◆ get_values() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::get_values ( class(brinkman_design_t), intent(in this,
type(vector_t), intent(inout values 
)

Definition at line 200 of file design_brinkman.f90.

◆ get_x()

generic design::design_t::get_x ( class(design_t), intent(in this,
type(vector_t), intent(inout x 
)
inherited

Definition at line 97 of file design.f90.

◆ get_y()

generic design::design_t::get_y ( class(design_t), intent(in this,
type(vector_t), intent(inout y 
)
inherited

Definition at line 100 of file design.f90.

◆ get_z()

generic design::design_t::get_z ( class(design_t), intent(in this,
type(vector_t), intent(inout z 
)
inherited

Definition at line 103 of file design.f90.

◆ init() [1/2]

generic, public brinkman_design::brinkman_design_t::init

Definition at line 191 of file design_brinkman.f90.

◆ init() [2/2]

generic, public brinkman_design::brinkman_design_t::init

Definition at line 191 of file design_brinkman.f90.

◆ init_base()

procedure, pass(this) design::design_t::init_base ( class(design_t), intent(inout this,
character(len=*), intent(in name,
integer, intent(in n 
)
inherited
Parameters
thisThe design object.
nameThe name of the design.
nThe number of design variables.

Definition at line 128 of file design.f90.

◆ init_from_components()

procedure, pass, public brinkman_design::brinkman_design_t::init_from_components ( class(brinkman_design_t), intent(inout this,
character(len=*), intent(in name,
type(simulation_t), intent(inout simulation,
logical, intent(in dealias 
)

Definition at line 196 of file design_brinkman.f90.

◆ init_from_json()

procedure, pass(this) design::design_t::init_from_json ( class(design_t), intent(inout this,
type(json_file), intent(inout parameters 
)
inherited

This method is used to initialize the design from a JSON file. The design object will be initialized based on the parameters provided in the JSON file.

Parameters
thisThe design object.
parametersThe JSON parameters.

Definition at line 89 of file design.f90.

◆ init_from_json_sim() [1/2]

procedure, pass(this) design::design_t::init_from_json_sim ( class(design_t), intent(inout this,
type(json_file), intent(inout parameters,
type(simulation_t), intent(inout simulation 
)
inherited

This method is used to initialize the design from a JSON file. The design object will be initialized based on the parameters provided in the JSON file. The simulation object is also provided to allow for any additional setup.

Parameters
thisThe design object.
parametersThe JSON parameters.
simulationThe simulation object.

Definition at line 79 of file design.f90.

◆ init_from_json_sim() [2/2]

procedure, pass, public brinkman_design::brinkman_design_t::init_from_json_sim ( class(brinkman_design_t), intent(inout this,
type(json_file), intent(inout parameters,
type(simulation_t), intent(inout simulation 
)

Definition at line 193 of file design_brinkman.f90.

◆ load_checkpoint()

procedure, pass(this), public design::design_t::load_checkpoint ( class(design_t), intent(inout this,
character(len=*), intent(in filename 
)
inherited
Parameters
thisThe design object.
filenameThe filename to load the checkpoint from.

Definition at line 122 of file design.f90.

◆ map_backward() [1/2]

procedure(design_map_backward), deferred, pass, public design::design_t::map_backward ( class(design_t), intent(inout this,
type(vector_t), intent(in sensitivity 
)
pure virtualinherited

Definition at line 114 of file design.f90.

◆ map_backward() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::map_backward ( class(brinkman_design_t), intent(inout this,
type(vector_t), intent(in sensitivity 
)

Definition at line 227 of file design_brinkman.f90.

◆ map_forward() [1/2]

procedure(design_map_forward), deferred, pass, public design::design_t::map_forward ( class(design_t), intent(inout this)
pure virtualinherited

Definition at line 111 of file design.f90.

◆ map_forward() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::map_forward ( class(brinkman_design_t), intent(inout this)

Definition at line 223 of file design_brinkman.f90.

◆ save_checkpoint()

procedure, pass(this), public design::design_t::save_checkpoint ( class(design_t), intent(in this,
character(len=*), intent(in filename,
logical, intent(in), optional  overwrite 
)
inherited
Parameters
thisThe design object.
filenameThe filename to save the checkpoint to.
overwriteWhether to overwrite the file if it exists.

Definition at line 120 of file design.f90.

◆ size()

procedure, pass(this), public design::design_t::size ( class(design_t), intent(in this)
inherited
Parameters
thisThe design object.
Returns
The number of design variables.

Definition at line 135 of file design.f90.

◆ size_global()

procedure, pass(this), public design::design_t::size_global ( class(design_t), intent(in this)
inherited

Definition at line 137 of file design.f90.

◆ update_design() [1/2]

procedure(design_update_design), deferred, pass, public design::design_t::update_design ( class(design_t), intent(inout this,
type(vector_t), intent(inout values 
)
pure virtualinherited

Definition at line 107 of file design.f90.

◆ update_design() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::update_design ( class(brinkman_design_t), intent(inout this,
type(vector_t), intent(inout values 
)

Definition at line 218 of file design_brinkman.f90.

◆ write() [1/2]

procedure(design_write), deferred, pass, public design::design_t::write ( class(design_t), intent(inout this,
integer, intent(in idx 
)
pure virtualinherited

Definition at line 117 of file design.f90.

◆ write() [2/2]

procedure, pass(this) brinkman_design::brinkman_design_t::write ( class(brinkman_design_t), intent(inout this,
integer, intent(in idx 
)

Definition at line 235 of file design_brinkman.f90.

◆ x()

generic design::design_t::x ( class(design_t), intent(in this,
integer, intent(in i 
)
inherited

Definition at line 98 of file design.f90.

◆ y()

generic design::design_t::y ( class(design_t), intent(in this,
integer, intent(in i 
)
inherited

Definition at line 101 of file design.f90.

◆ z()

generic design::design_t::z ( class(design_t), intent(in this,
integer, intent(in i 
)
inherited

Definition at line 104 of file design.f90.

Member Data Documentation

◆ brinkman_amplitude

type(field_t), pointer brinkman_design::brinkman_design_t::brinkman_amplitude

Definition at line 86 of file design_brinkman.f90.

◆ has_mask

logical brinkman_design::brinkman_design_t::has_mask

Definition at line 176 of file design_brinkman.f90.

◆ mapping

type(mapping_handler_t) brinkman_design::brinkman_design_t::mapping
Todo:
It is currently assumed to be the Brinkman amplitude in the fluid equations. Mapping to multiple coeficients is currently not supported, ie, CHT.

Definition at line 171 of file design_brinkman.f90.

◆ n

integer design::design_t::n = 0
inherited

Definition at line 60 of file design.f90.

◆ n_global

integer design::design_t::n_global = 0
inherited

Definition at line 62 of file design.f90.

◆ optimization_domain

class(point_zone_t), pointer brinkman_design::brinkman_design_t::optimization_domain

Definition at line 174 of file design_brinkman.f90.

◆ sensitivity

type(field_t), pointer brinkman_design::brinkman_design_t::sensitivity

Definition at line 118 of file design_brinkman.f90.


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