41 invers2,
vcross,
vdot2,
vdot3,
vlsc3,
vlsc2,
add2,
add3,
add4,
sub2, &
118 use json_module,
only : json_file
120 use,
intrinsic :: iso_fortran_env
127 type(
case_t),
target,
intent(inout),
optional :: C
128 character(len=NEKO_FNAME_LEN) :: case_file
129 character(len=LOG_SIZE) :: log_buf
130 character(len=10) :: suffix
131 character(10) :: time
133 integer :: argc, nthrds, rw, sw
135 call date_and_time(time = time, date = date)
147 write(*,*)
' _ __ ____ __ __ ____ '
148 write(*,*)
' / |/ / / __/ / //_/ / __ \ '
149 write(*,*)
' / / / _/ / ,< / /_/ / '
150 write(*,*)
'/_/|_/ /___/ /_/|_| \____/ '
159 argc = command_argument_count()
161 if ((argc .lt. 1) .or. (argc .gt. 1))
then
162 if (
pe_rank .eq. 0)
write(*,*)
'Usage: ./neko < case file >'
166 call get_command_argument(1, case_file)
170 if (trim(suffix) .ne.
'case')
then
177 call neko_error(
'Only one device is supported per MPI rank')
184 call neko_log%section(
"Job Information")
185 write(log_buf,
'(A,A,A,A,1x,A,1x,A,A,A,A,A)')
'Start time: ',&
186 time(1:2),
':', time(3:4), &
187 '/', date(1:4),
'-', date(5:6),
'-', date(7:8)
189 write(log_buf,
'(a)')
'Running on: '
192 write(log_buf(13:),
'(i1,a)')
pe_size,
' MPI '
194 write(log_buf(19:),
'(a)')
'rank'
197 write(log_buf(19:),
'(a)')
'ranks'
200 else if (
pe_size .lt. 1e2)
then
201 write(log_buf(13:),
'(i2,a)')
pe_size,
' MPI ranks'
203 else if (
pe_size .lt. 1e3)
then
204 write(log_buf(13:),
'(i3,a)')
pe_size,
' MPI ranks'
206 else if (
pe_size .lt. 1e4)
then
207 write(log_buf(13:),
'(i4,a)')
pe_size,
' MPI ranks'
209 else if (
pe_size .lt. 1e5)
then
210 write(log_buf(13:),
'(i5,a)')
pe_size,
' MPI ranks'
213 write(log_buf(13:),
'(i6,a)')
pe_size,
' MPI ranks'
224 if (nthrds .gt. 1)
then
225 if (nthrds .lt. 1e1)
then
226 write(log_buf(13 + rw + sw:),
'(a,i1,a)')
', using ', &
227 nthrds,
' thrds each'
228 else if (nthrds .lt. 1e2)
then
229 write(log_buf(13 + rw + sw:),
'(a,i2,a)')
', using ', &
230 nthrds,
' thrds each'
231 else if (nthrds .lt. 1e3)
then
232 write(log_buf(13 + rw + sw:),
'(a,i3,a)')
', using ', &
233 nthrds,
' thrds each'
234 else if (nthrds .lt. 1e4)
then
235 write(log_buf(13 + rw + sw:),
'(a,i4,a)')
', using ', &
236 nthrds,
' thrds each'
241 write(log_buf,
'(a)')
'CPU type : '
245 write(log_buf,
'(a)')
'Bcknd type: '
247 write(log_buf(13:),
'(a)')
'SX-Aurora'
249 write(log_buf(13:),
'(a)')
'CPU (libxsmm)'
251 write(log_buf(13:),
'(a)')
'Accelerator (CUDA)'
253 write(log_buf(13:),
'(a)')
'Accelerator (HIP)'
255 write(log_buf(13:),
'(a)')
'Accelerator (OpenCL)'
257 write(log_buf(13:),
'(a)')
'CPU'
263 write(log_buf,
'(a)')
'Dev. name : '
268 write(log_buf,
'(a)')
'Real type : '
271 write(log_buf(13:),
'(a)')
'single precision'
273 write(log_buf(13:),
'(a)')
'double precision'
275 write(log_buf(13:),
'(a)')
'quad precision'
296 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(C)
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_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.
subroutine, public json_extract_item(core, array, i, item)
Extract ith item from a JSON array as a separate JSON object.
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.
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 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.
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.
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_indicator_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.
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.