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

Abstract class for handling mapping_cascade. More...

Collaboration diagram for mapping_handler::mapping_handler_t:

Public Member Functions

procedure, pass(thisinit_base (this, coef)
 Constructor.
 
procedure, pass(thisfree (this)
 Destructor.
 
generic apply_forward (this, x_out, x_in)
 Cycle through all the mapping_cascade and return the final field.
 
generic apply_forward (this, x_out, x_in)
 Cycle through all the mapping_cascade and return the final field.
 
procedure, pass(thismapping_handler_apply_forward_field (this, x_out, x_in)
 apply the cascade of mapping_cascade.
 
procedure, pass(thismapping_handler_apply_forward_vector (this, x_out, x_in)
 apply the cascade of mapping_cascade.
 
generic apply_backward (this, sens_out, sens_in)
 Cycle backwards through all the mapping_cascade and return the sensitivity.
 
generic apply_backward (this, x_out, x_in)
 Cycle backwards through all the mapping_cascade and return the sensitivity.
 
procedure, pass(thismapping_handler_apply_backward_field (this, sens_out, sens_in)
 Apply the cascade of mapping_cascade.
 
procedure, pass(thismapping_handler_apply_backward_vector (this, x_out, x_in)
 apply the cascade of mapping_cascade.
 
generic add (this, mapping)
 Generic interface to add a mapping to the list.
 
generic add (this, json, name)
 Generic interface to add a mapping to the list.
 
procedure, pass(thisadd_mapping (this, mapping)
 Append a new mapping to the mapping_cascade array.
 
procedure, pass(thisadd_json_mappings (this, json, name)
 Read from the json file and initialize the mapping_cascade.
 
procedure, pass(thismake_cts (this, fld)
 Force a field to be continuous.
 
procedure, pass(thisinit_output_fields (this, design_out, sensitivity_out, verbose_design, verbose_sensitivity, output_precision)
 Configure output fields and initialize mapping-stage writers.
 
procedure, pass(thiswrite_design (this, idx)
 Write design and forward-mapping stages.
 
procedure, pass(thiswrite_sensitivity (this, idx)
 Write sensitivity and backward-mapping stages.
 

Public Attributes

class(mapping_wrapper_t), dimension(:), allocatable mapping_cascade
 Array of mapping_cascade.
 
type(coef_t), pointer coef
 The coefficients of the (space, mesh) pair.
 
type(fld_file_output_t) design_output
 Output for design and intermediate forward-mapping stages.
 
type(fld_file_output_t) sensitivity_output
 Output for sensitivity and intermediate backward-mapping stages.
 
type(field_t), pointer design_out => null()
 Field pointers used to initialize design/sensitivity outputs.
 
type(field_t), pointer sensitivity_out => null()
 
type(field_t), dimension(:), allocatable sensitivity_stages
 Internal storage of sensitivity propagation stages.
 
logical output_fields_set = .false.
 Flags controlling output initialization.
 
logical outputs_initialized = .false.
 
logical verbose_design = .false.
 Flag controlling output verbose design output (default = false).
 
logical verbose_sensitivity = .false.
 Flag controlling output verbose sensitivity output (default = false).
 
integer output_precision = sp
 Precision used for design/sensitivity fld outputs.
 

Detailed Description

This class is responsible for managing the mapping_cascade in a sequential manor. It is also responsible for using the chain rule to propagate sensitivity backwards throughout the system.

Definition at line 65 of file mapping_handler.f90.

Member Function/Subroutine Documentation

◆ add() [1/2]

generic mapping_handler::mapping_handler_t::add ( class(mapping_handler_t), intent(inout this,
type(json_file), intent(inout json,
character(len=*), intent(in name 
)

Definition at line 108 of file mapping_handler.f90.

◆ add() [2/2]

generic mapping_handler::mapping_handler_t::add ( class(mapping_handler_t), intent(inout this,
class(mapping_t), intent(in mapping 
)
Parameters
thisThe handler object
mappingThe mapping to be added.

Definition at line 108 of file mapping_handler.f90.

◆ add_json_mappings()

procedure, pass(this) mapping_handler::mapping_handler_t::add_json_mappings ( class(mapping_handler_t), intent(inout this,
type(json_file), intent(inout json,
character(len=*), intent(in name 
)

Definition at line 113 of file mapping_handler.f90.

◆ add_mapping()

procedure, pass(this) mapping_handler::mapping_handler_t::add_mapping ( class(mapping_handler_t), intent(inout this,
class(mapping_t), intent(in mapping 
)
Parameters
thisThe handler object
mappingThe mapping to be added.

Definition at line 110 of file mapping_handler.f90.

◆ apply_backward() [1/2]

generic mapping_handler::mapping_handler_t::apply_backward ( class(mapping_handler_t), intent(inout this,
type(field_t), intent(inout sens_out,
type(field_t), intent(in sens_in 
)
Parameters
thisThe handler object
sens_outThe sensitivity after applying the chain rule ( \(\frac{\partial F}{\partial \rho}\))
sens_inThe sensitivity before applying the chain rule ( \(\frac{\partial F}{\partial \tilde{\rho}}\))

Definition at line 103 of file mapping_handler.f90.

◆ apply_backward() [2/2]

generic mapping_handler::mapping_handler_t::apply_backward ( class(mapping_handler_t), intent(inout this,
type(vector_t), intent(inout x_out,
type(vector_t), intent(in x_in 
)
Parameters
thisThe handler object
X_outThe sensitivity after applying the chain rule ( \(\frac{\partial F}{\partial \rho}\))
X_inThe sensitivity before applying the chain rule ( \(\frac{\partial F}{\partial \tilde{\rho}}\))

Definition at line 103 of file mapping_handler.f90.

◆ apply_forward() [1/2]

generic mapping_handler::mapping_handler_t::apply_forward ( class(mapping_handler_t), intent(inout this,
type(field_t), intent(inout x_out,
type(field_t), intent(in x_in 
)
Parameters
thisThe handler object
X_outThe mapped field ( \(\tilde{\rho}\))
X_inThe unmapped field ( \(\rho\))

Definition at line 97 of file mapping_handler.f90.

◆ apply_forward() [2/2]

generic mapping_handler::mapping_handler_t::apply_forward ( class(mapping_handler_t), intent(inout this,
type(vector_t), intent(inout x_out,
type(vector_t), intent(in x_in 
)
Parameters
thisThe handler object
X_outThe mapped vector ( \(\tilde{\rho}\))
X_inThe unmapped vector ( \(\rho\))

Definition at line 97 of file mapping_handler.f90.

◆ free()

procedure, pass(this) mapping_handler::mapping_handler_t::free ( class(mapping_handler_t), intent(inout this)

Definition at line 95 of file mapping_handler.f90.

◆ init_base()

procedure, pass(this) mapping_handler::mapping_handler_t::init_base ( class(mapping_handler_t), intent(inout this,
type(coef_t), intent(in), target  coef 
)

Definition at line 93 of file mapping_handler.f90.

◆ init_output_fields()

procedure, pass(this) mapping_handler::mapping_handler_t::init_output_fields ( class(mapping_handler_t), intent(inout this,
type(field_t), intent(inout), target  design_out,
type(field_t), intent(inout), target  sensitivity_out,
logical, intent(in), optional  verbose_design,
logical, intent(in), optional  verbose_sensitivity,
integer, intent(in), optional  output_precision 
)
Parameters
thisThe handler object.
design_outFinal mapped design field.
sensitivity_outFinal backward-mapped sensitivity field.
[in]verbose_designIf true, output all forward cascade stages.
[in]verbose_sensitivityIf true, output all backward stages.
[in]output_precisionOutput precision (sp or dp).

Definition at line 118 of file mapping_handler.f90.

◆ make_cts()

procedure, pass(this) mapping_handler::mapping_handler_t::make_cts ( class(mapping_handler_t), intent(inout this,
type(field_t), intent(inout fld 
)
Parameters
thisThe handler object
fldThe field to be made continuous.

Definition at line 116 of file mapping_handler.f90.

◆ mapping_handler_apply_backward_field()

procedure, pass(this) mapping_handler::mapping_handler_t::mapping_handler_apply_backward_field ( class(mapping_handler_t), intent(inout this,
type(field_t), intent(inout sens_out,
type(field_t), intent(in sens_in 
)
Parameters
thisThe handler object
sens_outThe sensitivity after applying the chain rule ( \(\frac{\partial F}{\partial \rho}\))
sens_inThe sensitivity before applying the chain rule ( \(\frac{\partial F}{\partial \tilde{\rho}}\))

Definition at line 105 of file mapping_handler.f90.

◆ mapping_handler_apply_backward_vector()

procedure, pass(this) mapping_handler::mapping_handler_t::mapping_handler_apply_backward_vector ( class(mapping_handler_t), intent(inout this,
type(vector_t), intent(inout x_out,
type(vector_t), intent(in x_in 
)
Parameters
thisThe handler object
X_outThe sensitivity after applying the chain rule ( \(\frac{\partial F}{\partial \rho}\))
X_inThe sensitivity before applying the chain rule ( \(\frac{\partial F}{\partial \tilde{\rho}}\))

Definition at line 106 of file mapping_handler.f90.

◆ mapping_handler_apply_forward_field()

procedure, pass(this) mapping_handler::mapping_handler_t::mapping_handler_apply_forward_field ( class(mapping_handler_t), intent(inout this,
type(field_t), intent(inout x_out,
type(field_t), intent(in x_in 
)
Parameters
thisThe handler object
X_outThe mapped field ( \(\tilde{\rho}\))
X_inThe unmapped field ( \(\rho\))

Definition at line 99 of file mapping_handler.f90.

◆ mapping_handler_apply_forward_vector()

procedure, pass(this) mapping_handler::mapping_handler_t::mapping_handler_apply_forward_vector ( class(mapping_handler_t), intent(inout this,
type(vector_t), intent(inout x_out,
type(vector_t), intent(in x_in 
)
Parameters
thisThe handler object
X_outThe mapped vector ( \(\tilde{\rho}\))
X_inThe unmapped vector ( \(\rho\))

Definition at line 100 of file mapping_handler.f90.

◆ write_design()

procedure, pass(this) mapping_handler::mapping_handler_t::write_design ( class(mapping_handler_t), intent(inout this,
integer, intent(in idx 
)
Parameters
thisThe handler object.
[in]idxOutput sample index.

Definition at line 121 of file mapping_handler.f90.

◆ write_sensitivity()

procedure, pass(this) mapping_handler::mapping_handler_t::write_sensitivity ( class(mapping_handler_t), intent(inout this,
integer, intent(in idx 
)
Parameters
thisThe handler object.
[in]idxOutput sample index.

Definition at line 123 of file mapping_handler.f90.

Member Data Documentation

◆ coef

type(coef_t), pointer mapping_handler::mapping_handler_t::coef

Definition at line 71 of file mapping_handler.f90.

◆ design_out

type(field_t), pointer mapping_handler::mapping_handler_t::design_out => null()

Definition at line 77 of file mapping_handler.f90.

◆ design_output

type(fld_file_output_t) mapping_handler::mapping_handler_t::design_output

Definition at line 73 of file mapping_handler.f90.

◆ mapping_cascade

class(mapping_wrapper_t), dimension(:), allocatable mapping_handler::mapping_handler_t::mapping_cascade
Note
the order really matter's here since they'll be executed in sequence.

Definition at line 69 of file mapping_handler.f90.

◆ output_fields_set

logical mapping_handler::mapping_handler_t::output_fields_set = .false.

Definition at line 82 of file mapping_handler.f90.

◆ output_precision

integer mapping_handler::mapping_handler_t::output_precision = sp

Definition at line 89 of file mapping_handler.f90.

◆ outputs_initialized

logical mapping_handler::mapping_handler_t::outputs_initialized = .false.

Definition at line 83 of file mapping_handler.f90.

◆ sensitivity_out

type(field_t), pointer mapping_handler::mapping_handler_t::sensitivity_out => null()

Definition at line 78 of file mapping_handler.f90.

◆ sensitivity_output

type(fld_file_output_t) mapping_handler::mapping_handler_t::sensitivity_output

Definition at line 75 of file mapping_handler.f90.

◆ sensitivity_stages

type(field_t), dimension(:), allocatable mapping_handler::mapping_handler_t::sensitivity_stages

Definition at line 80 of file mapping_handler.f90.

◆ verbose_design

logical mapping_handler::mapping_handler_t::verbose_design = .false.

Definition at line 85 of file mapping_handler.f90.

◆ verbose_sensitivity

logical mapping_handler::mapping_handler_t::verbose_sensitivity = .false.

Definition at line 87 of file mapping_handler.f90.


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