Code owners
Assign users and groups as approvers for specific file changes. Learn more.
projectedblockgsstep.hh 1.12 KiB
// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=8 sw=4 sts=4:
#ifndef DUNE_PROJECTED_BLOCK_GAUSS_SEIDEL_STEP_HH
#define DUNE_PROJECTED_BLOCK_GAUSS_SEIDEL_STEP_HH
#include <vector>
#include "blockgsstep.hh"
#include <dune/solvers/common/boxconstraint.hh>
template<class MatrixType, class VectorType>
class ProjectedBlockGSStep : public BlockGSStep<MatrixType, VectorType>
{
using VectorBlock = typename VectorType::block_type;
using Field = typename VectorType::field_type;
enum {BlockSize = VectorBlock::dimension};
public:
//! Default constructor. Doesn't init anything
ProjectedBlockGSStep() {}
//! Constructor with a linear problem
ProjectedBlockGSStep(const MatrixType& mat, VectorType& x, const VectorType& rhs)
: BlockGSStep<MatrixType,VectorType>(mat, x, rhs)
{}
//! Perform one iteration
virtual void iterate();
using HasObstacle = Dune::BitSetVector<BlockSize>;
using Obstacle = BoxConstraint<Field, BlockSize>;
const HasObstacle* hasObstacle_;
const std::vector<Obstacle>* obstacles_;
};
#include "projectedblockgsstep.cc"
#endif