|
BEM++
2.0
|
Discrete boundary operator composed of multiple blocks stored separately. More...
#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/assembly/discrete_blocked_boundary_operator.hpp>
Public Types | |
|
typedef DiscreteBoundaryOperator < ValueType > | Base |
Public Member Functions | |
| DiscreteBlockedBoundaryOperator (const Fiber::_2dArray< shared_ptr< const Base > > &blocks, const std::vector< size_t > &rowCounts, const std::vector< size_t > &columnCounts) | |
| Constructor. More... | |
| virtual unsigned int | rowCount () const |
| Number of rows of the operator. | |
| virtual unsigned int | columnCount () const |
| Number of columns of the operator. | |
|
virtual shared_ptr< const DiscreteBoundaryOperator < ValueType > > | getComponent (int row, int col) const |
| return the block component at position (i,j) in the block operator matrix. | |
| virtual void | addBlock (const std::vector< int > &rows, const std::vector< int > &cols, const ValueType alpha, arma::Mat< ValueType > &block) const |
| Add a subblock of this operator to a matrix. More... | |
| shared_ptr< const DiscreteBlockedBoundaryOperator < ValueType > > | asDiscreteAcaBlockedBoundaryOperator (double eps=-1, int maximumRank=-1) const |
| Return a new DiscreteBlockedBoundaryOperator, in which every component is castable to a DiscreteAcaBoundaryOperator. More... | |
| virtual shared_ptr< const DiscreteBoundaryOperator < ValueType > > | asDiscreteAcaBoundaryOperator (double eps=-1, int maximumRank=-1, bool interleave=false) const |
| Return a representation that can be cast to a DiscreteAcaBoundaryOperator. More... | |
|
virtual Teuchos::RCP< const Thyra::VectorSpaceBase < ValueType > > | domain () const |
|
virtual Teuchos::RCP< const Thyra::VectorSpaceBase < ValueType > > | range () const |
Public Member Functions inherited from Bempp::DiscreteBoundaryOperator< ValueType > | |
| virtual | ~DiscreteBoundaryOperator () |
| Destructor. | |
| void | apply (const Thyra::EOpTransp M_trans, const Thyra::MultiVectorBase< ValueType > &x_in, const Thyra::Ptr< Thyra::MultiVectorBase< ValueType > > &y_inout, const ValueType alpha, const ValueType beta) const |
| Apply the linear operator to a multivector. More... | |
| void | apply (const TranspositionMode trans, const arma::Mat< ValueType > &x_in, arma::Mat< ValueType > &y_inout, const ValueType alpha, const ValueType beta) const |
| Apply the operator to a vector. More... | |
| virtual void | dump () const |
| Write a textual representation of the operator to standard output. More... | |
| virtual arma::Mat< ValueType > | asMatrix () const |
| Matrix representation of the operator. More... | |
Protected Member Functions | |
| virtual bool | opSupportedImpl (Thyra::EOpTransp M_trans) const |
Protected Member Functions inherited from Bempp::DiscreteBoundaryOperator< ValueType > | |
| virtual void | applyImpl (const Thyra::EOpTransp M_trans, const Thyra::MultiVectorBase< ValueType > &X_in, const Teuchos::Ptr< Thyra::MultiVectorBase< ValueType > > &Y_inout, const ValueType alpha, const ValueType beta) const |
Private Member Functions | |
| virtual void | applyBuiltInImpl (const TranspositionMode trans, const arma::Col< ValueType > &x_in, arma::Col< ValueType > &y_inout, const ValueType alpha, const ValueType beta) const |
| void | mergeHMatrices (unsigned currentLevel, const std::vector< Fiber::_2dArray< unsigned > > &rowSonSizes, const std::vector< Fiber::_2dArray< unsigned > > &colSonSizes, const Fiber::_2dArray< const blcluster * > clusters, const Fiber::_2dArray< size_t > indexOffsets, blcluster *result) const |
Additional Inherited Members | |
Related Functions inherited from Bempp::DiscreteBoundaryOperator< ValueType > | |
| template<typename ValueType > | |
| shared_ptr< const DiscreteBoundaryOperator < ValueType > > | operator+ (const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op) |
| Unary plus: return a copy of the argument. | |
| template<typename ValueType > | |
| shared_ptr< const DiscreteBoundaryOperator < ValueType > > | operator- (const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op) |
| Return a shared pointer to a DiscreteBoundaryOperator representing the operand multiplied by -1. More... | |
| template<typename ValueType > | |
| shared_ptr < DiscreteBoundaryOperator < ValueType > > | operator+ (const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op1, const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op2) |
| Return a shared pointer to a DiscreteBoundaryOperator representing the sum of the operands. More... | |
| template<typename ValueType > | |
| shared_ptr < DiscreteBoundaryOperator < ValueType > > | operator- (const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op1, const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op2) |
| Return a shared pointer to a DiscreteBoundaryOperator representing the difference of the operands. More... | |
| template<typename ValueType , typename ScalarType > | |
| boost::enable_if< typename boost::mpl::has_key < boost::mpl::set< float, double, std::complex< float > , std::complex< double > >, ScalarType >, shared_ptr < DiscreteBoundaryOperator < ValueType > > >::type | operator* (ScalarType scalar, const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op) |
Return a shared pointer to a DiscreteBoundaryOperator representing the operator *op multiplied by scalar. More... | |
| template<typename ValueType , typename ScalarType > | |
| boost::enable_if< typename boost::mpl::has_key < boost::mpl::set< float, double, std::complex< float > , std::complex< double > >, ScalarType >, shared_ptr < DiscreteBoundaryOperator < ValueType > > >::type | operator* (const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op, ScalarType scalar) |
Return a shared pointer to a DiscreteBoundaryOperator representing the operator *op multiplied by scalar. More... | |
| template<typename ValueType > | |
| shared_ptr < DiscreteBoundaryOperator < ValueType > > | operator* (const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op1, const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op2) |
Return a shared pointer to a DiscreteBoundaryOperator representing a composition of operators, (*op1) * (*op2). More... | |
| template<typename ValueType > | |
| shared_ptr < DiscreteBoundaryOperator < ValueType > > | mul (const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op1, const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op2) |
Return a shared pointer to a DiscreteBoundaryOperator representing a composition of operators, (*op1) * (*op2). More... | |
| template<typename ValueType , typename ScalarType > | |
| shared_ptr < DiscreteBoundaryOperator < ValueType > > | operator/ (const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op, ScalarType scalar) |
Return a shared pointer to a DiscreteBoundaryOperator representing the operator *op divided by scalar. More... | |
| template<typename ValueType > | |
| shared_ptr < DiscreteBoundaryOperator < ValueType > > | transpose (const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op) |
Return a shared pointer to a DiscreteBoundaryOperator representing the transposed operator *op. More... | |
| template<typename ValueType > | |
| shared_ptr < DiscreteBoundaryOperator < ValueType > > | conjugate (const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op) |
Return a shared pointer to a DiscreteBoundaryOperator representing the conjugated operator *op. More... | |
| template<typename ValueType > | |
| shared_ptr < DiscreteBoundaryOperator < ValueType > > | conjugateTranspose (const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op) |
Return a shared pointer to a DiscreteBoundaryOperator representing the conjugate-transposed operator *op. More... | |
| template<typename ValueType > | |
| shared_ptr < DiscreteBoundaryOperator < ValueType > > | transpose (TranspositionMode trans, const shared_ptr< const DiscreteBoundaryOperator< ValueType > > &op) |
Return a shared pointer to a DiscreteBoundaryOperator representing the transposed and/or conjugated (depending on the value of the argument trans) operator *op. More... | |
| template<typename RealType > | |
| shared_ptr < DiscreteBoundaryOperator < std::complex< RealType > > > | complexify (const shared_ptr< const DiscreteBoundaryOperator< RealType > > &op) |
Return a shared pointer to a DiscreteBoundaryOperator representing the "complexified" operator *op. More... | |
Discrete boundary operator composed of multiple blocks stored separately.
This class represents a linear operator whose matrix
is composed of
discrete boundary operators
.
| Bempp::DiscreteBlockedBoundaryOperator< ValueType >::DiscreteBlockedBoundaryOperator | ( | const Fiber::_2dArray< shared_ptr< const Base > > & | blocks, |
| const std::vector< size_t > & | rowCounts, | ||
| const std::vector< size_t > & | columnCounts | ||
| ) |
Constructor.
| [in] | blocks | 2D array of shared pointers to the discrete boundary operators making up the newly constructed blocked operator. A null shared pointer is equivalent to a discrete boundary operator with zero matrix. |
| [in] | rowCounts | Vector whose ith element is the number of rows of the matrix of each operator in ith row of the array blocks. |
| [in] | columnCounts | Vector whose ith element is the number of columns of the matrix of each operator in ith column of the array blocks. |
References Bempp::toString().
|
virtual |
Add a subblock of this operator to a matrix.
Perform the operation block += alpha * L[rows, cols], where block is a matrix, alpha a scalar and L[rows, cols] a subblock of this discrete linear operator.
| [in] | rows | Vector of row indices. |
| [in] | cols | Vector of column indices. |
| [in] | alpha | Multiplier. |
| [in,out] | block | On entry, matrix of size (rows.size(), cols.size()). On exit, each element (i, j) of this matrix will be augmented by the element (rows[i], cols[j]) of this operator, multiplied by alpha. |
Row and column indices may be unsorted.
This method need not be supported by all subclasses. It is mainly intended for internal use during weak-form assembly.
Implements Bempp::DiscreteBoundaryOperator< ValueType >.
| shared_ptr< const DiscreteBlockedBoundaryOperator< ValueType > > Bempp::DiscreteBlockedBoundaryOperator< ValueType >::asDiscreteAcaBlockedBoundaryOperator | ( | double | eps = -1, |
| int | maximumRank = -1 |
||
| ) | const |
Return a new DiscreteBlockedBoundaryOperator, in which every component is castable to a DiscreteAcaBoundaryOperator.
This routine calls the DiscreteBoundaryOperator::asDiscreteAcaBoundaryOperator() function for each block component, which may throw a std::bad_cast exception if conversion of a block fails.
| [in] | eps | Accuracy tolerance for H-Matrix addition. |
| [in] | maximumRank | Maximum rank of blocks to be considered low rank in the case of H-Matrix addition. |
|
virtual |
Return a representation that can be cast to a DiscreteAcaBoundaryOperator.
The conversion only succeeds if all members of the DiscreteBoundaryOperator itself can be cast to a DiscreteAcaBoundaryOperator or if it is a linear combination of DiscreteOperators that can be cast to type DiscreteAcaBoundaryOperator. Operator compositions are not yet supported by this function.
| [in] | eps | The parameter controlling the accuracy of H-matrix addition in case this operation is needed to construct the H-matrix representation of the operator. If eps is negative (default), it is set to the smaller of the values of specified during the creation of the two H-matrices to be added. |
| [in] | maximumRank | Maximum rank of blocks to be considered low rank when adding two H-Matrices. If maximumRank is negative, it is set to the larger of the maximum ranks specified during the creation of the two H-matrices to be added. |
Reimplemented from Bempp::DiscreteBoundaryOperator< ValueType >.
1.8.5