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

Defines a rank-3 tensor.

Data Types

type  tensor3_ptr_t
 
type  tensor3_t
 

Functions/Subroutines

subroutine tensor3_init (t, n1, n2, n3, name)
 Initialise a tensor of size n1*n2*n3.
 
subroutine tensor3_allocate (t, n1, n2, n3)
 Allocate a tensor of size n1*n2*n3.
 
subroutine tensor3_free (t)
 Deallocate a tensor.
 
pure integer function tensor3_size (t)
 Returns the number of entries in the tensor.
 
subroutine tensor3_copy_from (t, memdir, sync)
 Easy way to copy between host and device.
 
pure integer function tensor3_n1 (t)
 Returns the size of the first dimension.
 
pure integer function tensor3_n2 (t)
 Returns the size of the second dimension.
 
pure integer function tensor3_n3 (t)
 Returns the size of the third dimension.
 
subroutine tensor3_assign_tensor3 (t, w)
 Assignment \( t = w \).
 
subroutine tensor3_assign_scalar (t, s)
 Assignment \( t = s \).
 
subroutine tensor3_ptr_init (this, ptr)
 Constructor. Just assigns the pointer.
 
subroutine tensor3_ptr_free (this)
 Destructor. Just nullifies the pointer.
 

Function/Subroutine Documentation

◆ tensor3_allocate()

subroutine tensor3::tensor3_allocate ( class(tensor3_t), intent(inout t,
integer, intent(in n1,
integer, intent(in n2,
integer, intent(in n3 
)
private
Parameters
tTensor to allocate.
n1Size of the first dimension.
n2Size of the second dimension.
n3Size of the third dimension.

Definition at line 122 of file tensor3.f90.

Here is the call graph for this function:

◆ tensor3_assign_scalar()

subroutine tensor3::tensor3_assign_scalar ( class(tensor3_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 250 of file tensor3.f90.

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

◆ tensor3_assign_tensor3()

subroutine tensor3::tensor3_assign_tensor3 ( class(tensor3_t), intent(inout t,
type(tensor3_t), intent(in w 
)
private
Parameters
tTensor to assign to.
wTensor to assign from.

Definition at line 215 of file tensor3.f90.

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

◆ tensor3_copy_from()

subroutine tensor3::tensor3_copy_from ( class(tensor3_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 177 of file tensor3.f90.

◆ tensor3_free()

subroutine tensor3::tensor3_free ( class(tensor3_t), intent(inout t)
private
Parameters
tTensor to deallocate.

Definition at line 147 of file tensor3.f90.

◆ tensor3_init()

subroutine tensor3::tensor3_init ( class(tensor3_t), intent(inout t,
integer, intent(in n1,
integer, intent(in n2,
integer, intent(in n3,
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.
nameOptional name of the tensor.

Definition at line 97 of file tensor3.f90.

◆ tensor3_n1()

pure integer function tensor3::tensor3_n1 ( class(tensor3_t), intent(in t)
private
Parameters
tTensor to query.

Definition at line 190 of file tensor3.f90.

◆ tensor3_n2()

pure integer function tensor3::tensor3_n2 ( class(tensor3_t), intent(in t)
private
Parameters
tTensor to query.

Definition at line 198 of file tensor3.f90.

◆ tensor3_n3()

pure integer function tensor3::tensor3_n3 ( class(tensor3_t), intent(in t)
private
Parameters
tTensor to query.

Definition at line 206 of file tensor3.f90.

◆ tensor3_ptr_free()

subroutine tensor3::tensor3_ptr_free ( class(tensor3_ptr_t), intent(inout this)
private
Parameters
thisPointer wrapper to destroy.

Definition at line 282 of file tensor3.f90.

◆ tensor3_ptr_init()

subroutine tensor3::tensor3_ptr_init ( class(tensor3_ptr_t), intent(inout this,
type(tensor3_t), intent(in), target  ptr 
)
private
Parameters
thisPointer wrapper to initialise.
ptrTensor to point to.

Definition at line 272 of file tensor3.f90.

◆ tensor3_size()

pure integer function tensor3::tensor3_size ( class(tensor3_t), intent(in t)
private
Parameters
tTensor to query.

Definition at line 167 of file tensor3.f90.