# FunctionAssigner¶

class dolfin.cpp.function.FunctionAssigner(*args)

Bases: object

This class facilitate assignments between Function and sub Functions. It builds and caches maps between compatible dofs. These maps are used in the assignment methods which perform the actual assignment. Optionally can a MeshFunction be passed together with a label, facilitating FunctionAssignment over sub domains.

• FunctionAssigner(receiving_space, assigning_space)

Create a FunctionAssigner between functions residing in the same type of FunctionSpace. One or both functions can be sub functions.

Arguments
receiving_space (FunctionSpace)

The function space of the receiving function

assigning_space (FunctionSpace)

The function space of the assigning function

• FunctionAssigner(receiving_spaces, assigning_space)

Create a FunctionAssigner between one mixed function (assigning) and several functions (receiving). The number of receiving functions must sum up to the number of sub functions in the assigning mixed function. The sub spaces of the assigning mixed space must be of the same type ans size as the receiving spaces.

Arguments
receiving_spaces (list of FunctionSpace)

The recieving function spaces

assigning_space (FunctionSpace)

The assigning function space

• FunctionAssigner(receiving_space, assigning_spaces)

Create a FunctionAssigner between several functions (assigning) and one mixed function (receiving). The number of sub functions in the assigning mixed function must sum up to the number of receiving functions. The sub spaces of the receiving mixed space must be of the same type ans size as the assigning spaces.

Arguments
receiving_space (FunctionSpace)

The recieving function space

assigning_spaces (std::vector<boost::shared_ptr<FunctionSpace> >)

The assigning function spaces

assign()

• assign(receiving_func, assigning_func)

Assign one function to another

Arguments
receiving_func (Function)

The recieving function

assigning_func (Function)

The assigning function

• assign(receiving_func, assigning_funcs)

Assign several functions to sub functions of a mixed receiving function

Arguments
receiving_func (Function)

The recieving mixed function

assigning_funcs (std::vector<boost::shared_ptr<Function> >)

The assigning functions

• assign(receiving_funcs, assigning_func)

Assign sub functions of a single mixed function to single receiving functions

Arguments
receiving_funcs (std::vector<boost::shared_ptr<Function> >)

The recieving functions

assigning_func (Function)

The assigning mixed function

num_assigning_functions()

Return the number of assiging functions

num_receiving_functions()

Return the number of receiving functions

thisown

The membership flag