Fluid structure interaction suite
dealii Namespace Reference

Namespaces

 NonMatching
 
 Patterns
 

Functions

template<typename Range , typename Domain , typename Payload = internal::LinearOperatorImplementation::EmptyPayload>
LinearOperator< Range, Domain, Payload > projection_operator (const Range &range_exemplar, const std::vector< std::reference_wrapper< const Domain >> &local_basis, const Domain *domain_exemplar=nullptr, const Payload &payload=Payload())
 Construct a LinearOperator object that projects a vector onto a basis. More...
 

Function Documentation

◆ projection_operator()

template<typename Range , typename Domain , typename Payload = internal::LinearOperatorImplementation::EmptyPayload>
LinearOperator<Range, Domain, Payload> dealii::projection_operator ( const Range &  range_exemplar,
const std::vector< std::reference_wrapper< const Domain >> &  local_basis,
const Domain *  domain_exemplar = nullptr,
const Payload &  payload = Payload() 
)

Construct a LinearOperator object that projects a vector onto a basis.

This function can be used to perform model order reduction, i.e. to project a large dimensional vector onto a smaller dimensional subspace. A typical usage of this class is the following:

// Build a reduced vector space, i.e., a VectorType (either serial or
// parallel) that is an element of the Range space of the LinearOperator
VectorType exemplar_range(...);
// Initialize a vector of references to the locally owned basis vectors
// onto which we want to project.
std::vector<std::reference_wrapper<VectorType>> basis(...);
P = projection_operator(exemplar_range, basis);
// Project a vector onto the reduced space
VectorType elements = P * v;
// If the basis was orthogonal, then we could compute an orthogonal
// projection of v onto the subspace identified by the basis as
VectorType v_reduced = Pt * v;
// The above could also be achieved with the following:
VectorType v_reduced = (Pt*P) * v;
// If we want to project an operator A onto the reduced space, we could do
// the following:
auto A_reduced = Pt*A*P;
LinearOperator< Domain, Range, Payload > transpose_operator(const LinearOperator< Range, Domain, Payload > &op)
LinearOperator< Range, Domain, Payload > projection_operator(const Range &range_exemplar, const std::vector< std::reference_wrapper< const Domain >> &local_basis, const Domain *domain_exemplar=nullptr, const Payload &payload=Payload())
Construct a LinearOperator object that projects a vector onto a basis.
Parameters
range_exemplarAn exmeplar vector of the range space. We'll make a few copies of this vector to allow the operator to be used with intermediate storage.
local_basisA vector of references to the locally owned basis vectors. These vectors must be ordered according to the IndexSet Range::locally_owned_elements() of the range space.
domain_exemplarIf used in parallel, it may happen that some processes do not own any index of the Range space. In this case, you need to provide a pointer to a Domain vector to be used as an exemplar vector.
Returns
LinearOperator<Range, Domain, Payload>

Definition at line 77 of file projection_operator.h.

References VectorOperation::add, Assert, AssertDimension, StandardExceptions::ExcMessage(), and TrilinosWrappers::linear_operator().

Referenced by PDEs::Serial::ReducedLagrange< dim, spacedim >::solve().