Cartesian Fields
ClimateMachine.CartesianFields.SpectralElementField
— TypeSpectralElementField(domain::RectangularDomain, state::MPIStateArray, variable_index::Int)
Returns a Cartesian view
into state.realdata[:, variable_index, :]
, assuming that state.realdata
lives on RectangularDomain
.
SpectralElementField.elements
is a three-dimensional array of RectangularElements
.
SpectralElementField(domain::RectangularDomain, grid, realdata::AbstractArray)
Returns a SpectralElementField
whose elements
provide a Cartesian view
into realdata
, assuming that realdata
lives on domain::RectangularDomain
.
ClimateMachine.CartesianFields.RectangularElement
— TypeRectangularElement(domain, grid, realdata, element_index)
Returns a Cartesian view into the realdata
and nodes (located in grid
) associated with element_index
.
ClimateMachine.CartesianFields.assemble
— FunctionAssemble an array along the first dimension.
Assemble an array along the second dimension.
Assemble an array along the third dimension.
Assemble elements along dim
ension.
assemble(elements::Array{<:RectangularElement, 3})
Assemble the three-dimensional data in elements
into a single Array
, averaging data on shared nodes.
assemble(u::SpectralElementField)
Assemble u.elements
into a single element::eltype(u)
, averaging shared nodes.
assemble_data(u::SpectralElementField{<:CuArray})
Assemble the data in u.elements
into a single Array
, averaging shared nodes.