Cartesian Domains

ClimateMachine.CartesianDomains.RectangularDomainType
RectangularDomain(FT=Float64;
                  Ne,
                  Np,
                  x = (-1, 1),
                  y = (-1, 1),
                  z = (-1, 1),
                  periodicity = (true, true, false))

Returns a RectangularDomain representing the product of x, y, z intervals, specified by 2-tuples.

The RectangularDomain is meshed with a simple DiscontinuousSpectralElementGrid with an isotropic polynomial order Np and a 3-tuple of Nelements giving the number of elements in x, y, z.

Additional arguments are:

  • periodicity: a 3-tuple that indicates periodic dimensions with true,

  • boundary: specifies the boundary condition on each boundary with a boundary condition tag

  • array_type: either Array for CPU computations or CuArray for GPU computations

  • mpicomm: communicator for sending data across nodes in a distributed memory configuration using the Message Passing Interface (MPI). See https://pages.tacc.utexas.edu/~eijkhout/pcse/html/mpi-comm.html

Example

julia> using ClimateMachine; ClimateMachine.init()

julia> using ClimateMachine.Ocean.RectangularDomains: RectangularDomain

julia> domain = RectangularDomain(Ne=(7, 8, 9), Np=4, x=(0, 1), y=(0, 1), z=(0, 1))
RectangularDomain{Float64}:
    Np = 4, Ne = (x = 7, y = 8, z = 9)
    L = (x = 1.00e+00, y = 1.00e+00, z = 1.00e+00)
    x = (0.00e+00, 1.00e+00), y = (0.00e+00, 1.00e+00), z = (1.00e+00, 0.00e+00)
source