Medusa  1.1
Coordinate Free Mehless Method implementation
mm::ImplicitVectorOperators< shape_storage_type, matrix_type, rhs_type >::RowVecOp Class Reference

Detailed Description

template<class shape_storage_type, class matrix_type, class rhs_type>
class mm::ImplicitVectorOperators< shape_storage_type, matrix_type, rhs_type >::RowVecOp

Class representing an operation on a specific set of rows of the matrix.

If N is the number of nodes in the domain, then this class represents an operation on rows row, row+N, ..., row+(dim-1)*N. This row operations can be summed (with no effect) and assigned to, which sets the right hand side. They enable a syntax like op.lap(i) + 2*op.grad(i, {1, 2}) = 2.3.

Definition at line 92 of file ImplicitVectorOperators_fwd.hpp.

+ Collaboration diagram for mm::ImplicitVectorOperators< shape_storage_type, matrix_type, rhs_type >::RowVecOp:

Public Member Functions

RowVecOp operator+ (const RowVecOp &other) const
 Add two row operations together. More...
 
template<typename derived_t >
RowVecOp operator+ (const VecOpBase< derived_t > &right)
 Add normal operation to a row operation by evaluating the former and adding normally. More...
 
void operator= (const vector_t &value)
 Assigns given value to the right hand side. More...
 

Friends

class ImplicitVectorOperators
 

Protected Member Functions

 RowVecOp (ImplicitVectorOperators &op, int row)
 Construct a row operation for a given row. More...
 
int row () const
 Return absolute index of this row operation. More...
 

Protected Attributes

ImplicitVectorOperators & op
 Reference to underlying operators. More...
 
int row_
 Index of the row to which this operation refers. More...
 

Constructor & Destructor Documentation

◆ RowVecOp()

template<class shape_storage_type , class matrix_type , class rhs_type >
mm::ImplicitVectorOperators< shape_storage_type, matrix_type, rhs_type >::RowVecOp::RowVecOp ( ImplicitVectorOperators &  op,
int  row 
)
inlineprotected

Construct a row operation for a given row.

Definition at line 98 of file ImplicitVectorOperators_fwd.hpp.

Member Function Documentation

◆ operator+() [1/2]

template<class shape_storage_type , class matrix_type , class rhs_type >
RowVecOp mm::ImplicitVectorOperators< shape_storage_type, matrix_type, rhs_type >::RowVecOp::operator+ ( const RowVecOp &  other) const
inline

Add two row operations together.

This does nothing except for checking that both operations refer to the same actual matrix row, catching some programming errors.

Exceptions
Assertionfails if *this and other do not refer to the same matrix row.

Definition at line 108 of file ImplicitVectorOperators_fwd.hpp.

◆ operator+() [2/2]

template<class shape_storage_type , class matrix_type , class rhs_type >
template<typename derived_t >
RowVecOp mm::ImplicitVectorOperators< shape_storage_type, matrix_type, rhs_type >::RowVecOp::operator+ ( const VecOpBase< derived_t > &  right)
inline

Add normal operation to a row operation by evaluating the former and adding normally.

Definition at line 116 of file ImplicitVectorOperators_fwd.hpp.

◆ operator=()

template<class shape_storage_type , class matrix_type , class rhs_type >
void mm::ImplicitVectorOperators< shape_storage_type, matrix_type, rhs_type >::RowVecOp::operator= ( const vector_t &  value)
inline

Assigns given value to the right hand side.

Definition at line 118 of file ImplicitVectorOperators_fwd.hpp.

◆ row()

template<class shape_storage_type , class matrix_type , class rhs_type >
int mm::ImplicitVectorOperators< shape_storage_type, matrix_type, rhs_type >::RowVecOp::row ( ) const
inlineprotected

Return absolute index of this row operation.

Definition at line 100 of file ImplicitVectorOperators_fwd.hpp.

Member Data Documentation

◆ op

template<class shape_storage_type , class matrix_type , class rhs_type >
ImplicitVectorOperators& mm::ImplicitVectorOperators< shape_storage_type, matrix_type, rhs_type >::RowVecOp::op
protected

Reference to underlying operators.

Definition at line 95 of file ImplicitVectorOperators_fwd.hpp.

◆ row_

template<class shape_storage_type , class matrix_type , class rhs_type >
int mm::ImplicitVectorOperators< shape_storage_type, matrix_type, rhs_type >::RowVecOp::row_
protected

Index of the row to which this operation refers.

Row offset is not included.

Definition at line 96 of file ImplicitVectorOperators_fwd.hpp.


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