41 invers2,
vcross,
vdot2,
vdot3,
vlsc3,
vlsc2,
add2,
add3,
add4,
sub2, &
121 use json_module,
only : json_file
123 use,
intrinsic :: iso_fortran_env
130 type(
case_t),
target,
intent(inout),
optional :: C
131 character(len=NEKO_FNAME_LEN) :: case_file, args
132 character(len=LOG_SIZE) :: log_buf
133 character(len=10) :: suffix
134 character(10) :: time
136 integer :: argc, nthrds, rw, sw, i
138 call date_and_time(time = time, date = date)
152 argc = command_argument_count()
154 if (argc .lt. 1)
then
155 if (
pe_rank .eq. 0)
write(*,*)
'Usage: ./neko <case file>'
159 call get_command_argument(1, case_file)
163 if (trim(suffix) .ne.
'case' .and. trim(suffix) .ne.
'json')
then
170 call neko_error(
'Only one device is supported per MPI rank')
177 call neko_log%section(
"Job Information")
178 write(log_buf,
'(A,A,A,A,1x,A,1x,A,A,A,A,A)')
'Start time: ',&
179 time(1:2),
':', time(3:4), &
180 '/', date(1:4),
'-', date(5:6),
'-', date(7:8)
182 if (argc .gt. 1)
then
183 write(log_buf,
'(a)')
'Running with command line arguments: '
186 call get_command_argument(i, args)
190 write(log_buf,
'(a)')
'Running on: '
193 write(log_buf(13:),
'(i1,a)')
pe_size,
' MPI '
195 write(log_buf(19:),
'(a)')
'rank'
198 write(log_buf(19:),
'(a)')
'ranks'
201 else if (
pe_size .lt. 1e2)
then
202 write(log_buf(13:),
'(i2,a)')
pe_size,
' MPI ranks'
204 else if (
pe_size .lt. 1e3)
then
205 write(log_buf(13:),
'(i3,a)')
pe_size,
' MPI ranks'
207 else if (
pe_size .lt. 1e4)
then
208 write(log_buf(13:),
'(i4,a)')
pe_size,
' MPI ranks'
210 else if (
pe_size .lt. 1e5)
then
211 write(log_buf(13:),
'(i5,a)')
pe_size,
' MPI ranks'
214 write(log_buf(13:),
'(i6,a)')
pe_size,
' MPI ranks'
225 if (nthrds .gt. 1)
then
226 if (nthrds .lt. 1e1)
then
227 write(log_buf(13 + rw + sw:),
'(a,i1,a)')
', using ', &
228 nthrds,
' thrds each'
229 else if (nthrds .lt. 1e2)
then
230 write(log_buf(13 + rw + sw:),
'(a,i2,a)')
', using ', &
231 nthrds,
' thrds each'
232 else if (nthrds .lt. 1e3)
then
233 write(log_buf(13 + rw + sw:),
'(a,i3,a)')
', using ', &
234 nthrds,
' thrds each'
235 else if (nthrds .lt. 1e4)
then
236 write(log_buf(13 + rw + sw:),
'(a,i4,a)')
', using ', &
237 nthrds,
' thrds each'
242 write(log_buf,
'(a)')
'CPU type : '
246 write(log_buf,
'(a)')
'Bcknd type: '
248 write(log_buf(13:),
'(a)')
'SX-Aurora'
250 write(log_buf(13:),
'(a)')
'CPU (libxsmm)'
252 write(log_buf(13:),
'(a)')
'Accelerator (CUDA)'
254 write(log_buf(13:),
'(a)')
'Accelerator (HIP)'
256 write(log_buf(13:),
'(a)')
'Accelerator (OpenCL)'
258 write(log_buf(13:),
'(a)')
'CPU'
264 write(log_buf,
'(a)')
'Dev. name : '
269 write(log_buf,
'(a)')
'Real type : '
272 write(log_buf(13:),
'(a)')
'single precision'
274 write(log_buf(13:),
'(a)')
'double precision'
276 write(log_buf(13:),
'(a)')
'quad precision'
303 type(
case_t),
intent(inout),
optional :: C
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.
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.
integer pe_size
MPI size of communicator.
subroutine, public cpr_free(cpr)
Deallocate coefficients.
Implements type data_streamer_t.
subroutine, public device_add2(a_d, b_d, n)
Vector addition .
subroutine, public device_addcol3(a_d, b_d, c_d, n)
Returns .
subroutine, public device_col2(a_d, b_d, n)
Vector multiplication .
subroutine, public device_add2s1(a_d, b_d, c1, n)
subroutine, public device_rzero(a_d, n)
Zero a real vector.
real(kind=rp) function, public device_vlsc3(u_d, v_d, w_d, n)
Compute multiplication sum .
subroutine, public device_rone(a_d, n)
Set all elements to one.
subroutine, public device_add2s2(a_d, b_d, c1, n)
Vector addition with scalar multiplication (multiplication on first argument)
subroutine, public device_invcol1(a_d, n)
Invert a vector .
subroutine, public device_col3(a_d, b_d, c_d, n)
Vector multiplication with 3 vectors .
subroutine, public device_cadd(a_d, c, n)
Add a scalar to vector .
subroutine, public device_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n)
Compute a dot product (3-d version) assuming vector components etc.
subroutine, public device_cmult2(a_d, b_d, c, n)
Multiplication by constant c .
subroutine, public device_cmult(a_d, c, n)
Multiplication by constant c .
subroutine, public device_absval(a_d, n)
subroutine, public device_masked_copy(a_d, b_d, mask_d, n, m)
Copy a masked vector .
subroutine, public device_add2s2_many(y_d, x_d_d, a_d, j, n)
subroutine, public device_cfill_mask(a_d, c, size, mask_d, mask_size)
Fill a constant to a masked vector. .
real(kind=rp) function, public device_glsc2(a_d, b_d, n)
Weighted inner product .
subroutine, public device_sub3(a_d, b_d, c_d, n)
Vector subtraction .
real(kind=rp) function, public device_glsc3(a_d, b_d, c_d, n)
Weighted inner product .
subroutine, public device_add3(a_d, b_d, c_d, n)
Vector addition .
real(kind=rp) function, public device_glsum(a_d, n)
Sum a vector of length n.
subroutine, public device_cadd2(a_d, b_d, c, n)
Add a scalar to vector .
subroutine, public device_copy(a_d, b_d, n)
Copy a vector .
subroutine, public device_add3s2(a_d, b_d, c_d, c1, c2, n)
Returns .
subroutine, public device_subcol3(a_d, b_d, c_d, n)
Returns .
subroutine, public device_glsc3_many(h, w_d, v_d_d, mult_d, j, n)
subroutine, public device_sub2(a_d, b_d, n)
Vector substraction .
subroutine, public device_cfill(a_d, c, n)
Set all elements to a constant c .
subroutine, public device_addcol4(a_d, b_d, c_d, d_d, n)
Returns .
subroutine, public device_invcol2(a_d, b_d, n)
Vector division .
subroutine, public device_addsqr2s2(a_d, b_d, c1, n)
Returns .
Device abstraction, common interface for various accelerators.
subroutine, public device_finalize
subroutine, public device_name(name)
integer function device_count()
Return the number of available devices.
subroutine, public device_init
Defines a dirichlet boundary condition.
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 inflow dirichlet conditions.
Defines a registry for storing solution fields.
type(field_registry_t), target, public neko_field_registry
Global field registry.
Module for file I/O operations.
Computes various statistics for the fluid fields. We use the Reynolds decomposition for a field u = ...
Implements the fluid_user_source_term_t type.
Implements global_interpolation given a dofmap.
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.
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 masked_copy(a, b, mask, n, m)
Copy a masked 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
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 cfill_mask(a, c, size, mask, mask_size)
Fill a constant to a masked vector. .
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 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)
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_device
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.
subroutine neko_finalize(C)
integer, parameter, public qp
integer, parameter, public dp
integer, parameter, public sp
integer, parameter, public rp
Global precision used in computations.
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 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)
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 ortho(x, n, glb_n)
Othogonalize with regard to vector (1,1,1,1,1,1...,1)^T.
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.
real(kind=rp) function, public cfl(dt, u, v, w, Xh, coef, nelv, gdim)
subroutine, public conv1(du, u, vx, vy, vz, Xh, coef, es, ee)
Compute the advection term.
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.
Project x onto X, the space of old solutions and back again.
type(runtime_stats_t), public neko_rt_stats
Implements the scalar_user_source_term_t type.
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 neko_solve(C)
Main driver to solve a case C.
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)
Implements type time_interpolator_t.
Interfaces for user interaction with NEKO.
Implements an unordered set ADT.
subroutine, public filename_suffix(fname, suffix)
Extract a filename's suffix.
Defines wall boundary conditions.
Base type for a matrix-vector product providing .
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
include information needed for compressing fields
Provides access to data streaming by interfacing with c++ ADIOS2 subroutines.
Generic Dirichlet boundary condition on .
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
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.
The function space for the SEM solution fields.
A sphere-shaped point zone.
Provides a tool to perform interpolation in time.
No-slip Wall boundary condition.