Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
tensor4 Module Reference

Defines a rank-4 tensor.

Data Types

type  tensor4_ptr_t
 
type  tensor4_t
 

Functions/Subroutines

subroutine tensor4_init (t, n1, n2, n3, n4, name)
 Initialise a tensor of size n1*n2*n3*n4.
 
subroutine tensor4_allocate (t, n1, n2, n3, n4)
 Allocate a tensor of size n1*n2*n3*n4.
 
subroutine tensor4_free (t)
 Deallocate a tensor.
 
pure integer function tensor4_size (t)
 Returns the number of entries in the tensor.
 
subroutine tensor4_copy_from (t, memdir, sync)
 Easy way to copy between host and device.
 
pure integer function tensor4_n1 (t)
 Returns the size of the first dimension.
 
pure integer function tensor4_n2 (t)
 Returns the size of the second dimension.
 
pure integer function tensor4_n3 (t)
 Returns the size of the third dimension.
 
pure integer function tensor4_n4 (t)
 Returns the size of the fourth dimension.
 
pure integer function, dimension(4) tensor4_get_dims (t)
 Returns the dimensions of the tensor.
 
subroutine tensor4_assign_tensor4 (t, w)
 Assignment \( t = w \).
 
subroutine tensor4_assign_scalar (t, s)
 Assignment \( t = s \).
 
subroutine tensor4_ptr_init (this, ptr)
 Constructor. Just assigns the pointer.
 
subroutine tensor4_ptr_free (this)
 Destructor. Just nullifies the pointer.
 

Function/Subroutine Documentation

◆ tensor4_allocate()

subroutine tensor4::tensor4_allocate ( class(tensor4_t), intent(inout)  t,
integer, intent(in)  n1,
integer, intent(in)  n2,
integer, intent(in)  n3,
integer, intent(in)  n4 
)
private
Parameters
tTensor to allocate.
n1Size of the first dimension.
n2Size of the second dimension.
n3Size of the third dimension.
n4Size of the fourth dimension.

Definition at line 136 of file tensor4.f90.

Here is the call graph for this function:

◆ tensor4_assign_scalar()

subroutine tensor4::tensor4_assign_scalar ( class(tensor4_t), intent(inout)  t,
real(kind=rp), intent(in)  s 
)
private
Parameters
tTensor to assign to.
sScalar to fill the tensor with.

Definition at line 284 of file tensor4.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tensor4_assign_tensor4()

subroutine tensor4::tensor4_assign_tensor4 ( class(tensor4_t), intent(inout)  t,
type(tensor4_t), intent(in)  w 
)
private
Parameters
tTensor to assign to.
wTensor to assign from.

Definition at line 248 of file tensor4.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tensor4_copy_from()

subroutine tensor4::tensor4_copy_from ( class(tensor4_t), intent(inout)  t,
integer, intent(in)  memdir,
logical, intent(in)  sync 
)
private
Parameters
tTensor to copy to/from device/host.
memdirDirection to copy (HOST_TO_DEVICE or DEVICE_TO_HOST).
syncWhether the memcopy is to be blocking or not.

Definition at line 194 of file tensor4.f90.

◆ tensor4_free()

subroutine tensor4::tensor4_free ( class(tensor4_t), intent(inout)  t)
private
Parameters
tTensor to deallocate.

Definition at line 163 of file tensor4.f90.

◆ tensor4_get_dims()

pure integer function, dimension(4) tensor4::tensor4_get_dims ( class(tensor4_t), intent(in)  t)
private
Parameters
tTensor to query.

Definition at line 239 of file tensor4.f90.

◆ tensor4_init()

subroutine tensor4::tensor4_init ( class(tensor4_t), intent(inout)  t,
integer, intent(in)  n1,
integer, intent(in)  n2,
integer, intent(in)  n3,
integer, intent(in)  n4,
character(len=*), intent(in), optional  name 
)
Parameters
tTensor to initialise.
n1Size of the first dimension.
n2Size of the second dimension.
n3Size of the third dimension.
n4Size of the fourth dimension.
nameOptional name of the tensor.

Definition at line 109 of file tensor4.f90.

◆ tensor4_n1()

pure integer function tensor4::tensor4_n1 ( class(tensor4_t), intent(in)  t)
private
Parameters
tTensor to query.

Definition at line 207 of file tensor4.f90.

◆ tensor4_n2()

pure integer function tensor4::tensor4_n2 ( class(tensor4_t), intent(in)  t)
private
Parameters
tTensor to query.

Definition at line 215 of file tensor4.f90.

◆ tensor4_n3()

pure integer function tensor4::tensor4_n3 ( class(tensor4_t), intent(in)  t)
private
Parameters
tTensor to query.

Definition at line 223 of file tensor4.f90.

◆ tensor4_n4()

pure integer function tensor4::tensor4_n4 ( class(tensor4_t), intent(in)  t)
private
Parameters
tTensor to query.

Definition at line 231 of file tensor4.f90.

◆ tensor4_ptr_free()

subroutine tensor4::tensor4_ptr_free ( class(tensor4_ptr_t), intent(inout)  this)
private
Parameters
thisPointer wrapper to destroy.

Definition at line 316 of file tensor4.f90.

◆ tensor4_ptr_init()

subroutine tensor4::tensor4_ptr_init ( class(tensor4_ptr_t), intent(inout)  this,
type(tensor4_t), intent(in), target  ptr 
)
private
Parameters
thisPointer wrapper to initialise.
ptrTensor to point to.

Definition at line 306 of file tensor4.f90.

◆ tensor4_size()

pure integer function tensor4::tensor4_size ( class(tensor4_t), intent(in)  t)
private
Parameters
tTensor to query.

Definition at line 184 of file tensor4.f90.