Skip to content
Snippets Groups Projects

init public members with nullptr for more meaningful fault messages if not set

Merged podlesny requested to merge fix/ProjectedBlockGSStep/init-public-members into master
2 files
+ 6
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -5,6 +5,8 @@ template<class MatrixType, class VectorType>
@@ -5,6 +5,8 @@ template<class MatrixType, class VectorType>
inline
inline
void ProjectedBlockGSStep<MatrixType, VectorType>::iterate()
void ProjectedBlockGSStep<MatrixType, VectorType>::iterate()
{
{
 
assert(hasObstacle_!=nullptr);
 
if (hasObstacle_->size()!= (unsigned int)this->x_->size())
if (hasObstacle_->size()!= (unsigned int)this->x_->size())
DUNE_THROW(SolverError, "Size of hasObstacle (" << hasObstacle_->size()
DUNE_THROW(SolverError, "Size of hasObstacle (" << hasObstacle_->size()
<< ") doesn't match solution vector (" << this->x_->size() << ")");
<< ") doesn't match solution vector (" << this->x_->size() << ")");
@@ -46,6 +48,8 @@ void ProjectedBlockGSStep<MatrixType, VectorType>::iterate()
@@ -46,6 +48,8 @@ void ProjectedBlockGSStep<MatrixType, VectorType>::iterate()
// Solve the local constraint minimization problem
// Solve the local constraint minimization problem
// We use a projected Gauss-Seidel, for lack of anything better
// We use a projected Gauss-Seidel, for lack of anything better
 
assert(obstacles_!=nullptr);
 
Obstacle defectObstacle = (*obstacles_)[i];
Obstacle defectObstacle = (*obstacles_)[i];
defectObstacle -= x;
defectObstacle -= x;
Loading