Neko  0.8.1
A portable framework for high-order spectral element flow simulations
field_registry Module Reference

Defines a registry for storing solution fields. More...

Data Types

type  field_registry_t
 

Functions/Subroutines

subroutine field_registry_init (this, size, expansion_size)
 Constructor. More...
 
subroutine field_registry_free (this)
 Destructor. More...
 
subroutine expand (this)
 Expand the fields array so as to accomodate more fields. More...
 
subroutine add_field (this, dof, fld_name, ignore_existing)
 Add a field to the registry. More...
 
pure integer function n_fields (this)
 Get the number of fields stored in the registry. More...
 
pure integer function get_size (this)
 Get the size of the fields array. More...
 
pure integer function get_expansion_size (this)
 Get the expansion size. More...
 
type(field_t) function, pointer get_field_by_index (this, i)
 Get pointer to a stored field by index. More...
 
type(field_t) function, pointer get_field_by_name (this, name)
 Get pointer to a stored field by field name. More...
 
logical function field_exists (this, name)
 Check if a field with a given name is already in the registry. More...
 

Variables

type(field_registry_t), target, public neko_field_registry
 Global field registry. More...
 

Detailed Description

Defines a registry for storing solution fields.

Function/Subroutine Documentation

◆ add_field()

subroutine field_registry::add_field ( class(field_registry_t), intent(inout)  this,
type(dofmap_t), intent(in), target  dof,
character(len=*), intent(in), target  fld_name,
logical, intent(in), optional  ignore_existing 
)
private

Add a field to the registry.

Parameters
dofThe map of degrees of freedom.
fld_nameThe name of the field.
ignore_existingIf true, will do nothing if the field is already in the registry. If false, will throw an error. Optional, defaults to false.

Definition at line 134 of file field_registry.f90.

◆ expand()

subroutine field_registry::expand ( class(field_registry_t), intent(inout)  this)
private

Expand the fields array so as to accomodate more fields.

Definition at line 118 of file field_registry.f90.

◆ field_exists()

logical function field_registry::field_exists ( class(field_registry_t), intent(in), target  this,
character(len=*), intent(in)  name 
)
private

Check if a field with a given name is already in the registry.

Definition at line 229 of file field_registry.f90.

◆ field_registry_free()

subroutine field_registry::field_registry_free ( class(field_registry_t), intent(inout)  this)
private

Destructor.

Definition at line 104 of file field_registry.f90.

◆ field_registry_init()

subroutine field_registry::field_registry_init ( class(field_registry_t), intent(inout)  this,
integer, intent(in), optional  size,
integer, intent(in), optional  expansion_size 
)
private

Constructor.

Parameters
sizeThe allocation size of fields on init.
expansion_sizeThe number of entries added to fields on expansion.

Definition at line 81 of file field_registry.f90.

◆ get_expansion_size()

pure integer function field_registry::get_expansion_size ( class(field_registry_t), intent(in)  this)
private

Get the expansion size.

Definition at line 182 of file field_registry.f90.

◆ get_field_by_index()

type(field_t) function, pointer field_registry::get_field_by_index ( class(field_registry_t), intent(in), target  this,
integer, intent(in)  i 
)
private

Get pointer to a stored field by index.

Definition at line 190 of file field_registry.f90.

Here is the caller graph for this function:

◆ get_field_by_name()

type(field_t) function, pointer field_registry::get_field_by_name ( class(field_registry_t), intent(in), target  this,
character(len=*), intent(in)  name 
)
private

Get pointer to a stored field by field name.

Definition at line 205 of file field_registry.f90.

Here is the caller graph for this function:

◆ get_size()

pure integer function field_registry::get_size ( class(field_registry_t), intent(in)  this)
private

Get the size of the fields array.

Definition at line 174 of file field_registry.f90.

◆ n_fields()

pure integer function field_registry::n_fields ( class(field_registry_t), intent(in)  this)
private

Get the number of fields stored in the registry.

Definition at line 166 of file field_registry.f90.

Variable Documentation

◆ neko_field_registry

type(field_registry_t), target, public field_registry::neko_field_registry

Global field registry.

Definition at line 75 of file field_registry.f90.