Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::SumOp< Backend, Op1, Op2 > Class Template Reference

The sum Op := op1 + op2 of two operators sharing a domain and range.

#include <linear_ops.hpp>

Classes

struct  Workspace

Public Types

using backend_t = Backend
using op1_storage_t = ::mundy::storage<Op1>
using op2_storage_t = ::mundy::storage<Op2>

Public Member Functions

 SumOp (backend_t, Op1 &&op1, Op2 &&op2)
Backend backend () const
const auto & op1 () const
const auto & op2 () const
size_t domain_size () const
size_t range_size () const
auto make_domain_vector () const
auto make_range_vector () const
auto make_workspace (bool committed=false) const
template<class TmpVector, class Op1Workspace, class Op2Workspace>
auto make_workspace (TmpVector &&tmp, Op1Workspace &&op1_workspace, Op2Workspace &&op2_workspace, bool committed=false) const
template<class XVector, class YVector, class WorkspaceType>
void apply (const XVector &x, YVector &y, WorkspaceType &workspace) const
template<class XVector, class YVector>
void apply (const XVector &x, YVector &y) const

Member Typedef Documentation

◆ backend_t

template<class Backend, class Op1, class Op2>
using mundy::SumOp< Backend, Op1, Op2 >::backend_t = Backend

◆ op1_storage_t

template<class Backend, class Op1, class Op2>
using mundy::SumOp< Backend, Op1, Op2 >::op1_storage_t = ::mundy::storage<Op1>

◆ op2_storage_t

template<class Backend, class Op1, class Op2>
using mundy::SumOp< Backend, Op1, Op2 >::op2_storage_t = ::mundy::storage<Op2>

Constructor & Destructor Documentation

◆ SumOp()

template<class Backend, class Op1, class Op2>
mundy::SumOp< Backend, Op1, Op2 >::SumOp ( backend_t ,
Op1 && op1,
Op2 && op2 )
inline

Member Function Documentation

◆ backend()

template<class Backend, class Op1, class Op2>
Backend mundy::SumOp< Backend, Op1, Op2 >::backend ( ) const
inline

◆ op1()

template<class Backend, class Op1, class Op2>
const auto & mundy::SumOp< Backend, Op1, Op2 >::op1 ( ) const
inline

◆ op2()

template<class Backend, class Op1, class Op2>
const auto & mundy::SumOp< Backend, Op1, Op2 >::op2 ( ) const
inline

◆ domain_size()

template<class Backend, class Op1, class Op2>
size_t mundy::SumOp< Backend, Op1, Op2 >::domain_size ( ) const
inline

◆ range_size()

template<class Backend, class Op1, class Op2>
size_t mundy::SumOp< Backend, Op1, Op2 >::range_size ( ) const
inline

◆ make_domain_vector()

template<class Backend, class Op1, class Op2>
auto mundy::SumOp< Backend, Op1, Op2 >::make_domain_vector ( ) const
inline

◆ make_range_vector()

template<class Backend, class Op1, class Op2>
auto mundy::SumOp< Backend, Op1, Op2 >::make_range_vector ( ) const
inline

◆ make_workspace() [1/2]

template<class Backend, class Op1, class Op2>
auto mundy::SumOp< Backend, Op1, Op2 >::make_workspace ( bool committed = false) const
inline

◆ make_workspace() [2/2]

template<class Backend, class Op1, class Op2>
template<class TmpVector, class Op1Workspace, class Op2Workspace>
auto mundy::SumOp< Backend, Op1, Op2 >::make_workspace ( TmpVector && tmp,
Op1Workspace && op1_workspace,
Op2Workspace && op2_workspace,
bool committed = false ) const
inline

◆ apply() [1/2]

template<class Backend, class Op1, class Op2>
template<class XVector, class YVector, class WorkspaceType>
void mundy::SumOp< Backend, Op1, Op2 >::apply ( const XVector & x,
YVector & y,
WorkspaceType & workspace ) const
inline

◆ apply() [2/2]

template<class Backend, class Op1, class Op2>
template<class XVector, class YVector>
void mundy::SumOp< Backend, Op1, Op2 >::apply ( const XVector & x,
YVector & y ) const
inline