From e79c09f86f351dbba1a5ff2283ded8aa9012d20d Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Wed, 7 Feb 2024 22:02:52 +0000 Subject: [PATCH] build based on 27f7625 --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 2 +- dev/lib/modules/index.html | 2 +- dev/usage/runtests/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index aa09b027..6044abe6 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-02-07T21:26:19","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-02-07T22:02:50","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index 359f153c..65dcfd24 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · Chmy
+Home · Chmy
diff --git a/dev/lib/modules/index.html b/dev/lib/modules/index.html index 7d05fe17..7c0feaeb 100644 --- a/dev/lib/modules/index.html +++ b/dev/lib/modules/index.html @@ -1,2 +1,2 @@ -Modules · Chmy

Modules

Grids

Chmy.Grids.UniformGridMethod
UniformGrid(; origin, extent, dims, topology=nothing) where {N}

Constructs a uniform grid with specified origin, extent, dimensions, and topology.

Arguments

  • origin::NTuple{N,Number}: The origin of the grid.
  • extent::NTuple{N,Number}: The extent of the grid.
  • dims::NTuple{N,Integer}: The dimensions of the grid.
  • topology=nothing: The topology of the grid. If not provided, a default Bounded topology is used.
source
Chmy.Grids.axisMethod
axis(grid::RegularGrid, ::Val{dim}) where {dim}

Return the axis corresponding to the spatial dimension dim.

source
Chmy.Grids.boundsMethod
bounds(grid::StructuredGrid{N}, loc::LocOrLocs{N}) where {N}

Compute the bounds of a structured grid at the specified location(s).

source
Chmy.Grids.connectivityMethod
connectivity(grid::StructuredGrid{N,T,C}, D::Val, S::Val)

Return the connectivity of the structured grid grid for the given dimension D and side S.

source
Chmy.Grids.coordMethod
coord(grid::RegularGrid{N}, loc::[Location, NTuple{N,Location}], I...) where {N}

Return a tuple of spatial coordinates of a grid point at location loc and indices I.

For vertex locations, first grid point is at the origin. For center locations, first grid point at half-spacing distance from the origin.

source
Chmy.Grids.inv_spacingMethod
inv_spacing(grid::RegularGrid{N}, loc::[Location, NTuple{N,Location}], I...) where {N}

Return a tuple of inverse grid spacings at location loc and indices I.

source
Chmy.Grids.spacingMethod
spacing(grid::RegularGrid{N}, loc::[Location, NTuple{N,Location}], I...) where {N}

Return a tuple of grid spacings at location loc and indices I.

source

Architectures

Chmy.Architectures.ArchMethod
Arch(backend::Backend; device_id::Integer=1)

Create an architecture object for the specified backend and device.

Arguments

  • backend: The backend to use for computation.
  • device_id=1: The ID of the device to use.
source
Chmy.Architectures.activate!Method
activate!(arch::SingleDeviceArchitecture; priority=:normal)

Activate the given architecture on the specified device and set the priority of the backend.

source

Fields

Chmy.Fields.FieldType
struct Field{T,N,L,H,A} <: AbstractField{T,N,L}

Field represents a discrete scalar field with specified type, number of dimensions, location, and halo size.

source
Chmy.Fields.FieldMethod
Field(backend, grid, loc, type=eltype(grid); halo=1)

Constructs a field on a structured grid at the specified location.

Arguments:

  • backend: The backend to use for memory allocation.
  • grid: The structured grid on which the field is constructed.
  • loc: The location or locations on the grid where the field is constructed.
  • type: The element type of the field. Defaults to the element type of the grid.
  • halo: The halo size for the field. Defaults to 1.
source
Chmy.Fields.FunctionFieldType
struct FunctionField{T,N,L,CD,F,G,P} <: AbstractField{T,N,L}

Continuous or discrete field with values computed at runtime.

Constructors

  • FunctionField{CD,L}(func::F, grid::G, parameters::P) where {CD,L,F,G,P}: Create a new FunctionField object.
source

Grid Operators

Boundary Conditions

Chmy.BoundaryConditions.bc!Method
bc!(arch::Architecture, grid::StructuredGrid, batch::BatchSet)

Apply boundary conditions using a batch set batch containing an AbstractBatch per dimension per side of grid.

Arguments

  • arch: The architecture.
  • grid: The grid.
  • batch:: The batch set to apply boundary conditions to.
source

Distributed

Chmy.Distributed.CartesianTopologyMethod
CartesianTopology(comm::MPI.Comm, dims::NTuple{N,Int}) where {N}

Create an N-dimensional Cartesian topology using base MPI communicator comm with dimensions dims. If all entries in dims are not equal to 0, the product of dims should be equal to the total number of MPI processes MPI.Comm_size(comm). If any (or all) entries of dims are 0, the dimensions in the corresponding spatial directions will be picked automatically.

source
Chmy.Distributed.StackAllocatorType
mutable struct StackAllocator

Simple stack (a.k.a. bump/arena) allocator. Maintains an internal buffer that grows dynamically if the requested allocation exceeds current buffer size.

source
Chmy.Architectures.ArchMethod
Arch(backend::Backend, comm::MPI::Comm, dims; kwargs...) where {N}

Create a distributed Architecture using backend backend and comm. For GPU backends, device will be selected automatically based on a process id within a node.

source
Chmy.Distributed.allocateFunction
allocate(sa::StackAllocator, T::DataType, dims, [align=sizeof(T)])

Allocate a buffer of type T with dimensions dims using a stack allocator. The align parameter specifies the alignment of the buffer elements.

Arguments

  • sa::StackAllocator: The stack allocator object.
  • T::DataType: The data type of the requested allocation.
  • dims: The dimensions of the requested allocation.
  • align::Integer: The alignment of the allocated buffer in bytes.
source
Chmy.Distributed.gather!Method
gather!(arch::DistributedArchitecture, dst, src::Field; kwargs...)

Gather the interior of a field src into a global array dst.

source
Chmy.Distributed.gather!Method
gather!(dst::Union{AbstractArray{T,N},Nothing}, src::AbstractArray{T,N}, comm::MPI.Comm; root=0) where {T,N}

Gather local array src into a global array dst. Size of the global array size(dst) should be equal to the product of the size of a local array size(src) and the dimensions of a Cartesian communicator comm. The array will be gathered on the process with id root (root=0 by default). Note that the memory for a global array should be allocated only on the process with id root, on other processes dst can be set to nothing.

source
Chmy.Distributed.has_neighborMethod
has_neighbor(t::CartesianTopology, dim, side)

Returns true if there a neighbor process in spatial direction dim on the side side, or false otherwise.

source
Chmy.Distributed.neighborMethod
neighbor(t::CartesianTopology, dim, side)

Returns id of a neighbor process in spatial direction dim on the side side, if this neighbor exists, or MPI.PROC_NULL otherwise.

source
Chmy.Distributed.neighborsMethod
neighbors(t::CartesianTopology)

Neighbors of a current process.

Returns NTuple containing process ids of the two immediate neighbors in each spatial direction, or MPI.PROC_NULL if no neighbor on a corresponding side.

source
Chmy.Distributed.reset!Method
reset!(sa::StackAllocator)

Reset the stack allocator by resetting the pointer. Doesn't free the internal memory buffer.

source

Workers

Chmy.Workers.WorkerType
mutable struct Worker{T}

A worker that performs tasks asynchronously.

Constructor

Worker{T}(; setup=nothing, teardown=nothing) where {T}

Constructs a new Worker object.

Arguments

  • setup: A function to be executed before the worker starts processing tasks. (optional)
  • teardown: A function to be executed after the worker finishes processing tasks. (optional)
source
+Modules · Chmy

Modules

Grids

Chmy.Grids.UniformGridMethod
UniformGrid(; origin, extent, dims, topology=nothing) where {N}

Constructs a uniform grid with specified origin, extent, dimensions, and topology.

Arguments

  • origin::NTuple{N,Number}: The origin of the grid.
  • extent::NTuple{N,Number}: The extent of the grid.
  • dims::NTuple{N,Integer}: The dimensions of the grid.
  • topology=nothing: The topology of the grid. If not provided, a default Bounded topology is used.
source
Chmy.Grids.axisMethod
axis(grid::RegularGrid, ::Val{dim}) where {dim}

Return the axis corresponding to the spatial dimension dim.

source
Chmy.Grids.boundsMethod
bounds(grid::StructuredGrid{N}, loc::LocOrLocs{N}) where {N}

Compute the bounds of a structured grid at the specified location(s).

source
Chmy.Grids.connectivityMethod
connectivity(grid::StructuredGrid{N,T,C}, D::Val, S::Val)

Return the connectivity of the structured grid grid for the given dimension D and side S.

source
Chmy.Grids.coordMethod
coord(grid::RegularGrid{N}, loc::[Location, NTuple{N,Location}], I...) where {N}

Return a tuple of spatial coordinates of a grid point at location loc and indices I.

For vertex locations, first grid point is at the origin. For center locations, first grid point at half-spacing distance from the origin.

source
Chmy.Grids.inv_spacingMethod
inv_spacing(grid::RegularGrid{N}, loc::[Location, NTuple{N,Location}], I...) where {N}

Return a tuple of inverse grid spacings at location loc and indices I.

source
Chmy.Grids.spacingMethod
spacing(grid::RegularGrid{N}, loc::[Location, NTuple{N,Location}], I...) where {N}

Return a tuple of grid spacings at location loc and indices I.

source

Architectures

Chmy.Architectures.ArchMethod
Arch(backend::Backend; device_id::Integer=1)

Create an architecture object for the specified backend and device.

Arguments

  • backend: The backend to use for computation.
  • device_id=1: The ID of the device to use.
source
Chmy.Architectures.activate!Method
activate!(arch::SingleDeviceArchitecture; priority=:normal)

Activate the given architecture on the specified device and set the priority of the backend.

source

Fields

Chmy.Fields.FieldType
struct Field{T,N,L,H,A} <: AbstractField{T,N,L}

Field represents a discrete scalar field with specified type, number of dimensions, location, and halo size.

source
Chmy.Fields.FieldMethod
Field(backend, grid, loc, type=eltype(grid); halo=1)

Constructs a field on a structured grid at the specified location.

Arguments:

  • backend: The backend to use for memory allocation.
  • grid: The structured grid on which the field is constructed.
  • loc: The location or locations on the grid where the field is constructed.
  • type: The element type of the field. Defaults to the element type of the grid.
  • halo: The halo size for the field. Defaults to 1.
source
Chmy.Fields.FunctionFieldType
struct FunctionField{T,N,L,CD,F,G,P} <: AbstractField{T,N,L}

Continuous or discrete field with values computed at runtime.

Constructors

  • FunctionField{CD,L}(func::F, grid::G, parameters::P) where {CD,L,F,G,P}: Create a new FunctionField object.
source

Grid Operators

Boundary Conditions

Chmy.BoundaryConditions.bc!Method
bc!(arch::Architecture, grid::StructuredGrid, batch::BatchSet)

Apply boundary conditions using a batch set batch containing an AbstractBatch per dimension per side of grid.

Arguments

  • arch: The architecture.
  • grid: The grid.
  • batch:: The batch set to apply boundary conditions to.
source

Distributed

Chmy.Distributed.CartesianTopologyMethod
CartesianTopology(comm::MPI.Comm, dims::NTuple{N,Int}) where {N}

Create an N-dimensional Cartesian topology using base MPI communicator comm with dimensions dims. If all entries in dims are not equal to 0, the product of dims should be equal to the total number of MPI processes MPI.Comm_size(comm). If any (or all) entries of dims are 0, the dimensions in the corresponding spatial directions will be picked automatically.

source
Chmy.Distributed.StackAllocatorType
mutable struct StackAllocator

Simple stack (a.k.a. bump/arena) allocator. Maintains an internal buffer that grows dynamically if the requested allocation exceeds current buffer size.

source
Chmy.Architectures.ArchMethod
Arch(backend::Backend, comm::MPI::Comm, dims; kwargs...) where {N}

Create a distributed Architecture using backend backend and comm. For GPU backends, device will be selected automatically based on a process id within a node.

source
Chmy.Distributed.allocateFunction
allocate(sa::StackAllocator, T::DataType, dims, [align=sizeof(T)])

Allocate a buffer of type T with dimensions dims using a stack allocator. The align parameter specifies the alignment of the buffer elements.

Arguments

  • sa::StackAllocator: The stack allocator object.
  • T::DataType: The data type of the requested allocation.
  • dims: The dimensions of the requested allocation.
  • align::Integer: The alignment of the allocated buffer in bytes.
source
Chmy.Distributed.gather!Method
gather!(arch::DistributedArchitecture, dst, src::Field; kwargs...)

Gather the interior of a field src into a global array dst.

source
Chmy.Distributed.gather!Method
gather!(dst::Union{AbstractArray{T,N},Nothing}, src::AbstractArray{T,N}, comm::MPI.Comm; root=0) where {T,N}

Gather local array src into a global array dst. Size of the global array size(dst) should be equal to the product of the size of a local array size(src) and the dimensions of a Cartesian communicator comm. The array will be gathered on the process with id root (root=0 by default). Note that the memory for a global array should be allocated only on the process with id root, on other processes dst can be set to nothing.

source
Chmy.Distributed.has_neighborMethod
has_neighbor(t::CartesianTopology, dim, side)

Returns true if there a neighbor process in spatial direction dim on the side side, or false otherwise.

source
Chmy.Distributed.neighborMethod
neighbor(t::CartesianTopology, dim, side)

Returns id of a neighbor process in spatial direction dim on the side side, if this neighbor exists, or MPI.PROC_NULL otherwise.

source
Chmy.Distributed.neighborsMethod
neighbors(t::CartesianTopology)

Neighbors of a current process.

Returns NTuple containing process ids of the two immediate neighbors in each spatial direction, or MPI.PROC_NULL if no neighbor on a corresponding side.

source
Chmy.Distributed.reset!Method
reset!(sa::StackAllocator)

Reset the stack allocator by resetting the pointer. Doesn't free the internal memory buffer.

source

Workers

Chmy.Workers.WorkerType
mutable struct Worker{T}

A worker that performs tasks asynchronously.

Constructor

Worker{T}(; setup=nothing, teardown=nothing) where {T}

Constructs a new Worker object.

Arguments

  • setup: A function to be executed before the worker starts processing tasks. (optional)
  • teardown: A function to be executed after the worker finishes processing tasks. (optional)
source
diff --git a/dev/usage/runtests/index.html b/dev/usage/runtests/index.html index 092e4e04..e061207d 100644 --- a/dev/usage/runtests/index.html +++ b/dev/usage/runtests/index.html @@ -2,4 +2,4 @@ Running tests · Chmy
+Pkg.test("Chmy"; test_args=["--backend=AMDGPU"])