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

Base type for a scalar advection-diffusion solver. More...

Inheritance diagram for adjoint_scalar_scheme::adjoint_scalar_scheme_t:
Collaboration diagram for adjoint_scalar_scheme::adjoint_scalar_scheme_t:

Public Member Functions

procedure, pass(this) scheme_init (this, msh, c_xh, gs_xh, params, scheme, user, rho)
 Constructor for the base type.
 
procedure, pass(this) scheme_free (this)
 Destructor for the base type.
 
procedure, pass(this) validate (this)
 Validate successful initialization.
 
procedure, pass(this) set_material_properties (this, params, user)
 Set lambda and cp.
 
procedure, pass(this) update_material_properties (t, tstep, this)
 Update variable material properties.
 
procedure(adjoint_scalar_scheme_init_intrf), deferred, pass init (this, msh, coef, gs, params, user, ulag, vlag, wlag, time_scheme, rho)
 Constructor.
 
procedure(adjoint_scalar_scheme_free_intrf), deferred, pass free (this)
 Destructor.
 
procedure(adjoint_scalar_scheme_step_intrf), deferred, pass step (this, t, tstep, dt, ext_bdf, dt_controller)
 Solve for the current timestep.
 
procedure(adjoint_scalar_scheme_restart_intrf), deferred, pass restart (this, dtlag, tlag)
 Restart from a checkpoint.
 

Public Attributes

character(len=:), allocatable name
 A name that can be used to distinguish this solver in e.g. user routines.
 
type(field_t), pointer u
 x-component of Velocity
 
type(field_t), pointer v
 y-component of Velocity
 
type(field_t), pointer w
 z-component of Velocity
 
type(field_t), pointer s
 The forward scalar.
 
type(field_t), pointer s_adj
 The adjoint scalar.
 
type(field_series_t) s_adj_lag
 Lag arrays, i.e. solutions at previous timesteps.
 
type(space_t), pointer xh
 Function space \( X_h \).
 
type(dofmap_t), pointer dm_xh
 Dofmap associated with \( X_h \).
 
type(gs_t), pointer gs_xh
 Gather-scatter associated with \( X_h \).
 
type(coef_t), pointer c_xh
 Coefficients associated with \( X_h \).
 
type(field_t), pointer f_xh => null()
 Right-hand side.
 
type(scalar_source_term_t) source_term
 The source term for equation.
 
class(ksp_t), allocatable ksp
 Krylov solver.
 
integer ksp_maxiter
 Max iterations in the Krylov solver.
 
integer projection_dim
 Projection space size.
 
integer projection_activ_step
 
class(pc_t), allocatable pc
 Preconditioner.
 
type(bc_list_t) bcs
 List of boundary conditions, including the user one.
 
type(json_file), pointer params
 Case paramters.
 
type(mesh_t), pointer msh => null()
 Mesh.
 
type(chkp_t), pointer chkp => null()
 Checkpoint for restarts.
 
character(len=:), allocatable nut_field_name
 The turbulent kinematic viscosity field name.
 
type(field_t), pointer rho => null()
 Density.
 
type(field_t) lambda
 Thermal diffusivity.
 
type(field_t) cp
 Specific heat capacity.
 
real(kind=rp) pr_turb
 Turbulent Prandtl number.
 
type(field_list_t) material_properties
 Field list with cp and lambda.
 
logical variable_material_properties = .false.
 Is lambda varying in time? Currently only due to LES models.
 
logical if_gradient_jump_penalty
 Gradient jump panelty.
 
type(gradient_jump_penalty_t) gradient_jump_penalty
 

Static Public Attributes

procedure(user_material_properties), pointer, nopass user_material_properties => null()
 

Detailed Description

Definition at line 87 of file adjoint_scalar_scheme.f90.

Member Function/Subroutine Documentation

◆ free()

procedure(adjoint_scalar_scheme_free_intrf), deferred, pass adjoint_scalar_scheme::adjoint_scalar_scheme_t::free ( class(adjoint_scalar_scheme_t), intent(inout)  this)
pure virtual

Definition at line 167 of file adjoint_scalar_scheme.f90.

◆ init()

procedure(adjoint_scalar_scheme_init_intrf), deferred, pass adjoint_scalar_scheme::adjoint_scalar_scheme_t::init ( class(adjoint_scalar_scheme_t), intent(inout), target  this,
type(mesh_t), intent(in), target  msh,
type(coef_t), intent(in), target  coef,
type(gs_t), intent(inout), target  gs,
type(json_file), intent(inout), target  params,
type(user_t), intent(in), target  user,
type(field_series_t), intent(in), target  ulag,
type(field_series_t), intent(in), target  vlag,
type(field_series_t), intent(in), target  wlag,
type(time_scheme_controller_t), intent(in), target  time_scheme,
type(field_t), intent(in), target  rho 
)
pure virtual

Definition at line 165 of file adjoint_scalar_scheme.f90.

◆ restart()

procedure(adjoint_scalar_scheme_restart_intrf), deferred, pass adjoint_scalar_scheme::adjoint_scalar_scheme_t::restart ( class(adjoint_scalar_scheme_t), intent(inout), target  this,
real(kind=rp), dimension(10)  dtlag,
real(kind=rp), dimension(10)  tlag 
)
pure virtual

Definition at line 171 of file adjoint_scalar_scheme.f90.

◆ scheme_free()

procedure, pass(this) adjoint_scalar_scheme::adjoint_scalar_scheme_t::scheme_free ( class(adjoint_scalar_scheme_t), intent(inout)  this)

Definition at line 155 of file adjoint_scalar_scheme.f90.

◆ scheme_init()

procedure, pass(this) adjoint_scalar_scheme::adjoint_scalar_scheme_t::scheme_init ( class(adjoint_scalar_scheme_t), intent(inout), target  this,
type(mesh_t), intent(in), target  msh,
type(coef_t), intent(in), target  c_xh,
type(gs_t), intent(inout), target  gs_xh,
type(json_file), intent(inout), target  params,
character(len=*), intent(in)  scheme,
type(user_t), intent(in), target  user,
type(field_t), intent(in), target  rho 
)
Parameters
[in,out]thisThe object.
mshThe mesh.
c_XhThe coefficients.
gs_XhThe gather-scatter.
paramsThe case parameter file in json.
schemeThe name of the scalar scheme.
userType with user-defined procedures.
rhoThe density of the fluid.

Definition at line 153 of file adjoint_scalar_scheme.f90.

◆ set_material_properties()

procedure, pass(this) adjoint_scalar_scheme::adjoint_scalar_scheme_t::set_material_properties ( class(adjoint_scalar_scheme_t), intent(inout)  this,
type(json_file), intent(inout)  params,
type(user_t), intent(in), target  user 
)
Parameters
[in,out]thisThe object.
paramsThe case parameter file.
userThe user interface.

Definition at line 159 of file adjoint_scalar_scheme.f90.

◆ step()

procedure(adjoint_scalar_scheme_step_intrf), deferred, pass adjoint_scalar_scheme::adjoint_scalar_scheme_t::step ( class(adjoint_scalar_scheme_t), intent(inout)  this,
real(kind=rp), intent(in)  t,
integer, intent(in)  tstep,
real(kind=rp), intent(in)  dt,
type(time_scheme_controller_t), intent(in)  ext_bdf,
type(time_step_controller_t), intent(in)  dt_controller 
)
pure virtual

Definition at line 169 of file adjoint_scalar_scheme.f90.

◆ update_material_properties()

procedure, pass(this) adjoint_scalar_scheme::adjoint_scalar_scheme_t::update_material_properties ( real(kind=rp), intent(in)  t,
integer, intent(in)  tstep,
class(adjoint_scalar_scheme_t), intent(inout)  this 
)
Parameters
[in,out]thisThe object.
tTime value.
tstepCurrent time step.

Definition at line 162 of file adjoint_scalar_scheme.f90.

◆ validate()

procedure, pass(this) adjoint_scalar_scheme::adjoint_scalar_scheme_t::validate ( class(adjoint_scalar_scheme_t), intent(inout), target  this)

Definition at line 157 of file adjoint_scalar_scheme.f90.

Member Data Documentation

◆ bcs

type(bc_list_t) adjoint_scalar_scheme::adjoint_scalar_scheme_t::bcs

Definition at line 125 of file adjoint_scalar_scheme.f90.

◆ c_xh

type(coef_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::c_xh

Definition at line 109 of file adjoint_scalar_scheme.f90.

◆ chkp

type(chkp_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::chkp => null()

Definition at line 131 of file adjoint_scalar_scheme.f90.

◆ cp

type(field_t) adjoint_scalar_scheme::adjoint_scalar_scheme_t::cp

Definition at line 139 of file adjoint_scalar_scheme.f90.

◆ dm_xh

type(dofmap_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::dm_xh

Definition at line 105 of file adjoint_scalar_scheme.f90.

◆ f_xh

type(field_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::f_xh => null()

Definition at line 111 of file adjoint_scalar_scheme.f90.

◆ gradient_jump_penalty

type(gradient_jump_penalty_t) adjoint_scalar_scheme::adjoint_scalar_scheme_t::gradient_jump_penalty

Definition at line 150 of file adjoint_scalar_scheme.f90.

◆ gs_xh

type(gs_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::gs_xh

Definition at line 107 of file adjoint_scalar_scheme.f90.

◆ if_gradient_jump_penalty

logical adjoint_scalar_scheme::adjoint_scalar_scheme_t::if_gradient_jump_penalty

Definition at line 149 of file adjoint_scalar_scheme.f90.

◆ ksp

class(ksp_t), allocatable adjoint_scalar_scheme::adjoint_scalar_scheme_t::ksp

Definition at line 115 of file adjoint_scalar_scheme.f90.

◆ ksp_maxiter

integer adjoint_scalar_scheme::adjoint_scalar_scheme_t::ksp_maxiter

Definition at line 117 of file adjoint_scalar_scheme.f90.

◆ lambda

type(field_t) adjoint_scalar_scheme::adjoint_scalar_scheme_t::lambda

Definition at line 137 of file adjoint_scalar_scheme.f90.

◆ material_properties

type(field_list_t) adjoint_scalar_scheme::adjoint_scalar_scheme_t::material_properties

Definition at line 143 of file adjoint_scalar_scheme.f90.

◆ msh

type(mesh_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::msh => null()

Definition at line 129 of file adjoint_scalar_scheme.f90.

◆ name

character(len=:), allocatable adjoint_scalar_scheme::adjoint_scalar_scheme_t::name

Definition at line 89 of file adjoint_scalar_scheme.f90.

◆ nut_field_name

character(len=:), allocatable adjoint_scalar_scheme::adjoint_scalar_scheme_t::nut_field_name

Definition at line 133 of file adjoint_scalar_scheme.f90.

◆ params

type(json_file), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::params

Definition at line 127 of file adjoint_scalar_scheme.f90.

◆ pc

class(pc_t), allocatable adjoint_scalar_scheme::adjoint_scalar_scheme_t::pc

Definition at line 123 of file adjoint_scalar_scheme.f90.

◆ pr_turb

real(kind=rp) adjoint_scalar_scheme::adjoint_scalar_scheme_t::pr_turb

Definition at line 141 of file adjoint_scalar_scheme.f90.

◆ projection_activ_step

integer adjoint_scalar_scheme::adjoint_scalar_scheme_t::projection_activ_step

Definition at line 121 of file adjoint_scalar_scheme.f90.

◆ projection_dim

integer adjoint_scalar_scheme::adjoint_scalar_scheme_t::projection_dim

Steps to activate projection for ksp

Definition at line 119 of file adjoint_scalar_scheme.f90.

◆ rho

type(field_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::rho => null()

Definition at line 135 of file adjoint_scalar_scheme.f90.

◆ s

type(field_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::s

Definition at line 97 of file adjoint_scalar_scheme.f90.

◆ s_adj

type(field_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::s_adj

Definition at line 99 of file adjoint_scalar_scheme.f90.

◆ s_adj_lag

type(field_series_t) adjoint_scalar_scheme::adjoint_scalar_scheme_t::s_adj_lag

Definition at line 101 of file adjoint_scalar_scheme.f90.

◆ source_term

type(scalar_source_term_t) adjoint_scalar_scheme::adjoint_scalar_scheme_t::source_term

Definition at line 113 of file adjoint_scalar_scheme.f90.

◆ u

type(field_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::u

Definition at line 91 of file adjoint_scalar_scheme.f90.

◆ user_material_properties

procedure(user_material_properties), pointer, nopass adjoint_scalar_scheme::adjoint_scalar_scheme_t::user_material_properties => null()
static

Definition at line 146 of file adjoint_scalar_scheme.f90.

◆ v

type(field_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::v

Definition at line 93 of file adjoint_scalar_scheme.f90.

◆ variable_material_properties

logical adjoint_scalar_scheme::adjoint_scalar_scheme_t::variable_material_properties = .false.

Definition at line 145 of file adjoint_scalar_scheme.f90.

◆ w

type(field_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::w

Definition at line 95 of file adjoint_scalar_scheme.f90.

◆ xh

type(space_t), pointer adjoint_scalar_scheme::adjoint_scalar_scheme_t::xh

Definition at line 103 of file adjoint_scalar_scheme.f90.


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