// errors may accumulate for badly
// conditioned matrices
ReductionControl control(5*tmp.size(), 0., 1e-12, false, false);
- PrimitiveVectorMemory<> memory;
+ GrowingVectorMemory<> memory;
SolverCG<> cg(control,memory);
PreconditionSSOR<> prec;
// errors may accumulate for badly
// conditioned matrices
ReductionControl control(5*rhs.size(), 0., 1.e-12, false, false);
- PrimitiveVectorMemory<> memory;
+ GrowingVectorMemory<> memory;
SolverCG<> cg(control,memory);
PreconditionSSOR<> prec;
FilteredMatrix<Vector<double> > PF (prec);
SolverControl control (1000, 1.e-10, false, false);
- PrimitiveVectorMemory<Vector<double> > mem;
+ GrowingVectorMemory<Vector<double> > mem;
SolverCG<Vector<double> > solver (control, mem);
Vector<double> f(n_dofs);
// management in the API reference
// manual). By default, the linear
// solvers use a derived class
- // <code>PrimitiveVectorMemory</code> that,
+ // <code>GrowingVectorMemory</code> that,
// ever time a vector is requested,
- // allocates one using <code>new</code>, and
- // calls <code>delete</code> on it again once
- // the solver returns it to the
- // <code>PrimitiveVectorMemory</code>
- // object. This is the appropriate
- // thing to do if we do not
- // anticipate that the vectors may be
- // reused any time soon.
+ // allocates one from its internal
+ // pool.
//
// On the other hand, for the present
// case, we would like to have a
private:
const SmartPointer<const Matrix> matrix;
-
+//TODO: GrowingVectorMemory is now the default and it can be created
+//where needed. Adjust documentation and implementation here
mutable GrowingVectorMemory<> vector_memory;
};
*
* // set up a linear solver
* SolverControl control (1000, 1.e-10, false, false);
- * PrimitiveVectorMemory<Vector<double> > mem;
+ * GrowingVectorMemory<Vector<double> > mem;
* SolverCG<Vector<double> > solver (control, mem);
*
* // set up a preconditioner object
* contrast to the other
* constructor, this constructor
* denotes an internal object of
- * type PrimitiveVectorMemory to
+ * type GrowingVectorMemory to
* allocate memory.
*
* A reference to the control
* object has been given to the
* constructor.
*/
- static PrimitiveVectorMemory<VECTOR> static_vector_memory;
+ mutable GrowingVectorMemory<VECTOR> static_vector_memory;
/**
* Control structure.
/**
* Constructor. Use an object of
- * type PrimitiveVectorMemory as
+ * type GrowingVectorMemory as
* a default to allocate memory.
*/
SolverBicgstab (SolverControl &cn,
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
/**
* Constructor. Use an object of
- * type PrimitiveVectorMemory as
+ * type GrowingVectorMemory as
* a default to allocate memory.
*/
SolverCG (SolverControl &cn,
/**
* Constructor. Use an object of
- * type PrimitiveVectorMemory as
+ * type GrowingVectorMemory as
* a default to allocate memory.
*/
SolverGMRES (SolverControl &cn,
/**
* Constructor. Use an object of
- * type PrimitiveVectorMemory as
+ * type GrowingVectorMemory as
* a default to allocate memory.
*/
SolverFGMRES (SolverControl &cn,
// $Id$
// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
/**
* Constructor. Use an object of
- * type PrimitiveVectorMemory as
+ * type GrowingVectorMemory as
* a default to allocate memory.
*/
SolverMinRes (SolverControl &cn,
/**
* Constructor. Use an object of
- * type PrimitiveVectorMemory as
+ * type GrowingVectorMemory as
* a default to allocate memory.
*/
SolverQMRS (SolverControl &cn,
// $Id$
// Version: $Name$
//
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
/**
* Constructor. Use an object of
- * type PrimitiveVectorMemory as
+ * type GrowingVectorMemory as
* a default to allocate memory.
*/
SolverRichardson (SolverControl &cn,
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
// a few instantiations of static members. Hope that we catch all that
// are required
-template <class VECTOR>
-PrimitiveVectorMemory<VECTOR>
-Solver<VECTOR>::static_vector_memory;
-
template class Solver<Vector<double> >;
template class Solver<BlockVector<double> >;
//---------------------------------------------------------------------------
-// $Id: vector.cc 15443 2007-11-05 03:43:52Z bangerth $
+// $Id$
// Version: $Name$
//
// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
// GrowingVectorMemory<BlockVector<SCALAR> >::pool;
}
+for (SCALAR : COMPLEX_SCALARS)
+ {
+ template class VectorMemory<Vector<SCALAR> >;
+ template class GrowingVectorMemory<Vector<SCALAR> >;
+// template GrowingVectorMemory<Vector<SCALAR> >::Pool
+// GrowingVectorMemory<Vector<SCALAR> >::pool;
+
+ template class VectorMemory<BlockVector<SCALAR> >;
+ template class GrowingVectorMemory<BlockVector<SCALAR> >;
+// template GrowingVectorMemory<BlockVector<SCALAR> >::Pool
+// GrowingVectorMemory<BlockVector<SCALAR> >::pool;
+ }
+