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

A Borrvall & Petersson mapping of coefficients This is the material interpolation described by Borrvall & Petersson https://doi.org/10.1002/fld.426. More...

Inheritance diagram for borrvall_petersson_mapping::borrvall_petersson_mapping_t:
Collaboration diagram for borrvall_petersson_mapping::borrvall_petersson_mapping_t:

Public Member Functions

procedure, pass(thisinit (this, json, coef)
 Constructor from json.
 
procedure, pass(thisinit_from_attributes (this, coef, f_min, f_max, q)
 Actual constructor.
 
procedure, pass(thisfree (this)
 Destructor.
 
procedure, pass(thisforward_mapping (this, x_out, x_in)
 Apply the forward mapping.
 
procedure, pass(thisbackward_mapping (this, sens_out, sens_in, x_in)
 Apply the adjoint mapping.
 
procedure, pass(thisinit_base (this, json, coef, fld_name)
 Constructor for the mapping_t class.
 
procedure, pass(thisfree_base (this)
 Destructor for the mapping_t (base) class.
 
procedure, pass(thisapply_forward (this, x_out, x_in)
 Apply the forward mapping.
 
procedure, pass(thisapply_backward (this, sens_out, sens_in)
 Apply the backward mapping (ie, chain rule)
 
procedure(mapping_init), deferred, pass init (this, json, coef)
 The common constructor using a JSON dictionary.
 
procedure(mapping_free), deferred, pass free (this)
 Destructor.
 
procedure(mapping_forward_mapping), deferred, pass forward_mapping (this, x_out, x_in)
 forward mapping to be computed
 
procedure(mapping_backward_mapping), deferred, pass backward_mapping (this, sens_out, sens_in, x_in)
 Backward mapping to be computed.
 

Public Attributes

real(kind=rp) f_min
 minimum value (the fluid-side value)
 
real(kind=rp) f_max
 maximum value (the solid-side value)
 
real(kind=rp) q
 penalty parameter
 
type(coef_t), pointer coef => null()
 Coefficients for the SEM.
 
type(field_t), pointer x_in => null()
 A copy of the unmapped field (often used for chain rule)
 
character(len=80) fld_name = ""
 A name for the field.
 

Detailed Description

It reuses the shape function \(S(x) = x \frac{q + 1}{x + q}\) (with \(S(0)=0\), \(S(1)=1\)), assembled so that the mapping is decreasing:

\(f(x) = f_{max} + (f_{min} - f_{max}) S(x)\)

with \(f(0) = f_{max}\) (solid) and \(f(1) = f_{min}\) (fluid), steepest near \(x \to 0\), for the convention x=0: solid, x=1: fluid. This is the converse of the ordinary RAMP mapping.

|. | . | . | .. | ... |_________

The shape function is identical to the historic RAMP "convex up" form; only the assembly of f_min/f_max is corrected. This is realised by calling the (unmodified) kernel entry points with f_min and f_max swapped at the call site (see forward/backward mapping below).

Definition at line 81 of file Borrvall_Petersson_mapping.f90.

Member Function/Subroutine Documentation

◆ apply_backward()

procedure, pass(this) mapping::mapping_t::apply_backward ( class(mapping_t), intent(inout this,
type(field_t), intent(inout sens_out,
type(field_t), intent(in sens_in 
)
inherited
Parameters
thisThe mapping object
sens_insensitivity wrt to the mapped field ( \(\frac{\partial F}{\partial \tilde{\rho}}\))
sens_outsensitivity wrt to the unmapped field ( \(\frac{\partial F}{\partial \rho}\))

Definition at line 63 of file mapping.f90.

◆ apply_forward()

procedure, pass(this) mapping::mapping_t::apply_forward ( class(mapping_t), intent(inout this,
type(field_t), intent(inout x_out,
type(field_t), intent(in x_in 
)
inherited
Parameters
thisThe mapping object
X_outThe mapped field ( \(\tilde{\rho}\))
X_inThe unmapped field ( \(\rho\))

Definition at line 61 of file mapping.f90.

◆ backward_mapping() [1/2]

procedure, pass(this) borrvall_petersson_mapping::borrvall_petersson_mapping_t::backward_mapping ( class(borrvall_petersson_mapping_t), intent(inout this,
type(field_t), intent(inout sens_out,
type(field_t), intent(in sens_in,
type(field_t), intent(in x_in 
)
Parameters
thismapping
sens_outis the sensitivity with respect to the unfiltered design
sens_inis the sensitivity with respect to the filtered design
X_inunmapped field

Definition at line 101 of file Borrvall_Petersson_mapping.f90.

◆ backward_mapping() [2/2]

procedure(mapping_backward_mapping), deferred, pass mapping::mapping_t::backward_mapping ( class(mapping_t), intent(inout this,
type(field_t), intent(inout sens_out,
type(field_t), intent(in sens_in,
type(field_t), intent(in x_in 
)
pure virtualinherited

Definition at line 71 of file mapping.f90.

◆ forward_mapping() [1/2]

procedure, pass(this) borrvall_petersson_mapping::borrvall_petersson_mapping_t::forward_mapping ( class(borrvall_petersson_mapping_t), intent(inout this,
type(field_t), intent(inout x_out,
type(field_t), intent(in x_in 
)
Parameters
thismapping
X_outmapped field
X_inunmapped field

Definition at line 98 of file Borrvall_Petersson_mapping.f90.

◆ forward_mapping() [2/2]

procedure(mapping_forward_mapping), deferred, pass mapping::mapping_t::forward_mapping ( class(mapping_t), intent(inout this,
type(field_t), intent(inout x_out,
type(field_t), intent(in x_in 
)
pure virtualinherited

Definition at line 69 of file mapping.f90.

◆ free() [1/2]

procedure, pass(this) borrvall_petersson_mapping::borrvall_petersson_mapping_t::free ( class(borrvall_petersson_mapping_t), intent(inout this)

Definition at line 96 of file Borrvall_Petersson_mapping.f90.

◆ free() [2/2]

procedure(mapping_free), deferred, pass mapping::mapping_t::free ( class(mapping_t), intent(inout this)
pure virtualinherited

Definition at line 67 of file mapping.f90.

◆ free_base()

procedure, pass(this) mapping::mapping_t::free_base ( class(mapping_t), intent(inout this)
inherited

Definition at line 59 of file mapping.f90.

◆ init() [1/2]

procedure, pass(this) borrvall_petersson_mapping::borrvall_petersson_mapping_t::init ( class(borrvall_petersson_mapping_t), intent(inout this,
type(json_file), intent(inout json,
type(coef_t), intent(inout coef 
)

Definition at line 91 of file Borrvall_Petersson_mapping.f90.

◆ init() [2/2]

procedure(mapping_init), deferred, pass mapping::mapping_t::init ( class(mapping_t), intent(inout this,
type(json_file), intent(inout json,
type(coef_t), intent(inout coef 
)
pure virtualinherited

Definition at line 65 of file mapping.f90.

◆ init_base()

procedure, pass(this) mapping::mapping_t::init_base ( class(mapping_t), intent(inout this,
type(json_file), intent(inout json,
type(coef_t), intent(inout), target  coef,
character(len=*), intent(in fld_name 
)
inherited

Definition at line 57 of file mapping.f90.

◆ init_from_attributes()

procedure, pass(this) borrvall_petersson_mapping::borrvall_petersson_mapping_t::init_from_attributes ( class(borrvall_petersson_mapping_t), intent(inout this,
type(coef_t), intent(inout coef,
real(kind=rp), intent(in f_min,
real(kind=rp), intent(in f_max,
real(kind=rp), intent(in q 
)

Definition at line 93 of file Borrvall_Petersson_mapping.f90.

Member Data Documentation

◆ coef

type(coef_t), pointer mapping::mapping_t::coef => null()
inherited

Definition at line 49 of file mapping.f90.

◆ f_max

real(kind=rp) borrvall_petersson_mapping::borrvall_petersson_mapping_t::f_max

Definition at line 85 of file Borrvall_Petersson_mapping.f90.

◆ f_min

real(kind=rp) borrvall_petersson_mapping::borrvall_petersson_mapping_t::f_min

Definition at line 83 of file Borrvall_Petersson_mapping.f90.

◆ fld_name

character(len=80) mapping::mapping_t::fld_name = ""
inherited

Definition at line 53 of file mapping.f90.

◆ q

real(kind=rp) borrvall_petersson_mapping::borrvall_petersson_mapping_t::q

Definition at line 87 of file Borrvall_Petersson_mapping.f90.

◆ x_in

type(field_t), pointer mapping::mapping_t::x_in => null()
inherited

Definition at line 51 of file mapping.f90.


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