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

Neko C API.

Data Types

interface  neko_api_user_cb_get_field
 Register callbacks. More...
 

Functions/Subroutines

subroutine neko_api_init ()
 Initialise Neko.
 
subroutine neko_api_finalize ()
 Finalize Neko.
 
subroutine neko_api_job_info ()
 Display job information.
 
subroutine neko_api_case_allocate (case_iptr)
 Allocate memory for a Neko case.
 
subroutine neko_api_case_init (case_json, case_len, case_iptr)
 Initalise a Neko case.
 
subroutine neko_api_case_free (case_iptr)
 Destroy a Neko case.
 
real(kind=c_rp) function neko_api_case_time (case_iptr)
 Retrive the current time of a case.
 
real(kind=c_rp) function neko_api_case_end_time (case_iptr)
 Retrive the end time of a case.
 
integer(c_int) function neko_api_case_tstep (case_iptr)
 Retrive the time-step of a case.
 
subroutine neko_api_solve (case_iptr)
 Solve a neko case.
 
subroutine neko_api_step (case_iptr)
 Compute a time-step for a neko case.
 
subroutine neko_api_output_ctrl_execute (case_iptr, force_output)
 Execute the Case's output controller.
 
type(c_ptr) function neko_api_field (field_name)
 Retrive a pointer to a flow field.
 
integer(c_int) function neko_api_field_order (field_name)
 Retrive the order of a field.
 
integer(c_int) function neko_api_field_nelements (field_name)
 Retrive the number of elements in a field.
 
integer(c_int) function neko_api_field_size (field_name)
 Retrive the total number of degrees of freedom of a field.
 
subroutine neko_api_field_dofmap (field_name, dof_ptr, x_ptr, y_ptr, z_ptr)
 Retrive the dofmap associated with a field.
 
subroutine neko_api_case_fluid_dofmap (case_iptr, dof_ptr, x_ptr, y_ptr, z_ptr, size)
 Retrive the dofmap associated with a case's fluid solver.
 
subroutine neko_api_wrap_dofmap (dm, dof_ptr, x_ptr, y_ptr, z_ptr)
 Helper function to assign pointers to a dofmap's data.
 
subroutine neko_api_field_space (field_name, lx, zg, dr_inv, ds_inv, dt_inv, wx, wy, wz, dx, dy, dz)
 Retrive the space associated with a field.
 
subroutine neko_api_case_fluid_space (case_iptr, lx, zg, dr_inv, ds_inv, dt_inv, wx, wy, wz, dx, dy, dz)
 Retrive the space associated with a case's fluid solver.
 
subroutine neko_api_wrap_space (xh, lx, zg, dr_inv, ds_inv, dt_inv, wx, wy, wz, dx, dy, dz)
 Helper function to assign pointers to a space's data.
 
subroutine neko_api_case_fluid_coef (case_iptr, g11, g22, g33, g12, g13, g23, mult, dxdr, dydr, dzdr, dxds, dyds, dzds, dxdt, dydt, dzdt, drdx, drdy, drdz, dsdx, dsdy, dsdz, dtdx, dtdy, dtdz, jac, b, area, nx, ny, nz)
 Retrive the coefficient associated with a case's fluid solver.
 
subroutine neko_api_user_setup (case_iptr, initial_cb, preprocess_cb, compute_cb, dirichlet_cb, material_cb, source_cb)
 Setup user-provided callbacks.
 
type(c_ptr) function neko_api_user_cb_field_by_name (field_name)
 Retrive a pointer to a user callback field.
 
type(c_ptr) function neko_api_user_cb_field_by_index (field_idx)
 Retrive a pointer to a user callback field.
 
logical(c_bool) function neko_api_user_cb_field_name_at_index (field_idx, field_name)
 Check if the user callback field at a given index has a given name.
 

Function/Subroutine Documentation

◆ neko_api_case_allocate()

subroutine neko_api::neko_api_case_allocate ( integer(c_intptr_t), intent(inout case_iptr)
private
Parameters
case_iptrOpaque pointer for the created Neko case

Definition at line 113 of file neko_api.f90.

◆ neko_api_case_end_time()

real(kind=c_rp) function neko_api::neko_api_case_end_time ( integer(c_intptr_t), intent(inout case_iptr)
private
Parameters
case_iptrOpaque pointer for the Neko case
end_timeThe end time of a case

Definition at line 215 of file neko_api.f90.

◆ neko_api_case_fluid_coef()

subroutine neko_api::neko_api_case_fluid_coef ( integer(c_intptr_t), intent(inout case_iptr,
type(c_ptr), intent(inout g11,
type(c_ptr), intent(inout g22,
type(c_ptr), intent(inout g33,
type(c_ptr), intent(inout g12,
type(c_ptr), intent(inout g13,
type(c_ptr), intent(inout g23,
type(c_ptr), intent(inout mult,
type(c_ptr), intent(inout dxdr,
type(c_ptr), intent(inout dydr,
type(c_ptr), intent(inout dzdr,
type(c_ptr), intent(inout dxds,
type(c_ptr), intent(inout dyds,
type(c_ptr), intent(inout dzds,
type(c_ptr), intent(inout dxdt,
type(c_ptr), intent(inout dydt,
type(c_ptr), intent(inout dzdt,
type(c_ptr), intent(inout drdx,
type(c_ptr), intent(inout drdy,
type(c_ptr), intent(inout drdz,
type(c_ptr), intent(inout dsdx,
type(c_ptr), intent(inout dsdy,
type(c_ptr), intent(inout dsdz,
type(c_ptr), intent(inout dtdx,
type(c_ptr), intent(inout dtdy,
type(c_ptr), intent(inout dtdz,
type(c_ptr), intent(inout jac,
type(c_ptr), intent(inout b,
type(c_ptr), intent(inout area,
type(c_ptr), intent(inout nx,
type(c_ptr), intent(inout ny,
type(c_ptr), intent(inout nz 
)
private
Parameters
case_iptrOpaque pointer for the Neko case

Definition at line 591 of file neko_api.f90.

◆ neko_api_case_fluid_dofmap()

subroutine neko_api::neko_api_case_fluid_dofmap ( integer(c_intptr_t), intent(inout case_iptr,
type(c_ptr), intent(inout dof_ptr,
type(c_ptr), intent(inout x_ptr,
type(c_ptr), intent(inout y_ptr,
type(c_ptr), intent(inout z_ptr,
integer, intent(inout size 
)
private
Parameters
case_iptrOpaque pointer for the Neko case
dof_ptrPointer to unique degrees of freedom
x_ptrPointer to x-coordinates
x_ptrPointer to y-coordinates
x_ptrPointer to z-coordinates
sizeNumber of dofs

Definition at line 464 of file neko_api.f90.

◆ neko_api_case_fluid_space()

subroutine neko_api::neko_api_case_fluid_space ( integer(c_intptr_t), intent(inout case_iptr,
integer, intent(inout lx,
type(c_ptr), intent(inout zg,
type(c_ptr), intent(inout dr_inv,
type(c_ptr), intent(inout ds_inv,
type(c_ptr), intent(inout dt_inv,
type(c_ptr), intent(inout wx,
type(c_ptr), intent(inout wy,
type(c_ptr), intent(inout wz,
type(c_ptr), intent(inout dx,
type(c_ptr), intent(inout dy,
type(c_ptr), intent(inout dz 
)
private
Parameters
case_iptrOpaque pointer for the Neko case
lxPolynomial dimension in each direction
zgPointer to quadrature points
dr_invPointer to 1/dist quadrature points
ds_invPointer to 1/dist quadrature points
dt_invPointer to 1/dist quadrature points
wxPointer to quadrature weights
wyPointer to quadrature weights
wzPointer to quadrature weights
dxPointer to derivative operator \( D_1 \)
dyPointer to derivative operator \( D_2 \)
dzPointer to derivative operator \( D_3 \)

Definition at line 545 of file neko_api.f90.

◆ neko_api_case_free()

subroutine neko_api::neko_api_case_free ( integer(c_intptr_t), intent(inout case_iptr)
private
Parameters
case_iptrOpaque pointer for the Neko case

Definition at line 177 of file neko_api.f90.

◆ neko_api_case_init()

subroutine neko_api::neko_api_case_init ( type(c_ptr), intent(in case_json,
integer(c_int), value  case_len,
integer(c_intptr_t), intent(inout case_iptr 
)
private
Parameters
case_jsonSerialised JSON object describing the case
case_iptrOpaque pointer for the Neko case

Definition at line 128 of file neko_api.f90.

◆ neko_api_case_time()

real(kind=c_rp) function neko_api::neko_api_case_time ( integer(c_intptr_t), intent(inout case_iptr)
private
Parameters
case_iptrOpaque pointer for the Neko case
timeThe case's current time

Definition at line 195 of file neko_api.f90.

◆ neko_api_case_tstep()

integer(c_int) function neko_api::neko_api_case_tstep ( integer(c_intptr_t), intent(inout case_iptr)
private
Parameters
case_iptrOpaque pointer for the Neko case
tstepThe current time-step of a case

Definition at line 235 of file neko_api.f90.

◆ neko_api_field()

type(c_ptr) function neko_api::neko_api_field ( character(kind=c_char), dimension(*), intent(in field_name)
private
Parameters
field_nameField registry entry

Definition at line 341 of file neko_api.f90.

◆ neko_api_field_dofmap()

subroutine neko_api::neko_api_field_dofmap ( character(kind=c_char), dimension(*), intent(in field_name,
type(c_ptr), intent(inout dof_ptr,
type(c_ptr), intent(inout x_ptr,
type(c_ptr), intent(inout y_ptr,
type(c_ptr), intent(inout z_ptr 
)
private
Parameters
field_nameField registry entry
dof_ptrPointer to unique degrees of freedom
x_ptrPointer to x-coordinates
x_ptrPointer to y-coordinates
x_ptrPointer to z-coordinates

Definition at line 437 of file neko_api.f90.

◆ neko_api_field_nelements()

integer(c_int) function neko_api::neko_api_field_nelements ( character(kind=c_char), dimension(*), intent(in field_name)
private
Parameters
field_nameField registry entry

Definition at line 387 of file neko_api.f90.

◆ neko_api_field_order()

integer(c_int) function neko_api::neko_api_field_order ( character(kind=c_char), dimension(*), intent(in field_name)
private
Parameters
field_nameField registry entry

Definition at line 364 of file neko_api.f90.

◆ neko_api_field_size()

integer(c_int) function neko_api::neko_api_field_size ( character(kind=c_char), dimension(*), intent(in field_name)
private
Parameters
field_nameField registry entry

Definition at line 410 of file neko_api.f90.

◆ neko_api_field_space()

subroutine neko_api::neko_api_field_space ( character(kind=c_char), dimension(*), intent(in field_name,
integer, intent(inout lx,
type(c_ptr), intent(inout zg,
type(c_ptr), intent(inout dr_inv,
type(c_ptr), intent(inout ds_inv,
type(c_ptr), intent(inout dt_inv,
type(c_ptr), intent(inout wx,
type(c_ptr), intent(inout wy,
type(c_ptr), intent(inout wz,
type(c_ptr), intent(inout dx,
type(c_ptr), intent(inout dy,
type(c_ptr), intent(inout dz 
)
private
Parameters
field_nameField registry entry
lxPolynomial dimension in each direction
zgPointer to quadrature points
dr_invPointer to 1/dist quadrature points
ds_invPointer to 1/dist quadrature points
dt_invPointer to 1/dist quadrature points
wxPointer to quadrature weights
wyPointer to quadrature weights
wzPointer to quadrature weights
dxPointer to derivative operator \( D_1 \)
dyPointer to derivative operator \( D_2 \)
dzPointer to derivative operator \( D_3 \)

Definition at line 508 of file neko_api.f90.

◆ neko_api_finalize()

subroutine neko_api::neko_api_finalize
private

Definition at line 90 of file neko_api.f90.

Here is the call graph for this function:

◆ neko_api_init()

subroutine neko_api::neko_api_init
private

Definition at line 83 of file neko_api.f90.

Here is the call graph for this function:

◆ neko_api_job_info()

subroutine neko_api::neko_api_job_info
private

Definition at line 97 of file neko_api.f90.

Here is the call graph for this function:

◆ neko_api_output_ctrl_execute()

subroutine neko_api::neko_api_output_ctrl_execute ( integer(c_intptr_t), intent(inout case_iptr,
logical(kind=c_bool), value  force_output 
)
private
Parameters
case_iptrOpaque pointer for the Neko case
tThe time value
tstepThe current time-stepper iteration

Definition at line 318 of file neko_api.f90.

◆ neko_api_solve()

subroutine neko_api::neko_api_solve ( integer(c_intptr_t), intent(inout case_iptr)
private
Parameters
case_iptrOpaque pointer for the Neko case

Definition at line 254 of file neko_api.f90.

Here is the call graph for this function:

◆ neko_api_step()

subroutine neko_api::neko_api_step ( integer(c_intptr_t), intent(inout case_iptr)
private
Parameters
case_iptrOpaque pointer for the Neko case

Definition at line 271 of file neko_api.f90.

◆ neko_api_user_cb_field_by_index()

type(c_ptr) function neko_api::neko_api_user_cb_field_by_index ( integer, intent(in field_idx)
private
Parameters
field_idxField index in the field list

Definition at line 702 of file neko_api.f90.

◆ neko_api_user_cb_field_by_name()

type(c_ptr) function neko_api::neko_api_user_cb_field_by_name ( character(kind=c_char), dimension(*), intent(in field_name)
private
Parameters
field_nameField list entry

Definition at line 679 of file neko_api.f90.

◆ neko_api_user_cb_field_name_at_index()

logical(c_bool) function neko_api::neko_api_user_cb_field_name_at_index ( integer, intent(in field_idx,
character(kind=c_char), dimension(*), intent(in field_name 
)
private
Parameters
field_idxField index in the field list
field_nameField name to compare against

Definition at line 717 of file neko_api.f90.

◆ neko_api_user_setup()

subroutine neko_api::neko_api_user_setup ( integer(c_intptr_t), intent(inout case_iptr,
type(c_funptr), value  initial_cb,
type(c_funptr), value  preprocess_cb,
type(c_funptr), value  compute_cb,
type(c_funptr), value  dirichlet_cb,
type(c_funptr), value  material_cb,
type(c_funptr), value  source_cb 
)
private
Parameters
case_iptrOpaque pointer for the Neko case
initial_cbInitial condition callback
preprocess_cbPre timestep callback
compute_cbEnd of timestep callback
dirichlet_cbUser boundary condition callback
material_cbMaterial properties callback
source_cbSource term callback

Definition at line 657 of file neko_api.f90.

◆ neko_api_wrap_dofmap()

subroutine neko_api::neko_api_wrap_dofmap ( type(dofmap_t), intent(in), target  dm,
type(c_ptr), intent(inout dof_ptr,
type(c_ptr), intent(inout x_ptr,
type(c_ptr), intent(inout y_ptr,
type(c_ptr), intent(inout z_ptr 
)
private

Definition at line 484 of file neko_api.f90.

◆ neko_api_wrap_space()

subroutine neko_api::neko_api_wrap_space ( type(space_t), intent(in), target  xh,
integer, intent(inout lx,
type(c_ptr), intent(inout zg,
type(c_ptr), intent(inout dr_inv,
type(c_ptr), intent(inout ds_inv,
type(c_ptr), intent(inout dt_inv,
type(c_ptr), intent(inout wx,
type(c_ptr), intent(inout wy,
type(c_ptr), intent(inout wz,
type(c_ptr), intent(inout dx,
type(c_ptr), intent(inout dy,
type(c_ptr), intent(inout dz 
)
private

Definition at line 568 of file neko_api.f90.