Neko 0.9.99
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
source_term_handler::source_term_handler_t Type Referenceabstract

Abstract class for handling source terms. More...

Inheritance diagram for source_term_handler::source_term_handler_t:
Collaboration diagram for source_term_handler::source_term_handler_t:

Public Member Functions

procedure, pass(thisinit_base (this, rhs_fields, coef, user)
 Constructor.
 
procedure, pass(thisfree (this)
 Destructor.
 
procedure, pass(thiscompute (this, t, tstep)
 Add all the source terms to the passed 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(thisadd_source_term (this, source_term)
 Append a new source term to the source_terms array.
 
procedure, pass(thisadd_json_source_terms (this, json, name)
 Read from the json file and initialize the source terms.
 

Static Public Member Functions

procedure(source_term_handler_init_user_source), deferred, nopass init_user_source (source_term, rhs_fields, coef, type, user)
 Initialize the user source term.
 

Public Attributes

class(source_term_wrapper_t), dimension(:), allocatable source_terms
 Array of ordinary source terms.
 
type(field_list_trhs_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.
 

Detailed Description

This class is responsible for managing the source terms and adding their contributions to the right-hand side fields. This serve as a common interface for fluid, scalar and other source terms.

In general, a derived class should implement the init_user_source method to handle user-defined source terms and should manually implement an initializer which calls thisinit_base.

Definition at line 62 of file source_term_handler.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 
)

Definition at line 80 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 
)
Parameters
source_termThe source term to be added.

Definition at line 80 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 
)

Definition at line 85 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 
)
Parameters
source_termThe source term to be added.

Definition at line 82 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,
real(kind=rp), intent(in t,
integer, intent(in tstep 
)
Parameters
tThe time value.
tstepThe current time step.

Definition at line 78 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)

Definition at line 76 of file source_term_handler.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 
)

Definition at line 74 of file source_term_handler.f90.

◆ init_user_source()

procedure(source_term_handler_init_user_source), deferred, nopass source_term_handler::source_term_handler_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,
character(len=*)  type,
type(user_t), intent(in user 
)
staticpure virtual

Member Data Documentation

◆ coef

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

Definition at line 68 of file source_term_handler.f90.

◆ rhs_fields

type(field_list_t) source_term_handler::source_term_handler_t::rhs_fields

Definition at line 66 of file source_term_handler.f90.

◆ source_terms

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

Definition at line 64 of file source_term_handler.f90.

◆ user

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

Definition at line 70 of file source_term_handler.f90.


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