//---------------------------- petsc_deal_solver_01.cc ---------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2004, 2005 by the deal.II authors
+// Copyright (C) 2004, 2005, 2010 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
VECTOR& u, VECTOR& f, const PRECONDITION& P)
{
deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
+
u = 0.;
f = 1.;
- try
+ try
{
solver.solve(A,u,f,P);
}
unsigned int dim = (size-1)*(size-1);
deallog << "Size " << size << " Unknowns " << dim << std::endl;
-
+
// Make matrix
FDMatrix testproblem(size, size);
PETScWrappers::SparseMatrix A(dim, dim, 5);
PreconditionIdentity preconditioner;
check_solve (solver, A,u,f, preconditioner);
}
+ GrowingVectorMemory<PETScWrappers::Vector>::release_unused_memory ();
PetscFinalize ();
}
//---------------------------- petsc_deal_solver_02.cc ---------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2004, 2005 by the deal.II authors
+// Copyright (C) 2004, 2005, 2010 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
VECTOR& u, VECTOR& f, const PRECONDITION& P)
{
deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
+
u = 0.;
f = 1.;
- try
+ try
{
solver.solve(A,u,f,P);
}
deallog.attach(logfile);
deallog.depth_console(0);
deallog.threshold_double(1.e-10);
-
+
PetscInitialize(&argc,&argv,0,0);
{
SolverControl control(100, 1.e-3);
unsigned int dim = (size-1)*(size-1);
deallog << "Size " << size << " Unknowns " << dim << std::endl;
-
+
// Make matrix
FDMatrix testproblem(size, size);
PETScWrappers::SparseMatrix A(dim, dim, 5);
PreconditionIdentity preconditioner;
check_solve (solver, A,u,f, preconditioner);
}
+ GrowingVectorMemory<PETScWrappers::Vector>::release_unused_memory ();
PetscFinalize ();
}
//---------------------------- petsc_deal_solver_03.cc ---------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2004, 2005 by the deal.II authors
+// Copyright (C) 2004, 2005, 2010 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
VECTOR& u, VECTOR& f, const PRECONDITION& P)
{
deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
+
u = 0.;
f = 1.;
- try
+ try
{
solver.solve(A,u,f,P);
}
deallog.attach(logfile);
deallog.depth_console(0);
deallog.threshold_double(1.e-10);
-
+
PetscInitialize(&argc,&argv,0,0);
{
SolverControl control(100, 1.e-3);
unsigned int dim = (size-1)*(size-1);
deallog << "Size " << size << " Unknowns " << dim << std::endl;
-
+
// Make matrix
FDMatrix testproblem(size, size);
PETScWrappers::SparseMatrix A(dim, dim, 5);
PreconditionIdentity preconditioner;
check_solve (solver, A,u,f, preconditioner);
}
+ GrowingVectorMemory<PETScWrappers::Vector>::release_unused_memory ();
PetscFinalize ();
}
//---------------------------- petsc_deal_solver_04.cc ---------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2004, 2005 by the deal.II authors
+// Copyright (C) 2004, 2005, 2010 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
VECTOR& u, VECTOR& f, const PRECONDITION& P)
{
deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
+
u = 0.;
f = 1.;
- try
+ try
{
solver.solve(A,u,f,P);
}
deallog.attach(logfile);
deallog.depth_console(0);
deallog.threshold_double(1.e-10);
-
+
PetscInitialize(&argc,&argv,0,0);
{
SolverControl control(100, 1.e-3);
unsigned int dim = (size-1)*(size-1);
deallog << "Size " << size << " Unknowns " << dim << std::endl;
-
+
// Make matrix
FDMatrix testproblem(size, size);
PETScWrappers::SparseMatrix A(dim, dim, 5);
PreconditionIdentity preconditioner;
check_solve (solver, A,u,f, preconditioner);
}
+ GrowingVectorMemory<PETScWrappers::Vector>::release_unused_memory ();
PetscFinalize ();
}
//---------------------------- petsc_deal_solver_05.cc ---------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2004, 2005 by the deal.II authors
+// Copyright (C) 2004, 2005, 2010 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
VECTOR& u, VECTOR& f, const PRECONDITION& P)
{
deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
+
u = 0.;
f = 1.;
- try
+ try
{
solver.solve(A,u,f,P);
}
deallog.attach(logfile);
deallog.depth_console(0);
deallog.threshold_double(1.e-10);
-
+
PetscInitialize(&argc,&argv,0,0);
{
SolverControl control(100, 1.e-3);
unsigned int dim = (size-1)*(size-1);
deallog << "Size " << size << " Unknowns " << dim << std::endl;
-
+
// Make matrix
FDMatrix testproblem(size, size);
PETScWrappers::SparseMatrix A(dim, dim, 5);
PreconditionIdentity preconditioner;
check_solve (solver, A,u,f, preconditioner);
}
+ GrowingVectorMemory<PETScWrappers::Vector>::release_unused_memory ();
PetscFinalize ();
}
//---------------------------- petsc_deal_solver_06.cc ---------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2004, 2005 by the deal.II authors
+// Copyright (C) 2004, 2005, 2010 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
VECTOR& u, VECTOR& f, const PRECONDITION& P)
{
deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
+
u = 0.;
f = 1.;
- try
+ try
{
solver.solve(A,u,f,P);
}
SolverControl control(10000, 1.e-3);
deallog << "Size " << size << " Unknowns " << dim << std::endl;
-
+
// Make matrix
FDMatrix testproblem(size, size);
PETScWrappers::SparseMatrix A(dim, dim, 5);
PreconditionIdentity preconditioner;
check_solve (solver, A,u,f, preconditioner);
}
+ GrowingVectorMemory<PETScWrappers::Vector>::release_unused_memory ();
PetscFinalize ();
}