Neko 1.99.2
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
scratch_registry::scratch_registry_t Type Reference
Collaboration diagram for scratch_registry::scratch_registry_t:

Public Member Functions

procedure, pass(thisinit (this, size, expansion_size, dof)
 Constructor.
 
procedure, pass(thisfree (this)
 Destructor.
 
procedure, pass(thisset_dofmap (this, dof)
 Assign a dofmap to the scratch registry.
 
procedure, pass(thisget_n_entries (this)
 Getter for n_entries.
 
procedure, pass(thisget_n_inuse (this)
 Getter for n_inuse.
 
procedure, pass(thisget_expansion_size (this)
 Getter for expansion_size.
 
procedure, pass(thisget_size (this)
 Return size of allocated fields.
 
procedure, pass(thisget_inuse (this, index)
 Get value of inuse for a given index.
 
procedure, pass(thisrequest_field (this, f, index, clear)
 Get a new scratch field.
 
procedure, pass(thisrelinquish_field_single (this, index)
 Relinquish the use of a field in the registry.
 
procedure, pass(thisrelinquish_field_multiple (this, indices)
 Relinquish the use of multiple fields in the registry.
 
generic relinquish_field (this, index)
 Free a field for later reuse.
 
generic relinquish_field (this, indices)
 Free a field for later reuse.
 
procedure, pass(thisrequest_vector (this, v, index, n, clear)
 Get a new scratch vector.
 
procedure, pass(thisrelinquish_vector_single (this, index)
 Relinquish the use of a vector in the registry.
 
procedure, pass(thisrelinquish_vector_multiple (this, indices)
 Relinquish the use of multiple vectors in the registry.
 
generic relinquish_vector (this, index)
 Free a vector for later reuse.
 
generic relinquish_vector (this, indices)
 Free a vector for later reuse.
 
procedure, pass(thisrequest_matrix (this, m, index, nrows, ncols, clear)
 Get a new scratch matrix.
 
procedure, pass(thisrelinquish_matrix_single (this, index)
 Relinquish the use of a matrix in the registry.
 
procedure, pass(thisrelinquish_matrix_multiple (this, indices)
 Relinquish the use of multiple matrices in the registry.
 
generic relinquish_matrix (this, index)
 Free a matrix for later reuse.
 
generic relinquish_matrix (this, indices)
 Free a matrix for later reuse.
 
generic request (this, f, index, clear)
 Generic request procedure.
 
generic request (this, v, index, n, clear)
 Generic request procedure.
 
generic request (this, m, index, nrows, ncols, clear)
 Generic request procedure.
 
procedure, pass(thisrelinquish_single (this, index)
 Relinquish the use of an object in the registry.
 
procedure, pass(thisrelinquish_multiple (this, indices)
 Relinquish the use of multiple objects in the registry.
 
generic relinquish (this, index)
 Generic relinquish procedure.
 
generic relinquish (this, indices)
 Generic relinquish procedure.
 

Public Attributes

type(dofmap_t), pointer dof => null()
 Dofmap.
 

Private Member Functions

procedure, pass(this), private expand (this)
 

Private Attributes

type(registry_entry_t), dimension(:), allocatable, private entries
 list of scratch fields
 
logical, dimension(:), allocatable, private inuse
 Tracks which fields are used.
 
integer, private n_entries = 0
 number of registered fields
 
integer, private n_inuse = 0
 number of fields in use
 
integer, private expansion_size = 10
 the size the fields array is increased by upon reallocation
 

Detailed Description

Definition at line 52 of file scratch_registry.f90.

Member Function/Subroutine Documentation

◆ expand()

procedure, pass(this), private scratch_registry::scratch_registry_t::expand ( class(scratch_registry_t), intent(inout this)
private

Definition at line 66 of file scratch_registry.f90.

◆ free()

procedure, pass(this) scratch_registry::scratch_registry_t::free ( class(scratch_registry_t), intent(inout this)

Definition at line 70 of file scratch_registry.f90.

◆ get_expansion_size()

procedure, pass(this) scratch_registry::scratch_registry_t::get_expansion_size ( class(scratch_registry_t), intent(in this)

Definition at line 78 of file scratch_registry.f90.

◆ get_inuse()

procedure, pass(this) scratch_registry::scratch_registry_t::get_inuse ( class(scratch_registry_t), intent(in), target  this,
integer, intent(in index 
)

Definition at line 82 of file scratch_registry.f90.

◆ get_n_entries()

procedure, pass(this) scratch_registry::scratch_registry_t::get_n_entries ( class(scratch_registry_t), intent(in this)

Definition at line 74 of file scratch_registry.f90.

◆ get_n_inuse()

procedure, pass(this) scratch_registry::scratch_registry_t::get_n_inuse ( class(scratch_registry_t), intent(in this)

Definition at line 76 of file scratch_registry.f90.

◆ get_size()

procedure, pass(this) scratch_registry::scratch_registry_t::get_size ( class(scratch_registry_t), intent(in this)

Definition at line 80 of file scratch_registry.f90.

◆ init()

procedure, pass(this) scratch_registry::scratch_registry_t::init ( class(scratch_registry_t), intent(inout this,
integer, intent(in), optional  size,
integer, intent(in), optional  expansion_size,
type(dofmap_t), intent(in), optional, target  dof 
)
Parameters
sizeInitial size of the registry
expansion_sizeSize to expand the registry by when needed
dofDofmap to associate with the scratch registry
Note
If no DOF map is provided here, it must be set later using scratch_registry_t::set_dofmap before requesting fields.

Definition at line 68 of file scratch_registry.f90.

◆ relinquish() [1/2]

generic scratch_registry::scratch_registry_t::relinquish ( class(scratch_registry_t), intent(inout), target  this,
integer, intent(inout index 
)
Parameters
indexThe index of the object to free

Definition at line 113 of file scratch_registry.f90.

Here is the call graph for this function:

◆ relinquish() [2/2]

generic scratch_registry::scratch_registry_t::relinquish ( class(scratch_registry_t), intent(inout), target  this,
integer, dimension(:), intent(inout indices 
)
Parameters
indicesThe indices of the objects to free

Definition at line 113 of file scratch_registry.f90.

◆ relinquish_field() [1/2]

generic scratch_registry::scratch_registry_t::relinquish_field ( class(scratch_registry_t), intent(inout), target  this,
integer, intent(inout index 
)
Parameters
indexThe index of the field to free

Definition at line 89 of file scratch_registry.f90.

Here is the call graph for this function:

◆ relinquish_field() [2/2]

generic scratch_registry::scratch_registry_t::relinquish_field ( class(scratch_registry_t), intent(inout), target  this,
integer, dimension(:), intent(inout indices 
)
Parameters
indicesThe indices of the fields to free

Definition at line 89 of file scratch_registry.f90.

◆ relinquish_field_multiple()

procedure, pass(this) scratch_registry::scratch_registry_t::relinquish_field_multiple ( class(scratch_registry_t), intent(inout), target  this,
integer, dimension(:), intent(inout indices 
)
Parameters
indicesThe indices of the fields to free

Definition at line 87 of file scratch_registry.f90.

◆ relinquish_field_single()

procedure, pass(this) scratch_registry::scratch_registry_t::relinquish_field_single ( class(scratch_registry_t), intent(inout), target  this,
integer, intent(inout index 
)
Parameters
indexThe index of the field to free

Definition at line 86 of file scratch_registry.f90.

◆ relinquish_matrix() [1/2]

generic scratch_registry::scratch_registry_t::relinquish_matrix ( class(scratch_registry_t), intent(inout), target  this,
integer, intent(inout index 
)
Parameters
indexThe index of the matrix to free

Definition at line 105 of file scratch_registry.f90.

Here is the call graph for this function:

◆ relinquish_matrix() [2/2]

generic scratch_registry::scratch_registry_t::relinquish_matrix ( class(scratch_registry_t), intent(inout), target  this,
integer, dimension(:), intent(inout indices 
)
Parameters
indicesThe indices of the matrices to free

Definition at line 105 of file scratch_registry.f90.

◆ relinquish_matrix_multiple()

procedure, pass(this) scratch_registry::scratch_registry_t::relinquish_matrix_multiple ( class(scratch_registry_t), intent(inout), target  this,
integer, dimension(:), intent(inout indices 
)
Parameters
indicesThe indices of the matrices to free

Definition at line 103 of file scratch_registry.f90.

◆ relinquish_matrix_single()

procedure, pass(this) scratch_registry::scratch_registry_t::relinquish_matrix_single ( class(scratch_registry_t), intent(inout), target  this,
integer, intent(inout index 
)
Parameters
indexThe index of the matrix to free

Definition at line 102 of file scratch_registry.f90.

◆ relinquish_multiple()

procedure, pass(this) scratch_registry::scratch_registry_t::relinquish_multiple ( class(scratch_registry_t), intent(inout), target  this,
integer, dimension(:), intent(inout indices 
)
Parameters
indicesThe indices of the objects to free

Definition at line 111 of file scratch_registry.f90.

◆ relinquish_single()

procedure, pass(this) scratch_registry::scratch_registry_t::relinquish_single ( class(scratch_registry_t), intent(inout), target  this,
integer, intent(inout index 
)
Parameters
indexThe index of the object to free

Definition at line 110 of file scratch_registry.f90.

◆ relinquish_vector() [1/2]

generic scratch_registry::scratch_registry_t::relinquish_vector ( class(scratch_registry_t), intent(inout), target  this,
integer, intent(inout index 
)
Parameters
indexThe index of the vector to free

Definition at line 97 of file scratch_registry.f90.

Here is the call graph for this function:

◆ relinquish_vector() [2/2]

generic scratch_registry::scratch_registry_t::relinquish_vector ( class(scratch_registry_t), intent(inout), target  this,
integer, dimension(:), intent(inout indices 
)
Parameters
indicesThe indices of the vectors to free

Definition at line 97 of file scratch_registry.f90.

◆ relinquish_vector_multiple()

procedure, pass(this) scratch_registry::scratch_registry_t::relinquish_vector_multiple ( class(scratch_registry_t), intent(inout), target  this,
integer, dimension(:), intent(inout indices 
)
Parameters
indicesThe indices of the vectors to free

Definition at line 95 of file scratch_registry.f90.

◆ relinquish_vector_single()

procedure, pass(this) scratch_registry::scratch_registry_t::relinquish_vector_single ( class(scratch_registry_t), intent(inout), target  this,
integer, intent(inout index 
)
Parameters
indexThe index of the vector to free

Definition at line 94 of file scratch_registry.f90.

◆ request() [1/3]

generic scratch_registry::scratch_registry_t::request ( class(scratch_registry_t), intent(inout), target  this,
type(field_t), intent(inout), pointer  f,
integer, intent(inout index,
logical, intent(in clear 
)
Parameters
fPointer to the requested field.
indexIndex of the field in the registry (for relinquishing later).
clearIf true, the field values are set to zero upon request.

Definition at line 109 of file scratch_registry.f90.

Here is the call graph for this function:

◆ request() [2/3]

generic scratch_registry::scratch_registry_t::request ( class(scratch_registry_t), intent(inout), target  this,
type(matrix_t), intent(inout), pointer  m,
integer, intent(inout index,
integer, intent(in nrows,
integer, intent(in ncols,
logical, intent(in clear 
)
Parameters
mPointer to the requested matrix.
indexIndex of the matrix in the registry (for relinquishing later).
nrowsNumber of rows of the requested matrix.
ncolsNumber of columns of the requested matrix.
clearIf true, the matrix values are set to zero upon request.

Definition at line 109 of file scratch_registry.f90.

◆ request() [3/3]

generic scratch_registry::scratch_registry_t::request ( class(scratch_registry_t), intent(inout), target  this,
type(vector_t), intent(inout), pointer  v,
integer, intent(inout index,
integer, intent(in n,
logical, intent(in clear 
)
Parameters
vPointer to the requested vector.
indexIndex of the vector in the registry (for relinquishing later).
nSize of the requested vector.
clearIf true, the vector values are set to zero upon request.

Definition at line 109 of file scratch_registry.f90.

◆ request_field()

procedure, pass(this) scratch_registry::scratch_registry_t::request_field ( class(scratch_registry_t), intent(inout), target  this,
type(field_t), intent(inout), pointer  f,
integer, intent(inout index,
logical, intent(in clear 
)
Parameters
fPointer to the requested field.
indexIndex of the field in the registry (for relinquishing later).
clearIf true, the field values are set to zero upon request.

Definition at line 85 of file scratch_registry.f90.

◆ request_matrix()

procedure, pass(this) scratch_registry::scratch_registry_t::request_matrix ( class(scratch_registry_t), intent(inout), target  this,
type(matrix_t), intent(inout), pointer  m,
integer, intent(inout index,
integer, intent(in nrows,
integer, intent(in ncols,
logical, intent(in clear 
)
Parameters
mPointer to the requested matrix.
indexIndex of the matrix in the registry (for relinquishing later).
nrowsNumber of rows of the requested matrix.
ncolsNumber of columns of the requested matrix.
clearIf true, the matrix values are set to zero upon request.

Definition at line 101 of file scratch_registry.f90.

◆ request_vector()

procedure, pass(this) scratch_registry::scratch_registry_t::request_vector ( class(scratch_registry_t), intent(inout), target  this,
type(vector_t), intent(inout), pointer  v,
integer, intent(inout index,
integer, intent(in n,
logical, intent(in clear 
)
Parameters
vPointer to the requested vector.
indexIndex of the vector in the registry (for relinquishing later).
nSize of the requested vector.
clearIf true, the vector values are set to zero upon request.

Definition at line 93 of file scratch_registry.f90.

◆ set_dofmap()

procedure, pass(this) scratch_registry::scratch_registry_t::set_dofmap ( class(scratch_registry_t), intent(inout this,
type(dofmap_t), intent(in), target  dof 
)
Parameters
dofDofmap to assign
Note
First check if a dofmap is already assigned, and throw an error, unless it's the same dofmap.

Definition at line 72 of file scratch_registry.f90.

Member Data Documentation

◆ dof

type(dofmap_t), pointer scratch_registry::scratch_registry_t::dof => null()

Definition at line 64 of file scratch_registry.f90.

◆ entries

type(registry_entry_t), dimension(:), allocatable, private scratch_registry::scratch_registry_t::entries
private

Definition at line 54 of file scratch_registry.f90.

◆ expansion_size

integer, private scratch_registry::scratch_registry_t::expansion_size = 10
private

Definition at line 62 of file scratch_registry.f90.

◆ inuse

logical, dimension(:), allocatable, private scratch_registry::scratch_registry_t::inuse
private

Definition at line 56 of file scratch_registry.f90.

◆ n_entries

integer, private scratch_registry::scratch_registry_t::n_entries = 0
private

Definition at line 58 of file scratch_registry.f90.

◆ n_inuse

integer, private scratch_registry::scratch_registry_t::n_inuse = 0
private

Definition at line 60 of file scratch_registry.f90.


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