Loading...
Searching...
No Matches
dolfin::FunctionAssigner Class Reference

`#include <FunctionAssigner.h>`

## Public Member Functions

| FunctionAssigner (std::shared_ptr< const FunctionSpace > receiving_space, std::shared_ptr< const FunctionSpace > assigning_space)
| FunctionAssigner (std::vector< std::shared_ptr< const FunctionSpace > > receiving_spaces, std::shared_ptr< const FunctionSpace > assigning_space)
| FunctionAssigner (std::shared_ptr< const FunctionSpace > receiving_space, std::vector< std::shared_ptr< const FunctionSpace > > assigning_spaces)
void | assign (std::shared_ptr< Function > receiving_func, std::shared_ptr< const Function > assigning_func) const
void | assign (std::shared_ptr< Function > receiving_func, std::vector< std::shared_ptr< const Function > > assigning_funcs) const
void | assign (std::vector< std::shared_ptr< Function > > receiving_funcs, std::shared_ptr< const Function > assigning_func) const
| ~FunctionAssigner ()
| Destructor.
std::size_t | num_assigning_functions () const
| Return the number of assigning functions.
std::size_t | num_receiving_functions () const
| Return the number of receiving functions.

## Detailed Description

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.

## Constructor & Destructor Documentation

## FunctionAssigner() [1/3]

FunctionAssigner::FunctionAssigner | ( | std::shared_ptr< const FunctionSpace > | receiving_space,
|  | std::shared_ptr< const FunctionSpace > | 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() [2/3]

FunctionAssigner::FunctionAssigner | ( | std::vector< std::shared_ptr< const FunctionSpace > > | receiving_spaces,
|  | std::shared_ptr< const FunctionSpace > | 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 (std::vector<FunctionSpace>) The receiving function spaces assigning_space (FunctionSpace) The assigning function space

## FunctionAssigner() [3/3]

FunctionAssigner::FunctionAssigner | ( | std::shared_ptr< const FunctionSpace > | receiving_space,
|  | std::vector< std::shared_ptr< const FunctionSpace > > | 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 (std::shared_ptr<FunctionSpace>) The receiving function space assigning_spaces (std::vector<std::shared_ptr<FunctionSpace> >) The assigning function spaces

## Member Function Documentation

## assign() [1/3]

void FunctionAssigner::assign | ( | std::shared_ptr< Function > | receiving_func,
|  | std::shared_ptr< const Function > | assigning_func ) const

Assign one function to another

Arguments receiving_func (std::shared_ptr<Function>) The receiving function assigning_func (std::shared_ptr<Function>) The assigning function

## assign() [2/3]

void FunctionAssigner::assign | ( | std::shared_ptr< Function > | receiving_func,
|  | std::vector< std::shared_ptr< const Function > > | assigning_funcs ) const

Assign several functions to sub functions of a mixed receiving function

Arguments receiving_func (std::shared_ptr<Function>) The receiving mixed function assigning_funcs (std::vector<std::shared_ptr<Function> >) The assigning functions

## assign() [3/3]

void FunctionAssigner::assign | ( | std::vector< std::shared_ptr< Function > > | receiving_funcs,
|  | std::shared_ptr< const Function > | assigning_func ) const

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

Arguments receiving_funcs (std::vector<std::shared_ptr<Function> >) The receiving functions assigning_func (std::shared_ptr<Function>) The assigning mixed function

The documentation for this class was generated from the following files:

- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/function/FunctionAssigner.h
- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/function/FunctionAssigner.cpp