41 invers2,
vcross,
vdot2,
vdot3,
vlsc3,
vlsc2,
add2,
add3,
add4,
sub2, &
108 register_simulation_component
128 use json_module,
only : json_file
133 les_model_factory, les_model_allocator
145 register_source_term, source_term_factory, source_term_allocator
147 use,
intrinsic :: iso_fortran_env
156 type(
case_t),
target,
intent(inout),
optional :: C
157 character(len=NEKO_FNAME_LEN) :: case_file, args
158 character(len=LOG_SIZE) :: log_buf
159 character(len=10) :: suffix
160 character(10) :: time
164 call date_and_time(time = time, date = date)
181 argc = command_argument_count()
183 if (argc .lt. 1)
then
184 if (
pe_rank .eq. 0)
write(*,*)
'Usage: ./neko <case file>'
188 call get_command_argument(1, case_file)
192 if (trim(suffix) .ne.
'case' .and. trim(suffix) .ne.
'json')
then
196 if (argc .gt. 1)
then
197 write(log_buf,
'(a)')
'Running with command line arguments: '
200 call get_command_argument(i, args)
232 type(
case_t),
target,
intent(inout) :: C
234 type(json_file) :: dt_params
235 real(kind=
dp) :: tstep_loop_start_time
238 call dt_controller%init(dt_params)
244 tstep_loop_start_time = mpi_wtime()
257 type(
case_t),
intent(inout),
optional :: c
279 character(10),
optional,
intent(in) :: time
280 character(8),
optional,
intent(in) :: date
281 character(len=LOG_SIZE) :: log_buf
282 integer :: nthrds, rw, sw
284 call neko_log%section(
"Job Information")
286 if (
present(time) .and.
present(date))
then
287 write(log_buf,
'(A,A,A,A,1x,A,1x,A,A,A,A,A)')
'Start time: ', &
288 time(1:2),
':', time(3:4), &
289 '/', date(1:4),
'-', date(5:6),
'-', date(7:8)
292 write(log_buf,
'(a)')
'Running on: '
295 write(log_buf(13:),
'(i1,a)')
pe_size,
' MPI '
297 write(log_buf(19:),
'(a)')
'rank'
300 write(log_buf(19:),
'(a)')
'ranks'
303 else if (
pe_size .lt. 1e2)
then
304 write(log_buf(13:),
'(i2,a)')
pe_size,
' MPI ranks'
306 else if (
pe_size .lt. 1e3)
then
307 write(log_buf(13:),
'(i3,a)')
pe_size,
' MPI ranks'
309 else if (
pe_size .lt. 1e4)
then
310 write(log_buf(13:),
'(i4,a)')
pe_size,
' MPI ranks'
312 else if (
pe_size .lt. 1e5)
then
313 write(log_buf(13:),
'(i5,a)')
pe_size,
' MPI ranks'
316 write(log_buf(13:),
'(i6,a)')
pe_size,
' MPI ranks'
325 if (nthrds .gt. 1)
then
326 if (nthrds .lt. 1e1)
then
327 write(log_buf(13 + rw + sw:),
'(a,i1,a)')
', using ', &
328 nthrds,
' thrds each'
329 else if (nthrds .lt. 1e2)
then
330 write(log_buf(13 + rw + sw:),
'(a,i2,a)')
', using ', &
331 nthrds,
' thrds each'
332 else if (nthrds .lt. 1e3)
then
333 write(log_buf(13 + rw + sw:),
'(a,i3,a)')
', using ', &
334 nthrds,
' thrds each'
335 else if (nthrds .lt. 1e4)
then
336 write(log_buf(13 + rw + sw:),
'(a,i4,a)')
', using ', &
337 nthrds,
' thrds each'
342 write(log_buf,
'(a)')
'CPU type : '
346 write(log_buf,
'(a)')
'Bcknd type: '
348 write(log_buf(13:),
'(a)')
'SX-Aurora'
350 write(log_buf(13:),
'(a)')
'CPU (libxsmm)'
352 write(log_buf(13:),
'(a)')
'Accelerator (CUDA)'
354 write(log_buf(13:),
'(a)')
'Accelerator (HIP)'
356 write(log_buf(13:),
'(a)')
'Accelerator (OpenCL)'
358 write(log_buf(13:),
'(a)')
'CPU'
364 write(log_buf,
'(a)')
'Dev. name : '
368 write(log_buf,
'(a)')
'Real type : '
371 write(log_buf(13:),
'(a)')
'single precision'
373 write(log_buf(13:),
'(a)')
'double precision'
375 write(log_buf(13:),
'(a)')
'quad precision'
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Retrieves a parameter by name or throws an error.
Simulation component factory. Both constructs and initializes the object.
Source term factory. Both constructs and initializes the object.
Interface to a C function to retrieve the CPU name (type).
Defines a Matrix-vector product.
Defines a boundary condition.
Defines a simulation case.
subroutine, public case_free(this)
Deallocate a case.
subroutine, public comm_free
subroutine, public comm_init
integer, public pe_size
MPI size of communicator.
integer, public pe_rank
MPI rank.
subroutine, public cpr_free(cpr)
Deallocate coefficients.
Implements the curl_t type.
Implements type data_streamer_t.
Implements the derivative_t type.
subroutine, public device_add2s1(a_d, b_d, c1, n, strm)
subroutine, public device_add2s2_many(y_d, x_d_d, a_d, j, n, strm)
subroutine, public device_sub3(a_d, b_d, c_d, n, strm)
Vector subtraction .
subroutine, public device_add2s2(a_d, b_d, c1, n, strm)
Vector addition with scalar multiplication (multiplication on first argument)
subroutine, public device_add2(a_d, b_d, n, strm)
Vector addition .
subroutine, public device_addcol3(a_d, b_d, c_d, n, strm)
Returns .
real(kind=rp) function, public device_glsum(a_d, n, strm)
Sum a vector of length n.
subroutine, public device_invcol1(a_d, n, strm)
Invert a vector .
subroutine, public device_add3s2(a_d, b_d, c_d, c1, c2, n, strm)
Returns .
subroutine, public device_rzero(a_d, n, strm)
Zero a real vector.
subroutine, public device_rone(a_d, n, strm)
Set all elements to one.
subroutine, public device_cmult(a_d, c, n, strm)
Multiplication by constant c .
subroutine, public device_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n, strm)
Compute a dot product (3-d version) assuming vector components etc.
subroutine, public device_glsc3_many(h, w_d, v_d_d, mult_d, j, n, strm)
subroutine, public device_cfill_mask(a_d, c, n, mask_d, n_mask, strm)
Fill a constant to a masked vector. .
subroutine, public device_cadd2(a_d, b_d, c, n, strm)
Add a scalar to vector .
subroutine, public device_sub2(a_d, b_d, n, strm)
Vector substraction .
subroutine, public device_copy(a_d, b_d, n, strm)
Copy a vector .
subroutine, public device_col2(a_d, b_d, n, strm)
Vector multiplication .
real(kind=rp) function, public device_vlsc3(u_d, v_d, w_d, n, strm)
Compute multiplication sum .
subroutine, public device_masked_copy_0(a_d, b_d, mask_d, n, n_mask, strm)
Copy a masked vector .
subroutine, public device_subcol3(a_d, b_d, c_d, n, strm)
Returns .
subroutine, public device_absval(a_d, n, strm)
subroutine, public device_invcol2(a_d, b_d, n, strm)
Vector division .
subroutine, public device_addsqr2s2(a_d, b_d, c1, n, strm)
Returns .
real(kind=rp) function, public device_glsc3(a_d, b_d, c_d, n, strm)
Weighted inner product .
real(kind=rp) function, public device_glsc2(a_d, b_d, n, strm)
Weighted inner product .
subroutine, public device_cmult2(a_d, b_d, c, n, strm)
Multiplication by constant c .
subroutine, public device_col3(a_d, b_d, c_d, n, strm)
Vector multiplication with 3 vectors .
subroutine, public device_addcol4(a_d, b_d, c_d, d_d, n, strm)
Returns .
subroutine, public device_cfill(a_d, c, n, strm)
Set all elements to a constant c .
subroutine, public device_add3(a_d, b_d, c_d, n, strm)
Vector addition .
Device abstraction, common interface for various accelerators.
subroutine, public device_finalize
subroutine, public device_name(name)
subroutine, public device_init
Defines a dirichlet boundary condition.
Implements the divergence_t type.
Defines a mapping of the degrees of freedom.
subroutine, public drag_torque_zone(dgtq, tstep, zone, center, s11, s22, s33, s12, s13, s23, p, coef, visc)
Some functions to calculate the lift/drag and torque Calculation can be done on a zone,...
subroutine, public drag_torque_facet(dgtq, xm0, ym0, zm0, center, s11, s22, s33, s12, s13, s23, pm1, visc, f, e, coef, xh)
Calculate drag and torque over a facet.
subroutine, public drag_torque_pt(dgtq, x, y, z, center, s11, s22, s33, s12, s13, s23, p, n1, n2, n3, v)
Calculate drag and torque from one point.
Defines inflow dirichlet conditions.
Defines user dirichlet condition for a scalar field.
Defines a registry for storing solution fields.
type(field_registry_t), target, public neko_field_registry
Global field registry.
Implements the field_writer_t type.
Module for file I/O operations.
Computes various statistics for the fluid fields. We use the Reynolds decomposition for a field u = ...
Implements the force_torque_t type.
Implements global_interpolation given a dofmap.
Implements the gradient_t type.
Implements a hash table ADT.
logical function, public jobctrl_time_limit()
Check if the job's time limit has been reached.
real(kind=rp) function, public jobctrl_jobtime()
Returns a job's time in seconds relative to the first call.
subroutine, public jobctrl_init()
Initialize jobctrl.
Utilities for retrieving parameters from the case files.
subroutine, public json_extract_object(json, name, object)
Extract object as a separate JSON dictionary.
Implements the base abstract type for Krylov solvers plus helper types.
A simulation component that computes lambda2 The values are stored in the field registry under the na...
integer, parameter, public neko_log_quiet
Always logged.
type(log_t), public neko_log
Global log stream.
Creates a 1d GLL point map along a specified direction based on the connectivity in the mesh.
Maps a 3D dofmap to a 2D spectral element grid.
subroutine, public cmult(a, c, n)
Multiplication by constant c .
subroutine, public cmult2(a, b, c, n)
Multiplication by constant c .
subroutine, public row_zero(a, m, n, e)
Sets row e to 0 in matrix a.
subroutine, public invcol2(a, b, n)
Vector division .
real(kind=rp) function, public vlsc2(u, v, n)
Compute multiplication sum .
real(kind=rp), parameter, public pi
real(kind=rp) function, public glsc3(a, b, c, n)
Weighted inner product .
subroutine, public ascol5(a, b, c, d, e, n)
Returns .
subroutine, public invers2(a, b, n)
Compute inverted vector .
subroutine, public cadd2(a, b, s, n)
Add a scalar to vector .
subroutine, public cadd(a, s, n)
Add a scalar to vector .
subroutine, public addsqr2s2(a, b, c1, n)
Returns .
real(kind=rp) function, public glsc4(a, b, c, d, n)
subroutine, public add2s1(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on first argument)
real(kind=rp) function, public glsc2(a, b, n)
Weighted inner product .
subroutine, public subcol3(a, b, c, n)
Returns .
subroutine, public rone(a, n)
Set all elements to one.
subroutine, public x_update(a, b, c, c1, c2, n)
Returns .
subroutine, public add3(a, b, c, n)
Vector addition .
integer function, public glimin(a, n)
Min of an integer vector of length n.
real(kind=rp) function, public glsum(a, n)
Sum a vector of length n.
subroutine, public sub3(a, b, c, n)
Vector subtraction .
subroutine, public addcol4(a, b, c, d, n)
Returns .
subroutine, public add2(a, b, n)
Vector addition .
subroutine, public cfill(a, c, n)
Set all elements to a constant c .
subroutine, public absval(a, n)
Take the absolute value of an array.
subroutine, public invcol3(a, b, c, n)
Invert a vector .
subroutine, public add3s2(a, b, c, c1, c2, n)
Returns .
subroutine, public subcol4(a, b, c, d, n)
Returns .
subroutine, public addcol3(a, b, c, n)
Returns .
subroutine, public invcol1(a, n)
Invert a vector .
subroutine, public chsign(a, n)
Change sign of vector .
subroutine, public col2(a, b, n)
Vector multiplication .
subroutine, public izero(a, n)
Zero an integer vector.
real(kind=rp) function, public glmax(a, n)
Max of a vector of length n.
subroutine, public copy(a, b, n)
Copy a vector .
subroutine, public add4(a, b, c, d, n)
Vector addition .
subroutine, public col3(a, b, c, n)
Vector multiplication with 3 vectors .
subroutine, public vdot3(dot, u1, u2, u3, v1, v2, v3, n)
Compute a dot product (3-d version) assuming vector components etc.
subroutine, public rzero(a, n)
Zero a real vector.
subroutine, public vdot2(dot, u1, u2, v1, v2, n)
Compute a dot product (2-d version) assuming vector components etc.
real(kind=rp) function, public vlmin(vec, n)
minimun value of a vector of length n
subroutine, public cfill_mask(a, c, n, mask, n_mask)
Fill a constant to a masked vector. .
real(kind=rp) function, public vlmax(vec, n)
maximum value of a vector of length n
integer function, public glimax(a, n)
Max of an integer vector of length n.
subroutine, public sub2(a, b, n)
Vector substraction .
subroutine, public add2s2(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on second argument)
real(kind=rp) function, public glmin(a, n)
Min of a vector of length n.
subroutine, public masked_copy_0(a, b, mask, n, n_mask)
Copy a masked vector .
subroutine, public vcross(u1, u2, u3, v1, v2, v3, w1, w2, w3, n)
Compute a cross product assuming vector components etc.
real(kind=rp) function, public vlsc3(u, v, w, n)
Compute multiplication sum .
subroutine, public p_update(a, b, c, c1, c2, n)
Returns .
Collection of vector field operations operating on and . Note that in general the indices and ....
subroutine, public opcolv(a1, a2, a3, c, gdim, n)
subroutine, public opadd2col(a1, a2, a3, b1, b2, b3, c, n, gdim)
subroutine, public opchsign(a1, a2, a3, gdim, n)
for and .
subroutine, public opadd2cm(a1, a2, a3, b1, b2, b3, c, n, gdim)
subroutine, public opcolv3c(a1, a2, a3, b1, b2, b3, c, d, n, gdim)
integer, parameter, public neko_msh_max_zlbls
Max num. zone labels.
Wrapper for all matrix-matrix product implementations.
subroutine, public mxm(a, n1, b, n2, c, n3)
Compute matrix-matrix product for contiguously packed matrices A,B, and C.
integer, parameter neko_bcknd_sx
integer, parameter neko_bcknd_hip
character(len=80), parameter neko_build_info
character(len=10), parameter neko_version
integer, parameter neko_bcknd_opencl
integer, parameter neko_bcknd_cuda
integer, parameter neko_bcknd_xsmm
subroutine, public neko_mpi_types_init
Define all MPI derived types.
subroutine, public neko_mpi_types_free
Deallocate all derived MPI types.
integer, parameter, public qp
integer, parameter, public dp
integer, parameter, public sp
integer, parameter, public c_rp
integer, parameter, public rp
Global precision used in computations.
subroutine, public ortho(x, glb_n_points, n)
Othogonalize with regard to vector (1,1,1,1,1,1...,1)^T.
real(kind=rp) function, public cfl(dt, u, v, w, xh, coef, nelv, gdim)
subroutine, public opgrad(ux, uy, uz, u, coef, es, ee)
Compute the weak gradient of a scalar field, i.e. the gradient multiplied by the mass matrix.
subroutine, public div(res, ux, uy, uz, coef)
Compute the divergence of a vector field.
subroutine, public conv1(du, u, vx, vy, vz, xh, coef, es, ee)
Compute the advection term.
subroutine, public grad(ux, uy, uz, u, coef)
Compute the gradient of a scalar field.
subroutine, public curl(w1, w2, w3, u1, u2, u3, work1, work2, coef, event)
subroutine, public strain_rate(s11, s22, s33, s12, s13, s23, u, v, w, coef)
Compute the strain rate tensor, i.e 0.5 * du_i/dx_j + du_j/dx_i.
subroutine, public lambda2op(lambda2, u, v, w, coef)
Compute the Lambda2 field for a given velocity field.
subroutine, public cdtp(dtx, x, dr, ds, dt, coef, es, ee)
Apply D^T to a scalar field, where D is the derivative matrix.
subroutine, public dudxyz(du, u, dr, ds, dt, coef)
Compute derivative of a scalar field along a single direction.
Implements output_controller_t
subroutine, public parmetis_partmeshkway(msh, parts, weights, nprts)
Compute a k-way partitioning of a mesh msh.
subroutine, public parmetis_partgeom(msh, parts)
Compute a k-way partitioning of a mesh msh using a coordinated-based space-filing curves method.
Routines to interpolate fields on a given element on a point in that element with given r,...
type(point_zone_registry_t), target, public neko_point_zone_registry
Global point_zone registry.
subroutine, public profiler_start
Start profiling.
subroutine, public profiler_start_region(name, region_id)
Started a named (name) profiler region.
subroutine, public profiler_end_region(name, region_id)
End the most recently started profiler region.
subroutine, public profiler_stop
Stop profiling.
Project x onto X, the space of old solutions and back again.
type(runtime_stats_t), public neko_rt_stats
Defines a registry for storing and requesting temporary fields This can be used when you have a funct...
type(scratch_registry_t), target, public neko_scratch_registry
Global scratch registry.
Interface to signal handler.
Contains the simcomp_executor_t type.
type(simcomp_executor_t), target, public neko_simcomps
Global variable for the simulation component driver.
Simulation components are objects that encapsulate functionality that can be fit to a particular comp...
subroutine, public simulation_step(c, dt_controller, tstep_loop_start_time)
Compute a single time-step of a case.
subroutine, public simulation_finalize(c)
Finalize a simulation of a case.
subroutine, public simulation_init(c, dt_controller)
Initialise a simulation of a case.
Implements the source_term_t type and a wrapper source_term_wrapper_t.
Defines a function space.
integer, parameter, public gll
integer, parameter, public gj
integer, parameter, public gl
LIBRARY ROUTINES FOR SPECTRAL METHODS.
Implements type spectral_error_t.
Implements a dynamic stack ADT.
Interface to system information routines.
subroutine, public system_cpu_name(name)
Retrieve the system's CPU name (type)
Contains the time_based_controller_t type.
Implements type time_interpolator_t.
Module with things related to the simulation time.
Implements type time_step_controller.
User access singleton Defines a singleton object available in the user file. Intended to allow unrest...
type(user_access_t), target, public neko_user_access
The singleton object.
Interfaces for user interaction with NEKO.
Implements the user_source_term_t type.
Implements an unordered set ADT.
subroutine, public filename_suffix(fname, suffix)
Extract a filename's suffix.
Implements the weak_gradient_t type.
Defines a zero-valued Dirichlet boundary condition.
void neko_solve(int **case_iptr)
Base type for a matrix-vector product providing .
Base type for a boundary condition.
A list of allocatable `bc_t`. Follows the standard interface of lists.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
include information needed for compressing fields
A simulation component that computes the curl of a vector field. Added to the field registry as curl_...
Provides access to data streaming by interfacing with c++ ADIOS2 subroutines.
A simulation component that computes a derivative of a field. Wraps the duxyz operator.
Generic Dirichlet boundary condition on .
A simulation component that computes the divergence of a vector field. Added to the field registry as...
field_ptr_t, To easily obtain a pointer to a field
User defined dirichlet condition, for which the user can work with an entire field....
Extension of the user defined dirichlet condition field_dirichlet
field_list_t, To be able to group fields together
A simulation component that writes a 3d field to a file.
A simulation component that computes the force and torque on a given boundary zone.
A simulation component that computes the gradient of a field. Wraps the gradient operator.
Base abstract type for LES models based on the Boussinesq approximation.
Type that encapsulates a mapping from each gll point in the mesh to its corresponding (global) GLL po...
Abstract type defining an output type.
Centralized controller for a list of outputs.
A point in with coordinates .
Field interpolator to arbitrary points within an element. Tailored for experimentation,...
Base abstract type for point zones.
Base abstract class for simulation components.
A helper type that is needed to have an array of polymorphic objects.
Base abstract type for source terms.
The function space for the SEM solution fields.
Provides tools to calculate the spectral error indicator.
A sphere-shaped point zone.
A utility type for determining whether an action should be executed based on the current time value....
Provides a tool to perform interpolation in time.
Provides a tool to set time step dt.
A source term wrapping the user source term routine. Stores fields that are passed to the user routin...
A simulation component that computes the weak gradient of a field. Wraps the opgradient operator.
Zero-valued Dirichlet boundary condition. Used for no-slip walls, but also for various auxillary cond...