// $Id$
// Version: $Name$
//
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
const bool /* matrix_is_symmetric */) const
{
GrowingVectorMemory<VECTOR> mem;
- VECTOR* tmp_vector = mem.alloc();
+ typename VectorMemory<VECTOR>::Pointer tmp_vector(mem);
tmp_vector->reinit(v);
const_index_value_iterator i = constraints.begin();
const const_index_value_iterator e = constraints.end();
for (; i!=e; ++i)
- (*tmp_vector)(i->first) = -i->second;
+ {
+ Assert(numbers::is_finite(i->second), ExcNumberNotFinite());
+ (*tmp_vector)(i->first) = -i->second;
+ }
// This vmult is without bc, to get
// the rhs correction in a correct
// way.
matrix->vmult_add(v, *tmp_vector);
- mem.free(tmp_vector);
// finally set constrained
// entries themselves
for (i=constraints.begin(); i!=e; ++i)
- v(i->first) = i->second;
+ {
+ Assert(numbers::is_finite(i->second), ExcNumberNotFinite());
+ v(i->first) = i->second;
+ }
}
const_index_value_iterator i = constraints.begin();
const const_index_value_iterator e = constraints.end();
for (; i!=e; ++i)
- out(i->first) = in(i->first);
+ {
+ Assert(numbers::is_finite(in(i->first)), ExcNumberNotFinite());
+ out(i->first) = in(i->first);
+ }
}
// divide by diagonal element
*dst_ptr -= s * om;
+ Assert(val[*rowstart_ptr]!= 0., ExcDivideByZero());
*dst_ptr /= val[*rowstart_ptr];
};
s += val[j] * dst(cols->colnums[j]);
*dst_ptr -= s * om;
+ Assert(val[*rowstart_ptr]!= 0., ExcDivideByZero());
*dst_ptr /= val[*rowstart_ptr];
};
return;
// divide by diagonal element
*dst_ptr -= s * om;
+ Assert(val[*rowstart_ptr]!= 0., ExcDivideByZero());
*dst_ptr /= val[*rowstart_ptr];
};
for (unsigned int j=first_right_of_diagonal_index; j<end_row; ++j)
s += val[j] * dst(cols->colnums[j]);
*dst_ptr -= s * om;
+ Assert(val[*rowstart_ptr]!= 0., ExcDivideByZero());
*dst_ptr /= val[*rowstart_ptr];
};
}
if (col < row)
s -= val[j] * dst(col);
}
-
+
+ Assert(val[cols->rowstart[row]]!= 0., ExcDivideByZero());
dst(row) = s * om / val[cols->rowstart[row]];
}
}
if (cols->colnums[j] > row)
s -= val[j] * dst(cols->colnums[j]);
+ Assert(val[cols->rowstart[row]]!= 0., ExcDivideByZero());
dst(row) = s * om / val[cols->rowstart[row]];
if (row == 0)
}
}
+ Assert(val[cols->rowstart[row]]!= 0., ExcDivideByZero());
dst(row) = s * om / val[cols->rowstart[row]];
}
}
s -= val[j] * dst(col);
}
+ Assert(val[cols->rowstart[row]]!= 0., ExcDivideByZero());
dst(row) = s * om / val[cols->rowstart[row]];
}
}
{
s -= val[j] * v(cols->colnums[j]);
}
+ Assert(val[cols->rowstart[row]]!= 0., ExcDivideByZero());
v(row) += s * om / val[cols->rowstart[row]];
}
}
{
s -= val[j] * v(cols->colnums[j]);
}
+ Assert(val[cols->rowstart[row]]!= 0., ExcDivideByZero());
v(row) += s * om / val[cols->rowstart[row]];
}
}
}
}
dst(i) -= s * om;
+ Assert(val[cols->rowstart[i]]!= 0., ExcDivideByZero());
dst(i) /= val[cols->rowstart[i]];
}
if (static_cast<unsigned int>(i)<j) s += val[j] * dst(p);
}
}
+ Assert(val[cols->rowstart[i]]!= 0., ExcDivideByZero());
dst(i) -= s * om / val[cols->rowstart[i]];
}
}