Conversation
|
Anasazi is merged. You can rebase. |
| }; | ||
|
|
||
| template <typename VectorType> | ||
| class OperatorBase |
There was a problem hiding this comment.
I don't really think that we need this new class but if you really want to add it at least make Operator derive from OperatorBase.
| size_type m() const { return _dof_handler.n_dofs(); } | ||
| double diag_element(const size_type i) const | ||
| { | ||
| auto x = _mesh_evaluator.matrix_free_get_agglomerate_diagonal(_dof_handler, |
There was a problem hiding this comment.
This is not a cheap operation. Can't you just get the whole vector at once.
| */ | ||
| dealii::AffineConstraints<double> &_constraints; | ||
| }; | ||
| }; // namespace mfmg |
There was a problem hiding this comment.
Looks like there is a problem in the number of parenthesis.
| { | ||
|
|
||
| template <typename VectorType> | ||
| class DiagonalOperator : public OperatorBase<VectorType> |
| { | ||
| _diag.resize(diag.size()); | ||
| std::transform(diag.begin(), diag.end(), _diag.begin(), | ||
| [](auto v) { return (v ? 1. / v : 0.); }); |
There was a problem hiding this comment.
You could have added a function for the inverse of the diagonal directly similar to https://github.com/ORNL-CEES/mfmg/blob/master/tests/test_hierarchy_helpers.hpp#L345 This way you also get a DiagonalMatrix right away.
Any explanation what this pull request does at all? |
Will rebase on
masteronce Anasazi is merged. All relevant changes are in the last commit.