* <tt>number</tt>. The interface is quite fat and in fact has grown every
* time a new feature was needed. So, a lot of functions are provided.
*
- * Since the instantiation of this template is quite an effort,
- * standard versions are precompiled into the library. These include
- * all combinations of <tt>float</tt> and <tt>double</tt> for matrices and
- * vectors. If you need more data types, the implementation of
- * non-inline functions is in <tt>fullmatrix.templates.h</tt>. Driver files
- * are in the source tree.
- *
* Internal calculations are usually done with the accuracy of the
* vector argument to functions. If there is no argument with a number
* type, the matrix number type is used.
*
- * @note Instantiations for this template are provided for <tt>@<float@> and
- * @<double@></tt>; others can be generated in application programs (see the
- * section on @ref Instantiations in the manual).
+ * @note Instantiations for this template are provided for
+ * <tt>@<float@>, @<double@>, @<long double@>,
+ * @<std::complex@<float@>@>, @<std::complex@<double@>@>,
+ * @<std::complex@<long double@>@></tt>; others can be generated in
+ * application programs (see the section on @ref Instantiations in the
+ * manual).
*
* @author Guido Kanschat, Franz-Theo Suttmeier, Wolfgang Bangerth, 1993-2004
*/
* way.
*/
FullMatrix<number> &
- operator = (const double d);
+ operator = (const number d);
/**
* Copy operator to create a full
* Obviously, the matrix needs to
* be quadratic for this function.
*/
- double determinant () const;
+ number determinant () const;
/**
* Return the trace of the matrix,
* Obviously, the matrix needs to
* be quadratic for this function.
*/
- double trace () const;
+ number trace () const;
/**
* Output of the matrix in
* Scale the entire matrix by a
* fixed factor.
*/
- FullMatrix & operator *= (const double factor);
+ FullMatrix & operator *= (const number factor);
/**
* Scale the entire matrix by the
* inverse of the given factor.
*/
- FullMatrix & operator /= (const double factor);
+ FullMatrix & operator /= (const number factor);
/**
* Simple addition of a scaled
*/
template<typename number2>
void add (const FullMatrix<number2> &src,
- const double factor,
+ const number factor,
const unsigned int dst_offset_i = 0,
const unsigned int dst_offset_j = 0,
const unsigned int src_offset_i = 0,
*/
template<typename number2>
void Tadd (const FullMatrix<number2> &src,
- const double factor,
+ const number factor,
const unsigned int dst_offset_i = 0,
const unsigned int dst_offset_j = 0,
const unsigned int src_offset_i = 0,
* vector.
*/
template<typename number2, typename number3>
- double residual (Vector<number2> &dst,
+ number residual (Vector<number2> &dst,
const Vector<number2> &x,
const Vector<number3> &b) const;
* Exception
*/
DeclException1 (ExcNotRegular,
- double,
+ number,
<< "The maximal pivot is " << arg1
<< ", which is below the threshold. The matrix may be singular.");
/**
template <typename number>
FullMatrix<number> &
-FullMatrix<number>::operator = (const double d)
+FullMatrix<number>::operator = (const number d)
{
Assert (d==0, ExcScalarAssignmentOnlyForZeroValue());
template <typename number>
FullMatrix<number> &
-FullMatrix<number>::operator *= (const double factor)
+FullMatrix<number>::operator *= (const number factor)
{
Assert (numbers::is_finite(factor),
template <typename number>
FullMatrix<number> &
-FullMatrix<number>::operator /= (const double factor)
+FullMatrix<number>::operator /= (const number factor)
{
Assert (numbers::is_finite(factor),
template <typename number>
template <typename number2, typename number3>
-double FullMatrix<number>::residual (Vector<number2>& dst,
+number FullMatrix<number>::residual (Vector<number2>& dst,
const Vector<number2>& src,
const Vector<number3>& right) const
{
template <typename number>
template <typename number2>
void FullMatrix<number>::add (const FullMatrix<number2> &src,
- const double factor,
+ const number factor,
const unsigned int dst_offset_i,
const unsigned int dst_offset_j,
const unsigned int src_offset_i,
template <typename number>
template <typename number2>
void FullMatrix<number>::Tadd (const FullMatrix<number2> &src,
- const double factor,
+ const number factor,
const unsigned int dst_offset_i,
const unsigned int dst_offset_j,
const unsigned int src_offset_i,
template <typename number>
-double
+number
FullMatrix<number>::determinant () const
{
Assert (!this->empty(), ExcEmptyMatrix());
template <typename number>
-double
+number
FullMatrix<number>::trace () const
{
Assert (!this->empty(), ExcEmptyMatrix());
Assert (this->n_cols() == this->n_rows(),
ExcDimensionMismatch(this->n_cols(), this->n_rows()));
- double tr = 0;
+ number tr = 0;
for (unsigned int i=0; i<this->n_rows(); ++i)
tr += this->el(i,i);
const TYPEMAT, const FullMatrix<TYPEMAT2>&,
const TYPEMAT, const FullMatrix<TYPEMAT2>&);
template void FullMatrix<TYPEMAT>::add<TYPEMAT2> (
- const FullMatrix<TYPEMAT2>&, double, unsigned, unsigned, unsigned, unsigned);
+ const FullMatrix<TYPEMAT2>&, TYPEMAT, unsigned, unsigned, unsigned, unsigned);
template void FullMatrix<TYPEMAT>::Tadd<TYPEMAT2> (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
template void FullMatrix<TYPEMAT>::Tadd<TYPEMAT2> (
- const FullMatrix<TYPEMAT2>&, double, unsigned, unsigned, unsigned, unsigned);
+ const FullMatrix<TYPEMAT2>&, TYPEMAT, unsigned, unsigned, unsigned, unsigned);
template void FullMatrix<TYPEMAT>::equ<TYPEMAT2> (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
template void FullMatrix<TYPEMAT>::equ<TYPEMAT2> (const TYPEMAT, const FullMatrix<TYPEMAT2>&,
const TYPEMAT, const FullMatrix<TYPEMAT2>&);
Vector<TYPEVEC>&, const Vector<TYPEVEC>&, bool) const;
template void FullMatrix<TYPEMAT>::Tvmult<TYPEVEC>(
Vector<TYPEVEC>&, const Vector<TYPEVEC>&, bool) const;
-template double FullMatrix<TYPEMAT>::residual<TYPEVEC>(
+template TYPEMAT FullMatrix<TYPEMAT>::residual<TYPEVEC>(
Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
template TYPEVEC FullMatrix<TYPEMAT>::matrix_norm_square<TYPEVEC> (
const Vector<TYPEVEC> &) const;
Vector<TYPEVEC>&, const Vector<TYPEVEC>&, bool) const;
template void FullMatrix<TYPEMAT>::Tvmult<TYPEVEC>(
Vector<TYPEVEC>&, const Vector<TYPEVEC>&, bool) const;
-template double FullMatrix<TYPEMAT>::residual<TYPEVEC>(
+template TYPEMAT FullMatrix<TYPEMAT>::residual<TYPEVEC>(
Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
template TYPEVEC FullMatrix<TYPEMAT>::matrix_norm_square<TYPEVEC> (
const Vector<TYPEVEC> &) const;
#undef TYPERES
#define TYPERES float
-template double FullMatrix<TYPEMAT>::residual<TYPEVEC,TYPERES>(
+template TYPEMAT FullMatrix<TYPEMAT>::residual<TYPEVEC,TYPERES>(
Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
DEAL_II_NAMESPACE_CLOSE