From 410ae2f2cc2847bbda1675355035cbc4bf67d3b8 Mon Sep 17 00:00:00 2001 From: guido Date: Fri, 30 May 2003 10:41:42 +0000 Subject: [PATCH] capitalize template arguments to avoid Vector - VECTOR clash git-svn-id: https://svn.dealii.org/trunk@7686 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/filtered_matrix.h | 66 +++++++------- .../include/lac/filtered_matrix.templates.h | 90 +++++++++---------- 2 files changed, 78 insertions(+), 78 deletions(-) diff --git a/deal.II/lac/include/lac/filtered_matrix.h b/deal.II/lac/include/lac/filtered_matrix.h index 42fc51cae4..61109da1b8 100644 --- a/deal.II/lac/include/lac/filtered_matrix.h +++ b/deal.II/lac/include/lac/filtered_matrix.h @@ -188,7 +188,7 @@ template class Vector; * * @author Wolfgang Bangerth 2001 */ -template > +template > class FilteredMatrix : public Subscriptor { public: @@ -197,7 +197,7 @@ class FilteredMatrix : public Subscriptor * analogy to the STL container * classes. */ - typedef typename Matrix::value_type value_type; + typedef typename MATRIX::value_type value_type; /** * Typedef defining a type that @@ -228,7 +228,7 @@ class FilteredMatrix : public Subscriptor * Constructor. Use the given * matrix for future operations. */ - FilteredMatrix (const Matrix &matrix); + FilteredMatrix (const MATRIX &matrix); /** * Copy operator. Take over @@ -245,14 +245,14 @@ class FilteredMatrix : public Subscriptor * function if constraits were * previously added. */ - void set_referenced_matrix (const Matrix &m); + void set_referenced_matrix (const MATRIX &m); /** * Return a reference to the * matrix that is used by this * object. */ - const Matrix & get_referenced_matrix () const; + const MATRIX & get_referenced_matrix () const; /** * Add a list of constraints to @@ -308,7 +308,7 @@ class FilteredMatrix : public Subscriptor * parameter to @p{true} to use a * faster algorithm. */ - void apply_constraints (Vector &v, + void apply_constraints (VECTOR &v, const bool matrix_is_symmetric) const; /** @@ -334,8 +334,8 @@ class FilteredMatrix : public Subscriptor * matrix is the filtered one to * which we store a reference.) */ - void vmult (Vector &dst, - const Vector &src) const; + void vmult (VECTOR &dst, + const VECTOR &src) const; /** * Matrix-vector multiplication: @@ -354,8 +354,8 @@ class FilteredMatrix : public Subscriptor * function only works for square * matrices. */ - void Tvmult (Vector &dst, - const Vector &src) const; + void Tvmult (VECTOR &dst, + const VECTOR &src) const; /** * Return the square of the norm @@ -390,7 +390,7 @@ class FilteredMatrix : public Subscriptor * have eliminated Dirichlet * boundary values. */ - value_type matrix_norm_square (const Vector &v) const; + value_type matrix_norm_square (const VECTOR &v) const; /** * Compute the residual of an @@ -415,9 +415,9 @@ class FilteredMatrix : public Subscriptor * do not contribute to the * residual at all. */ - value_type residual (Vector &dst, - const Vector &x, - const Vector &b) const; + value_type residual (VECTOR &dst, + const VECTOR &x, + const VECTOR &b) const; /** * Apply the Jacobi @@ -429,8 +429,8 @@ class FilteredMatrix : public Subscriptor * multiplies the result with the * damping factor @p{omega}. */ - void precondition_Jacobi (Vector &dst, - const Vector &src, + void precondition_Jacobi (VECTOR &dst, + const VECTOR &src, const value_type omega = 1.) const; /** @@ -480,7 +480,7 @@ class FilteredMatrix : public Subscriptor * it using the @p{SmartPointer} * class. */ - SmartPointer matrix; + SmartPointer matrix; /** * Sorted list of pairs denoting @@ -504,7 +504,7 @@ class FilteredMatrix : public Subscriptor * have to synchronise access to * this vector. */ - mutable Vector tmp_vector; + mutable VECTOR tmp_vector; /** * Mutex used to synchronise use @@ -518,7 +518,7 @@ class FilteredMatrix : public Subscriptor * that belong to constrained * degrees of freedom. */ - void pre_filter (Vector &v) const; + void pre_filter (VECTOR &v) const; /** * Do the postfiltering step, @@ -529,8 +529,8 @@ class FilteredMatrix : public Subscriptor * diagonal for these degrees of * freedom. */ - void post_filter (const Vector &in, - Vector &out) const; + void post_filter (const VECTOR &in, + VECTOR &out) const; /** * Based on the size of the @@ -557,7 +557,7 @@ class FilteredMatrix : public Subscriptor * algorithm. * * This function needs to be - * specialised for the different + * specialized for the different * matrix types. */ void get_column_entries (const unsigned int index, @@ -569,10 +569,10 @@ class FilteredMatrix : public Subscriptor /*---------------------- Inline functions -----------------------------------*/ -template +template inline bool -FilteredMatrix::PairComparison:: +FilteredMatrix::PairComparison:: operator () (const IndexValuePair &i1, const IndexValuePair &i2) const { @@ -581,10 +581,10 @@ operator () (const IndexValuePair &i1, -template +template template void -FilteredMatrix:: +FilteredMatrix:: add_constraints (const ConstraintList &new_constraints) { // add new constraints to end @@ -603,28 +603,28 @@ add_constraints (const ConstraintList &new_constraints) -template +template inline -const Matrix & -FilteredMatrix::get_referenced_matrix () const +const MATRIX & +FilteredMatrix::get_referenced_matrix () const { return *matrix; } -template +template inline -unsigned int FilteredMatrix::m () const +unsigned int FilteredMatrix::m () const { return matrix->m(); } -template +template inline -unsigned int FilteredMatrix::n () const +unsigned int FilteredMatrix::n () const { return matrix->n(); } diff --git a/deal.II/lac/include/lac/filtered_matrix.templates.h b/deal.II/lac/include/lac/filtered_matrix.templates.h index 5efb5924be..fc85475dc3 100644 --- a/deal.II/lac/include/lac/filtered_matrix.templates.h +++ b/deal.II/lac/include/lac/filtered_matrix.templates.h @@ -1,4 +1,4 @@ -//---------------------------- filtered_matrix.templates.h --------------------------- +//---------------------------------------------------------------------------- // $Id$ // Version: $Name$ // @@ -9,7 +9,7 @@ // to the file deal.II/doc/license.html for the text and // further information on this license. // -//---------------------------- filtered_matrix.templates.h --------------------------- +//---------------------------------------------------------------------------- #ifndef __deal2__filtered_matrix_templates_h #define __deal2__filtered_matrix_templates_h @@ -23,15 +23,15 @@ #include -template -FilteredMatrix:: +template +FilteredMatrix:: FilteredMatrix () {} -template -FilteredMatrix:: +template +FilteredMatrix:: FilteredMatrix (const FilteredMatrix &fm) : Subscriptor (), @@ -42,18 +42,18 @@ FilteredMatrix (const FilteredMatrix &fm) -template -FilteredMatrix:: -FilteredMatrix (const Matrix &m) +template +FilteredMatrix:: +FilteredMatrix (const MATRIX &m) { set_referenced_matrix (m); } -template -FilteredMatrix & -FilteredMatrix::operator = (const FilteredMatrix &fm) +template +FilteredMatrix & +FilteredMatrix::operator = (const FilteredMatrix &fm) { set_referenced_matrix (*fm.matrix); constraints = fm.constraints; @@ -62,10 +62,10 @@ FilteredMatrix::operator = (const FilteredMatrix &fm) -template +template void -FilteredMatrix:: -set_referenced_matrix (const Matrix &m) +FilteredMatrix:: +set_referenced_matrix (const MATRIX &m) { matrix = &m; allocate_tmp_vector (); @@ -73,9 +73,9 @@ set_referenced_matrix (const Matrix &m) -template +template void -FilteredMatrix::clear_constraints () +FilteredMatrix::clear_constraints () { // swap vectors to release memory std::vector empty; @@ -84,10 +84,10 @@ FilteredMatrix::clear_constraints () -template +template void -FilteredMatrix:: -apply_constraints (Vector &v, +FilteredMatrix:: +apply_constraints (VECTOR &v, const bool matrix_is_symmetric) const { // array that will hold the pairs @@ -141,9 +141,9 @@ apply_constraints (Vector &v, -template +template void -FilteredMatrix::pre_filter (Vector &v) const +FilteredMatrix::pre_filter (VECTOR &v) const { // iterate over all constraints and // zero out value @@ -155,10 +155,10 @@ FilteredMatrix::pre_filter (Vector &v) const -template +template void -FilteredMatrix::post_filter (const Vector &in, - Vector &out) const +FilteredMatrix::post_filter (const VECTOR &in, + VECTOR &out) const { // iterate over all constraints and // set value correctly @@ -170,10 +170,10 @@ FilteredMatrix::post_filter (const Vector &in, -template +template void -FilteredMatrix::vmult (Vector &dst, - const Vector &src) const +FilteredMatrix::vmult (VECTOR &dst, + const VECTOR &src) const { tmp_mutex.acquire (); // first copy over src vector and @@ -190,11 +190,11 @@ FilteredMatrix::vmult (Vector &dst, -template -typename FilteredMatrix::value_type -FilteredMatrix::residual (Vector &dst, - const Vector &x, - const Vector &b) const +template +typename FilteredMatrix::value_type +FilteredMatrix::residual (VECTOR &dst, + const VECTOR &x, + const VECTOR &b) const { tmp_mutex.acquire (); // first copy over x vector and @@ -225,10 +225,10 @@ FilteredMatrix::residual (Vector &dst, -template +template void -FilteredMatrix::Tvmult (Vector &dst, - const Vector &src) const +FilteredMatrix::Tvmult (VECTOR &dst, + const VECTOR &src) const { tmp_mutex.acquire (); // first copy over src vector and @@ -245,9 +245,9 @@ FilteredMatrix::Tvmult (Vector &dst, -template -typename FilteredMatrix::value_type -FilteredMatrix::matrix_norm_square (const Vector &v) const +template +typename FilteredMatrix::value_type +FilteredMatrix::matrix_norm_square (const VECTOR &v) const { tmp_mutex.acquire (); tmp_vector = v; @@ -267,11 +267,11 @@ FilteredMatrix::matrix_norm_square (const Vector &v) const -template +template void -FilteredMatrix:: -precondition_Jacobi (Vector &dst, - const Vector &src, +FilteredMatrix:: +precondition_Jacobi (VECTOR &dst, + const VECTOR &src, const value_type omega) const { // first precondition as usual, @@ -292,9 +292,9 @@ precondition_Jacobi (Vector &dst, -template +template unsigned int -FilteredMatrix::memory_consumption () const +FilteredMatrix::memory_consumption () const { return (MemoryConsumption::memory_consumption (matrix) + MemoryConsumption::memory_consumption (constraints) + -- 2.39.5