G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsAdditiveOp.hpp
Go to the documentation of this file.
1
14namespace gismo
15{
16
17template<typename T>
19{
20 GISMO_ASSERT( this->rows() == input.rows(), "The dimensions do not fit." );
21
22 x.setZero( input.rows(), input.cols() );
23
24 const index_t n = m_ops.size();
25 gsMatrix<T> res_local, corr_local;
26
27 for (index_t i=0; i<n; ++i)
28 {
29 res_local.noalias() = m_transfers[i]->transpose()*input;
30 m_ops[i]->apply(res_local, corr_local);
31 x.noalias() += *(m_transfers[i])*corr_local;
32 }
33}
34
35} // namespace gismo
void apply(const gsMatrix< T > &input, gsMatrix< T > &x) const
apply the operator on the input vector and store the result in x
Definition gsAdditiveOp.hpp:18
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
#define index_t
Definition gsConfig.h:32
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
The G+Smo namespace, containing all definitions for the library.