Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
scalar_source_term::scalar_source_term_t Type Reference

Wrapper contaning and executing the scalar source terms. More...

Inheritance diagram for scalar_source_term::scalar_source_term_t:
Collaboration diagram for scalar_source_term::scalar_source_term_t:

Public Member Functions

procedure, pass(this) init (this, f, coef, user, scheme_name)
 Constructor.
 
procedure, pass(this) init_base (this, rhs_fields, coef, user, scheme_name)
 Constructor.
 
procedure, pass(this) free (this)
 Destructor.
 
procedure, pass(this) compute (this, time, extrapolate, scale)
 Add source terms to the right-hand side fields.
 
generic add (this, source_term)
 Generic interface to add a source term to the list.
 
generic add (this, json, name)
 Generic interface to add a source term to the list.
 
procedure, pass(this) add_source_term (this, source_term)
 Append a new source term to the source_terms array.
 
procedure, pass(this) add_json_source_terms (this, json, name)
 Read from the json file and initialize the source terms.
 

Static Public Member Functions

procedure, nopass init_user_source (source_term, rhs_fields, coef, user, scheme_name)
 Initialize the user source term.
 

Public Attributes

class(source_term_wrapper_t), dimension(:), allocatable source_terms
 Array of ordinary source terms.
 
type(field_list_t) rhs_fields
 The right-hand side.
 
type(coef_t), pointer coef
 The coefficients of the (space, mesh) pair.
 
type(user_t), pointer user
 The user object.
 
character(len=:), allocatable scheme_name
 The name of the scheme that owns this source term handler.
 
integer n_unextrapolated = 0
 Number of source terms that are not extrapolated in time, counted when the terms are added.
 

Detailed Description

Exists mainly to keep the scalar_scheme_t type smaller and also as placeholder for future optimizations.

Definition at line 50 of file scalar_source_term.f90.

Member Function/Subroutine Documentation

◆ add() [1/2]

generic source_term_handler::source_term_handler_t::add ( class(source_term_handler_t), intent(inout)  this,
type(json_file), intent(inout)  json,
character(len=*), intent(in)  name 
)
inherited

Definition at line 87 of file source_term_handler.f90.

◆ add() [2/2]

generic source_term_handler::source_term_handler_t::add ( class(source_term_handler_t), intent(inout)  this,
class(source_term_t), intent(in)  source_term 
)
inherited
Parameters
source_termThe source term to be added.

Definition at line 87 of file source_term_handler.f90.

◆ add_json_source_terms()

procedure, pass(this) source_term_handler::source_term_handler_t::add_json_source_terms ( class(source_term_handler_t), intent(inout)  this,
type(json_file), intent(inout)  json,
character(len=*), intent(in)  name 
)
inherited

Definition at line 92 of file source_term_handler.f90.

◆ add_source_term()

procedure, pass(this) source_term_handler::source_term_handler_t::add_source_term ( class(source_term_handler_t), intent(inout)  this,
class(source_term_t), intent(in)  source_term 
)
inherited
Parameters
source_termThe source term to be added.

Definition at line 89 of file source_term_handler.f90.

◆ compute()

procedure, pass(this) source_term_handler::source_term_handler_t::compute ( class(source_term_handler_t), intent(inout)  this,
type(time_state_t), intent(in)  time,
logical, intent(in)  extrapolate,
type(field_t), intent(in), optional  scale 
)
inherited

The source terms whose extrapolate attribute equals extrapolate are summed and multiplied by the mass matrix and, if present, by scale. For .true. the result replaces the right-hand side, for .false. it is added to it. A scheme that extrapolates its explicit terms in time calls the .true. form before and the .false. form after the extrapolation, so that the latter terms enter the step as computed.

Parameters
timeThe time state.
extrapolateSelect the terms by their extrapolate attribute.
scaleField multiplying the contributions, e.g. the density.

Definition at line 85 of file source_term_handler.f90.

◆ free()

procedure, pass(this) source_term_handler::source_term_handler_t::free ( class(source_term_handler_t), intent(inout)  this)
inherited

Definition at line 83 of file source_term_handler.f90.

◆ init()

procedure, pass(this) scalar_source_term::scalar_source_term_t::init ( class(scalar_source_term_t), intent(inout)  this,
type(field_t), intent(in), pointer  f,
type(coef_t), intent(in), target  coef,
type(user_t), intent(in), target  user,
character(len=*), intent(in)  scheme_name 
)

Definition at line 54 of file scalar_source_term.f90.

◆ init_base()

procedure, pass(this) source_term_handler::source_term_handler_t::init_base ( class(source_term_handler_t), intent(inout)  this,
type(field_list_t), intent(in)  rhs_fields,
type(coef_t), intent(in), target  coef,
type(user_t), intent(in), target  user,
character(len=*), intent(in)  scheme_name 
)
inherited

Definition at line 81 of file source_term_handler.f90.

◆ init_user_source()

procedure, nopass scalar_source_term::scalar_source_term_t::init_user_source ( class(source_term_t), intent(inout), allocatable  source_term,
type(field_list_t)  rhs_fields,
type(coef_t), intent(in)  coef,
type(user_t), intent(in)  user,
character(len=*), intent(in)  scheme_name 
)
staticvirtual
Parameters
source_termThe allocatable source term to be initialized to a user.
rhs_fieldsThe field list with the right-hand-side.
coefThe SEM coefs. "user_poinwise".
userThe user type containing the user source term routines.
scheme_nameThe name of the scalar scheme that owns this source term.

Implements source_term_handler::source_term_handler_t.

Definition at line 56 of file scalar_source_term.f90.

Member Data Documentation

◆ coef

type(coef_t), pointer source_term_handler::source_term_handler_t::coef
inherited

Definition at line 70 of file source_term_handler.f90.

◆ n_unextrapolated

integer source_term_handler::source_term_handler_t::n_unextrapolated = 0
inherited

Definition at line 77 of file source_term_handler.f90.

◆ rhs_fields

type(field_list_t) source_term_handler::source_term_handler_t::rhs_fields
inherited

Definition at line 68 of file source_term_handler.f90.

◆ scheme_name

character(len=:), allocatable source_term_handler::source_term_handler_t::scheme_name
inherited

Definition at line 74 of file source_term_handler.f90.

◆ source_terms

class(source_term_wrapper_t), dimension(:), allocatable source_term_handler::source_term_handler_t::source_terms
inherited

Definition at line 66 of file source_term_handler.f90.

◆ user

type(user_t), pointer source_term_handler::source_term_handler_t::user
inherited

Definition at line 72 of file source_term_handler.f90.


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