using BlockType =
typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType;
- BlockLinearOperator<Range, Domain, BlockPayload> return_op(
- BlockPayload(block_matrix, block_matrix));
+ BlockLinearOperator<Range, Domain, BlockPayload> return_op{
+ BlockPayload(block_matrix, block_matrix)};
return_op.n_block_rows = [&block_matrix]() -> unsigned int {
return block_matrix.n_block_rows();
using BlockType =
typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType;
- BlockLinearOperator<Range, Domain, BlockPayload> return_op(
- (BlockPayload())); // TODO: Create block payload so that this can be
- // initialized correctly
+ // TODO: Create block payload so that this can be initialized correctly
+ BlockLinearOperator<Range, Domain, BlockPayload> return_op{BlockPayload()};
return_op.n_block_rows = []() -> unsigned int { return m; };
using BlockType =
typename BlockLinearOperator<Range, Domain, BlockPayload>::BlockType;
- BlockLinearOperator<Range, Domain, BlockPayload> return_op(
- BlockPayload(block_matrix, block_matrix));
+ BlockLinearOperator<Range, Domain, BlockPayload> return_op{
+ BlockPayload(block_matrix, block_matrix)};
return_op.n_block_rows = [&block_matrix]() -> unsigned int {
return block_matrix.n_block_rows();
const BlockLinearOperator<Range, Domain, BlockPayload> &block_operator,
const BlockLinearOperator<Domain, Range, BlockPayload> &diagonal_inverse)
{
- LinearOperator<Range, Range, typename BlockPayload::BlockType> return_op(
- (typename BlockPayload::BlockType(diagonal_inverse)));
+ LinearOperator<Range, Range, typename BlockPayload::BlockType> return_op{
+ typename BlockPayload::BlockType(diagonal_inverse)};
return_op.reinit_range_vector = diagonal_inverse.reinit_range_vector;
return_op.reinit_domain_vector = diagonal_inverse.reinit_domain_vector;
const BlockLinearOperator<Range, Domain, BlockPayload> &block_operator,
const BlockLinearOperator<Domain, Range, BlockPayload> &diagonal_inverse)
{
- LinearOperator<Range, Range, typename BlockPayload::BlockType> return_op(
- (typename BlockPayload::BlockType(diagonal_inverse)));
+ LinearOperator<Range, Range, typename BlockPayload::BlockType> return_op{
+ typename BlockPayload::BlockType(diagonal_inverse)};
return_op.reinit_range_vector = diagonal_inverse.reinit_range_vector;
return_op.reinit_domain_vector = diagonal_inverse.reinit_domain_vector;
}
else
{
- LinearOperator<Range, Domain, Payload> return_op(
+ LinearOperator<Range, Domain, Payload> return_op{
static_cast<const Payload &>(first_op) +
- static_cast<const Payload &>(second_op));
+ static_cast<const Payload &>(second_op)};
return_op.reinit_range_vector = first_op.reinit_range_vector;
return_op.reinit_domain_vector = first_op.reinit_domain_vector;
}
else
{
- LinearOperator<Range, Domain, Payload> return_op(
+ LinearOperator<Range, Domain, Payload> return_op{
static_cast<const Payload &>(first_op) *
- static_cast<const Payload &>(second_op));
+ static_cast<const Payload &>(second_op)};
return_op.reinit_domain_vector = second_op.reinit_domain_vector;
return_op.reinit_range_vector = first_op.reinit_range_vector;
LinearOperator<Domain, Range, Payload>
transpose_operator(const LinearOperator<Range, Domain, Payload> &op)
{
- LinearOperator<Domain, Range, Payload> return_op(op.transpose_payload());
+ LinearOperator<Domain, Range, Payload> return_op{op.transpose_payload()};
return_op.reinit_range_vector = op.reinit_domain_vector;
return_op.reinit_domain_vector = op.reinit_range_vector;
Solver & solver,
const Preconditioner & preconditioner)
{
- LinearOperator<Domain, Range, Payload> return_op(
- op.inverse_payload(solver, preconditioner));
+ LinearOperator<Domain, Range, Payload> return_op{
+ op.inverse_payload(solver, preconditioner)};
return_op.reinit_range_vector = op.reinit_domain_vector;
return_op.reinit_domain_vector = op.reinit_range_vector;
Solver & solver,
const LinearOperator<Range, Domain, Payload> &preconditioner)
{
- LinearOperator<Domain, Range, Payload> return_op(
- op.inverse_payload(solver, preconditioner));
+ LinearOperator<Domain, Range, Payload> return_op{
+ op.inverse_payload(solver, preconditioner)};
return_op.reinit_range_vector = op.reinit_domain_vector;
return_op.reinit_domain_vector = op.reinit_range_vector;
LinearOperator<Range, Range, Payload>
identity_operator(const std::function<void(Range &, bool)> &reinit_vector)
{
- LinearOperator<Range, Range, Payload> return_op((Payload()));
+ LinearOperator<Range, Range, Payload> return_op{Payload()};
return_op.reinit_range_vector = reinit_vector;
return_op.reinit_domain_vector = reinit_vector;
LinearOperator<Range, Domain, Payload>
null_operator(const LinearOperator<Range, Domain, Payload> &op)
{
- LinearOperator<Range, Domain, Payload> return_op(op.null_payload());
+ LinearOperator<Range, Domain, Payload> return_op{op.null_payload()};
return_op.is_null_operator = true;
LinearOperator<Range, Range, Payload>
mean_value_filter(const std::function<void(Range &, bool)> &reinit_vector)
{
- LinearOperator<Range, Range, Payload> return_op((Payload()));
+ LinearOperator<Range, Range, Payload> return_op{Payload()};
return_op.reinit_range_vector = reinit_vector;
return_op.reinit_domain_vector = reinit_vector;
{
using namespace internal::LinearOperatorImplementation;
// Initialize the payload based on the input exemplar matrix
- LinearOperator<Range, Domain, Payload> return_op(
- Payload(operator_exemplar, matrix));
+ LinearOperator<Range, Domain, Payload> return_op{
+ Payload(operator_exemplar, matrix)};
// Always store a reference to matrix and operator_exemplar in the lambda
// functions. This ensures that a modification of the matrix after the