//----------------------------------------------------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009 by the deal.II authors
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 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
void test ()
{
deallog << dim << 'd' << std::endl;
-
- Triangulation<dim> tria;
+
+ Triangulation<dim> tria;
GridGenerator::hyper_cube (tria,0,1);
tria.refine_global (1);
FE_Q<dim> fe (1);
DoFHandler<dim> dof_handler (tria);
dof_handler.distribute_dofs (fe);
-
+
deallog << "Number of dofs = " << dof_handler.n_dofs() << std::endl;
-
+
SparsityPattern sparsity_pattern;
sparsity_pattern.reinit (dof_handler.n_dofs(),
dof_handler.n_dofs(),
dof_handler.max_couplings_between_dofs());
DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern);
sparsity_pattern.compress ();
-
+
SparseMatrix<double> B;
- B.reinit (sparsity_pattern);
-
+ B.reinit (sparsity_pattern);
+
QGauss<dim> qr (2);
MatrixTools::create_mass_matrix (dof_handler, qr, B);
if (p->column() != p->row())
Assert (B(p->row(),p->column()) != B(p->column(),p->row()),
ExcInternalError());
-
+
// for a number of different solution
// vectors, make up a matching rhs vector
// and check what the UMFPACK solver finds
std::ofstream logfile("umfpack_03/output");
deallog.attach(logfile);
deallog.depth_console(0);
- deallog.threshold_double(1.e-9);
+ deallog.threshold_double(1.e-8);
test<1> ();
test<2> ();
//----------------------------------------------------------------------
// $Id$
-// Version: $Name$
+// Version: $Name$
//
-// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009 by the deal.II authors
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 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
void test ()
{
deallog << dim << 'd' << std::endl;
-
- Triangulation<dim> tria;
+
+ Triangulation<dim> tria;
GridGenerator::hyper_cube (tria,0,1);
tria.refine_global (1);
FE_Q<dim> fe (1);
DoFHandler<dim> dof_handler (tria);
dof_handler.distribute_dofs (fe);
-
+
deallog << "Number of dofs = " << dof_handler.n_dofs() << std::endl;
-
+
BlockSparsityPattern sparsity_pattern;
sparsity_pattern.reinit (3, 3);
for (unsigned int i=0; i<3; ++i)
sparsity_pattern.collect_sizes();
DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern);
sparsity_pattern.compress ();
-
+
BlockSparseMatrix<float> B;
- B.reinit (sparsity_pattern);
-
+ B.reinit (sparsity_pattern);
+
{
// for some reason, we can't
// create block matrices directly
dof_handler.max_couplings_between_dofs());
DoFTools::make_sparsity_pattern (dof_handler, xsparsity_pattern);
xsparsity_pattern.compress ();
-
+
SparseMatrix<double> xB;
- xB.reinit (xsparsity_pattern);
-
+ xB.reinit (xsparsity_pattern);
+
QGauss<dim> qr (2);
MatrixTools::create_mass_matrix (dof_handler, qr, xB);
for (SparseMatrix<double>::const_iterator i = xB.begin(); i != xB.end(); ++i)
B.set (i->row(), i->column(), i->value());
}
-
-
+
+
// for a number of different solution
// vectors, make up a matching rhs vector
// and check what the UMFPACK solver finds
std::ofstream logfile("umfpack_08/output");
deallog.attach(logfile);
deallog.depth_console(0);
- deallog.threshold_double(1.e-9);
+ deallog.threshold_double(1.e-8);
test<1> ();
test<2> ();