atlas::Redistribution class

Base redistributer class.

Class to map two function spaces with the same grid but different partitioners.

Constructors, destructors, conversion operators

Redistribution()
Empty default constructor.
Redistribution(const FunctionSpace& source, const FunctionSpace& target, const util::Config& config = util::Config())
Constructs and initialises the redistributor.

Public functions

void execute(const Field& source, Field& target) const
Maps source field to target field.
void execute(const FieldSet& sourceFieldSet, FieldSet& targetFieldSet) const
Redistributes source field set to target fields set.
auto source() const -> const FunctionSpace&
Get const reference to source function space.
auto target() const -> const FunctionSpace&
Get const reference to target function space.

Function documentation

atlas::Redistribution::Redistribution(const FunctionSpace& source, const FunctionSpace& target, const util::Config& config = util::Config())

Constructs and initialises the redistributor.

Parameters
source in Function space of source fields.
target in Function space of target fields.
config in Config to specify "type" of redistribution.

Initialises class to copy fields from a source function space to fields from a target functionspace. The grids of source and target function space must match.

void atlas::Redistribution::execute(const Field& source, Field& target) const

Maps source field to target field.

Parameters
source in input field matching sourceFunctionSpace.
target out output field matching targetFunctionSpace.

Transfers data from source field to target field. Function space of source field must match sourceFunctionSpace. Same applies to target field.

void atlas::Redistribution::execute(const FieldSet& sourceFieldSet, FieldSet& targetFieldSet) const

Redistributes source field set to target fields set.

Transfers source field set to target field set via multiple invocations of execute(sourceField, targetField).