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

Base type of all fluid formulations. More...

Inheritance diagram for adjoint_fluid_scheme::adjoint_fluid_scheme_t:
Collaboration diagram for adjoint_fluid_scheme::adjoint_fluid_scheme_t:

Public Member Functions

procedure, pass(thisinit_base (this, msh, lx, params, scheme, user, kspv_init)
 Constructor for the base type.
 
procedure, pass(thisscheme_free (this)
 Destructor for the base type.
 
procedure, pass(thisvalidate (this)
 Validate that all components are properly allocated.
 
procedure, pass(thisbc_apply_vel (this, t, tstep, strong)
 Apply pressure boundary conditions.
 
procedure, pass(thisbc_apply_prs (this, t, tstep)
 Apply velocity boundary conditions.
 
procedure, pass(thiscompute_cfl (this, dt)
 Compute the CFL number.
 
procedure, pass(thisset_material_properties (this, params, user)
 Set rho and mu.
 
procedure(adjoint_fluid_scheme_init_intrf), deferred, pass init (this, msh, lx, params, user, time_scheme)
 Constructor.
 
procedure(adjoint_fluid_scheme_free_intrf), deferred, pass free (this)
 Destructor.
 
procedure(adjoint_fluid_scheme_step_intrf), deferred, pass step (this, t, tstep, dt, ext_bdf, dt_controller)
 Advance one step in time.
 
procedure(adjoint_fluid_scheme_restart_intrf), deferred, pass restart (this, dtlag, tlag)
 Restart from a checkpoint.
 
procedure(adjoint_fluid_scheme_setup_bcs_intrf), deferred, pass setup_bcs (this, user, params)
 Setup boundary conditions.
 
procedure, pass(thisupdate_material_properties (this)
 Update variable material properties.
 
procedure, pass(thisprecon_factory_ (this, pc, ksp, coef, dof, gs, bclst, pctype)
 Preconditioner factory.
 

Static Public Member Functions

procedure, nopass solver_factory (ksp, n, solver, max_iter, abstol, monitor)
 Linear solver factory, wraps a KSP constructor.
 

Public Attributes

type(field_t), pointer u_adj => null()
 x-component of Velocity
 
type(field_t), pointer v_adj => null()
 y-component of Velocity
 
type(field_t), pointer w_adj => null()
 z-component of Velocity
 
type(field_t), pointer p_adj => null()
 Pressure.
 
type(field_series_t) ulag
 fluid field (lag)
 
type(field_series_t) vlag
 
type(field_series_t) wlag
 
type(space_t) xh
 Function space \( X_h \).
 
type(dofmap_t) dm_xh
 Dofmap associated with \( X_h \).
 
type(gs_t) gs_xh
 Gather-scatter associated with \( X_h \).
 
type(coef_t) c_xh
 Coefficients associated with \( X_h \).
 
type(adjoint_source_term_tsource_term
 The source term for the momentum equation.
 
type(field_t), pointer f_adj_x => null()
 X-component of the right-hand side.
 
type(field_t), pointer f_adj_y => null()
 Y-component of the right-hand side.
 
type(field_t), pointer f_adj_z => null()
 Z-component of the right-hand side.
 
class(ksp_t), allocatable ksp_vel
 Krylov solver for velocity.
 
class(ksp_t), allocatable ksp_prs
 Krylov solver for pressure.
 
class(pc_t), allocatable pc_vel
 Velocity Preconditioner.
 
class(pc_t), allocatable pc_prs
 Velocity Preconditioner.
 
integer vel_projection_dim
 Size of the projection space for ksp_vel.
 
integer pr_projection_dim
 Size of the projection space for ksp_pr.
 
integer vel_projection_activ_step
 Steps to activate projection for ksp_vel.
 
integer pr_projection_activ_step
 Steps to activate projection for ksp_pr.
 
logical strict_convergence
 Strict convergence for the velocity solver.
 
logical if_gradient_jump_penalty
 Gradient jump panelty.
 
type(gradient_jump_penalty_t) gradient_jump_penalty_u_adj
 
type(gradient_jump_penalty_t) gradient_jump_penalty_v_adj
 
type(gradient_jump_penalty_t) gradient_jump_penalty_w_adj
 
type(bc_list_t) bcs_prs
 
type(bc_list_t) bcs_vel
 
type(mesh_t), pointer msh => null()
 Mesh.
 
type(chkp_t) chkp
 Checkpoint.
 
type(mean_flow_t) mean
 Mean flow field.
 
type(fluid_stats_t) stats
 Fluid statistics.
 
type(mean_sqr_flow_t) mean_sqr
 Mean squared flow field.
 
logical forced_flow_rate = .false.
 Is the flow rate forced?
 
logical freeze = .false.
 Freeze velocity at initial condition?
 
real(kind=rp) mu
 Dynamic viscosity.
 
type(field_t) mu_field
 The variable mu field.
 
character(len=:), allocatable nut_field_name
 The turbulent kinematic viscosity field name.
 
logical variable_material_properties = .false.
 Is mu varying in time? Currently only due to LES models.
 
real(kind=rp) rho
 Density.
 
type(field_t) rho_field
 The variable density field.
 
integer(kind=i8) glb_n_points
 Global number of GLL points for the fluid (not unique)
 
integer(kind=i8) glb_unique_points
 Global number of GLL points for the fluid (unique)
 
type(scratch_registry_t) scratch
 Manager for temporary fields.
 

Detailed Description

Definition at line 90 of file adjoint_fluid_scheme.f90.

Member Function/Subroutine Documentation

◆ bc_apply_prs()

procedure, pass(this) adjoint_fluid_scheme::adjoint_fluid_scheme_t::bc_apply_prs ( class(adjoint_fluid_scheme_t), intent(inout this,
real(kind=rp), intent(in t,
integer, intent(in tstep 
)
Todo:
Why can't we call the interface here?

Definition at line 189 of file adjoint_fluid_scheme.f90.

◆ bc_apply_vel()

procedure, pass(this) adjoint_fluid_scheme::adjoint_fluid_scheme_t::bc_apply_vel ( class(adjoint_fluid_scheme_t), intent(inout this,
real(kind=rp), intent(in t,
integer, intent(in tstep,
logical, intent(in strong 
)
Todo:
Why can't we call the interface here?

Definition at line 187 of file adjoint_fluid_scheme.f90.

◆ compute_cfl()

procedure, pass(this) adjoint_fluid_scheme::adjoint_fluid_scheme_t::compute_cfl ( class(adjoint_fluid_scheme_t), intent(in this,
real(kind=rp), intent(in dt 
)

Definition at line 191 of file adjoint_fluid_scheme.f90.

◆ free()

procedure(adjoint_fluid_scheme_free_intrf), deferred, pass adjoint_fluid_scheme::adjoint_fluid_scheme_t::free ( class(adjoint_fluid_scheme_t), intent(inout this)
pure virtual

Definition at line 198 of file adjoint_fluid_scheme.f90.

◆ init()

procedure(adjoint_fluid_scheme_init_intrf), deferred, pass adjoint_fluid_scheme::adjoint_fluid_scheme_t::init ( class(adjoint_fluid_scheme_t), intent(inout), target  this,
type(mesh_t), intent(inout), target  msh,
integer, intent(in lx,
type(json_file), intent(inout), target  params,
type(user_t), intent(in), target  user,
type(time_scheme_controller_t), intent(in), target  time_scheme 
)
pure virtual

Definition at line 196 of file adjoint_fluid_scheme.f90.

◆ init_base()

procedure, pass(this) adjoint_fluid_scheme::adjoint_fluid_scheme_t::init_base ( class(adjoint_fluid_scheme_t), intent(inout), target  this,
type(mesh_t), intent(inout), target  msh,
integer, intent(in lx,
type(json_file), intent(inout), target  params,
character(len=*), intent(in scheme,
type(user_t), intent(in), target  user,
logical, intent(in kspv_init 
)

Initialize common data for the current scheme

Definition at line 181 of file adjoint_fluid_scheme.f90.

◆ precon_factory_()

procedure, pass(this) adjoint_fluid_scheme::adjoint_fluid_scheme_t::precon_factory_ ( class(adjoint_fluid_scheme_t), intent(inout this,
class(pc_t), intent(inout), allocatable, target  pc,
class(ksp_t), intent(inout), target  ksp,
type(coef_t), intent(in), target  coef,
type(dofmap_t), intent(in), target  dof,
type(gs_t), intent(inout), target  gs,
type(bc_list_t), intent(inout), target  bclst,
character(len=*)  pctype 
)

Definition at line 213 of file adjoint_fluid_scheme.f90.

◆ restart()

procedure(adjoint_fluid_scheme_restart_intrf), deferred, pass adjoint_fluid_scheme::adjoint_fluid_scheme_t::restart ( class(adjoint_fluid_scheme_t), intent(inout), target  this,
real(kind=rp), dimension(10)  dtlag,
real(kind=rp), dimension(10)  tlag 
)
pure virtual

Definition at line 202 of file adjoint_fluid_scheme.f90.

◆ scheme_free()

procedure, pass(this) adjoint_fluid_scheme::adjoint_fluid_scheme_t::scheme_free ( class(adjoint_fluid_scheme_t), intent(inout this)

Definition at line 183 of file adjoint_fluid_scheme.f90.

◆ set_material_properties()

procedure, pass(this) adjoint_fluid_scheme::adjoint_fluid_scheme_t::set_material_properties ( class(adjoint_fluid_scheme_t), intent(inout this,
type(json_file), intent(inout params,
type(user_t), intent(in), target  user 
)
Parameters
paramsThe case paramter file.
userThe user interface.

Definition at line 193 of file adjoint_fluid_scheme.f90.

◆ setup_bcs()

procedure(adjoint_fluid_scheme_setup_bcs_intrf), deferred, pass adjoint_fluid_scheme::adjoint_fluid_scheme_t::setup_bcs ( class(adjoint_fluid_scheme_t), intent(inout this,
type(user_t), intent(in), target  user,
type(json_file), intent(inout params 
)
pure virtual

Definition at line 205 of file adjoint_fluid_scheme.f90.

◆ solver_factory()

procedure, nopass adjoint_fluid_scheme::adjoint_fluid_scheme_t::solver_factory ( class(ksp_t), intent(inout), allocatable, target  ksp,
integer, intent(in), value  n,
character(len=*), intent(in solver,
integer, intent(in max_iter,
real(kind=rp), intent(in abstol,
logical, intent(in monitor 
)
static
Note
Currently only supporting Krylov solvers

Definition at line 211 of file adjoint_fluid_scheme.f90.

◆ step()

procedure(adjoint_fluid_scheme_step_intrf), deferred, pass adjoint_fluid_scheme::adjoint_fluid_scheme_t::step ( class(adjoint_fluid_scheme_t), intent(inout), target  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 200 of file adjoint_fluid_scheme.f90.

◆ update_material_properties()

procedure, pass(this) adjoint_fluid_scheme::adjoint_fluid_scheme_t::update_material_properties ( class(adjoint_fluid_scheme_t), intent(inout this)

Definition at line 208 of file adjoint_fluid_scheme.f90.

◆ validate()

procedure, pass(this) adjoint_fluid_scheme::adjoint_fluid_scheme_t::validate ( class(adjoint_fluid_scheme_t), intent(inout), target  this)

Definition at line 185 of file adjoint_fluid_scheme.f90.

Member Data Documentation

◆ bcs_prs

type(bc_list_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::bcs_prs

Definition at line 144 of file adjoint_fluid_scheme.f90.

◆ bcs_vel

type(bc_list_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::bcs_vel

Definition at line 146 of file adjoint_fluid_scheme.f90.

◆ c_xh

type(coef_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::c_xh

Definition at line 108 of file adjoint_fluid_scheme.f90.

◆ chkp

type(chkp_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::chkp

Definition at line 150 of file adjoint_fluid_scheme.f90.

◆ dm_xh

type(dofmap_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::dm_xh

Definition at line 104 of file adjoint_fluid_scheme.f90.

◆ f_adj_x

type(field_t), pointer adjoint_fluid_scheme::adjoint_fluid_scheme_t::f_adj_x => null()

Definition at line 112 of file adjoint_fluid_scheme.f90.

◆ f_adj_y

type(field_t), pointer adjoint_fluid_scheme::adjoint_fluid_scheme_t::f_adj_y => null()

Definition at line 114 of file adjoint_fluid_scheme.f90.

◆ f_adj_z

type(field_t), pointer adjoint_fluid_scheme::adjoint_fluid_scheme_t::f_adj_z => null()

Definition at line 116 of file adjoint_fluid_scheme.f90.

◆ forced_flow_rate

logical adjoint_fluid_scheme::adjoint_fluid_scheme_t::forced_flow_rate = .false.

Definition at line 158 of file adjoint_fluid_scheme.f90.

◆ freeze

logical adjoint_fluid_scheme::adjoint_fluid_scheme_t::freeze = .false.

Definition at line 160 of file adjoint_fluid_scheme.f90.

◆ glb_n_points

integer(kind=i8) adjoint_fluid_scheme::adjoint_fluid_scheme_t::glb_n_points

Definition at line 174 of file adjoint_fluid_scheme.f90.

◆ glb_unique_points

integer(kind=i8) adjoint_fluid_scheme::adjoint_fluid_scheme_t::glb_unique_points

Definition at line 176 of file adjoint_fluid_scheme.f90.

◆ gradient_jump_penalty_u_adj

type(gradient_jump_penalty_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::gradient_jump_penalty_u_adj

Definition at line 139 of file adjoint_fluid_scheme.f90.

◆ gradient_jump_penalty_v_adj

type(gradient_jump_penalty_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::gradient_jump_penalty_v_adj

Definition at line 140 of file adjoint_fluid_scheme.f90.

◆ gradient_jump_penalty_w_adj

type(gradient_jump_penalty_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::gradient_jump_penalty_w_adj

Definition at line 141 of file adjoint_fluid_scheme.f90.

◆ gs_xh

type(gs_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::gs_xh

Definition at line 106 of file adjoint_fluid_scheme.f90.

◆ if_gradient_jump_penalty

logical adjoint_fluid_scheme::adjoint_fluid_scheme_t::if_gradient_jump_penalty

Definition at line 138 of file adjoint_fluid_scheme.f90.

◆ ksp_prs

class(ksp_t), allocatable adjoint_fluid_scheme::adjoint_fluid_scheme_t::ksp_prs

Definition at line 122 of file adjoint_fluid_scheme.f90.

◆ ksp_vel

class(ksp_t), allocatable adjoint_fluid_scheme::adjoint_fluid_scheme_t::ksp_vel

Definition at line 120 of file adjoint_fluid_scheme.f90.

◆ mean

type(mean_flow_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::mean

Definition at line 152 of file adjoint_fluid_scheme.f90.

◆ mean_sqr

type(mean_sqr_flow_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::mean_sqr

Definition at line 156 of file adjoint_fluid_scheme.f90.

◆ msh

type(mesh_t), pointer adjoint_fluid_scheme::adjoint_fluid_scheme_t::msh => null()

Definition at line 148 of file adjoint_fluid_scheme.f90.

◆ mu

real(kind=rp) adjoint_fluid_scheme::adjoint_fluid_scheme_t::mu

Definition at line 162 of file adjoint_fluid_scheme.f90.

◆ mu_field

type(field_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::mu_field

Definition at line 164 of file adjoint_fluid_scheme.f90.

◆ nut_field_name

character(len=:), allocatable adjoint_fluid_scheme::adjoint_fluid_scheme_t::nut_field_name

Definition at line 166 of file adjoint_fluid_scheme.f90.

◆ p_adj

type(field_t), pointer adjoint_fluid_scheme::adjoint_fluid_scheme_t::p_adj => null()

Definition at line 98 of file adjoint_fluid_scheme.f90.

◆ pc_prs

class(pc_t), allocatable adjoint_fluid_scheme::adjoint_fluid_scheme_t::pc_prs

Definition at line 126 of file adjoint_fluid_scheme.f90.

◆ pc_vel

class(pc_t), allocatable adjoint_fluid_scheme::adjoint_fluid_scheme_t::pc_vel

Definition at line 124 of file adjoint_fluid_scheme.f90.

◆ pr_projection_activ_step

integer adjoint_fluid_scheme::adjoint_fluid_scheme_t::pr_projection_activ_step

Definition at line 134 of file adjoint_fluid_scheme.f90.

◆ pr_projection_dim

integer adjoint_fluid_scheme::adjoint_fluid_scheme_t::pr_projection_dim

Definition at line 130 of file adjoint_fluid_scheme.f90.

◆ rho

real(kind=rp) adjoint_fluid_scheme::adjoint_fluid_scheme_t::rho

Definition at line 170 of file adjoint_fluid_scheme.f90.

◆ rho_field

type(field_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::rho_field

Definition at line 172 of file adjoint_fluid_scheme.f90.

◆ scratch

type(scratch_registry_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::scratch

Definition at line 178 of file adjoint_fluid_scheme.f90.

◆ source_term

type(adjoint_source_term_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::source_term

Definition at line 110 of file adjoint_fluid_scheme.f90.

◆ stats

type(fluid_stats_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::stats

Definition at line 154 of file adjoint_fluid_scheme.f90.

◆ strict_convergence

logical adjoint_fluid_scheme::adjoint_fluid_scheme_t::strict_convergence

Definition at line 136 of file adjoint_fluid_scheme.f90.

◆ u_adj

type(field_t), pointer adjoint_fluid_scheme::adjoint_fluid_scheme_t::u_adj => null()

Definition at line 92 of file adjoint_fluid_scheme.f90.

◆ ulag

type(field_series_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::ulag

Definition at line 100 of file adjoint_fluid_scheme.f90.

◆ v_adj

type(field_t), pointer adjoint_fluid_scheme::adjoint_fluid_scheme_t::v_adj => null()

Definition at line 94 of file adjoint_fluid_scheme.f90.

◆ variable_material_properties

logical adjoint_fluid_scheme::adjoint_fluid_scheme_t::variable_material_properties = .false.

Definition at line 168 of file adjoint_fluid_scheme.f90.

◆ vel_projection_activ_step

integer adjoint_fluid_scheme::adjoint_fluid_scheme_t::vel_projection_activ_step

Definition at line 132 of file adjoint_fluid_scheme.f90.

◆ vel_projection_dim

integer adjoint_fluid_scheme::adjoint_fluid_scheme_t::vel_projection_dim

Definition at line 128 of file adjoint_fluid_scheme.f90.

◆ vlag

type(field_series_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::vlag

Definition at line 100 of file adjoint_fluid_scheme.f90.

◆ w_adj

type(field_t), pointer adjoint_fluid_scheme::adjoint_fluid_scheme_t::w_adj => null()

Definition at line 96 of file adjoint_fluid_scheme.f90.

◆ wlag

type(field_series_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::wlag

Definition at line 100 of file adjoint_fluid_scheme.f90.

◆ xh

type(space_t) adjoint_fluid_scheme::adjoint_fluid_scheme_t::xh

Definition at line 102 of file adjoint_fluid_scheme.f90.


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