Timo, Markus,
Sorry for making you confused. So it is not this part of the code that
throws exception.
I followed advice about minimal example of code and ended up with
attached program (test it in optimized mode just to be sure if you get
an exception as well since in debug it takes 3-4 minutes untill this
point is reached).
An exception is thrown somewhere inside this method:
sparsity_pattern.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(),
dof_handler.max_couplings_between_dofs());
Thanks.
On 07.05.2012 10:10, Timo Heister wrote:
Hi Alexander,
I know this results in around 2 millions of cells, however I work on PC with
64 GB of RAM and two quad core high end CPUs, I guess this is enough for
that problem.
Any ideas why does that happen?
I just tried to reproduce your problem here, but I am not able to see
the bug. 2 million cells only require around 800mb for me.
I have a couple of questions:
1. are you using a dealii:Triangulation or a
parallel::distributed::Triangulation?
2. are you running with MPI? If yes, how many processes?
3. What is your base mesh? Just one cell?
4. Can you generate a minimal example you can send me? (for example
edit step-1 to do the same computation)
Thanks,
Timo
--
Regards,
Alexander
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/base/function.h>
#include <deal.II/base/logstream.h>
#include <deal.II/lac/vector.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/sparse_matrix.h>
#include <deal.II/lac/compressed_sparsity_pattern.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/constraint_matrix.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_out.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_tools.h>
#include <deal.II/dofs/dof_renumbering.h>
#include <deal.II/fe/fe_values.h>
#include <deal.II/fe/fe_nedelec.h>
#include <deal.II/fe/fe_system.h>
#include <deal.II/numerics/vectors.h>
#include <deal.II/numerics/matrices.h>
#include <fstream>
#include <iostream>
#include <cmath>
using namespace dealii;
int main ()
{
try
{
static const int dim = 3;
Triangulation<dim> triangulation;
DoFHandler<dim> dof_handler(triangulation);
FESystem<dim> fe(FE_Nedelec<dim>(0), 1,
FE_Nedelec<dim>(0), 1);
ConstraintMatrix hanging_node_constraints;
ConstraintMatrix boundary_constraints;
SparsityPattern sparsity_pattern;
Point<dim> top(1.0,1.0,1.0);
Point<dim> bottom(-1.0,-1.0,-1.0);
GridGenerator::hyper_rectangle(triangulation, bottom, top);
triangulation.refine_global(7);
dof_handler.distribute_dofs (fe);
//hanging_node_constraints.clear ();
//DoFTools::make_hanging_node_constraints (dof_handler, hanging_node_constraints);
//hanging_node_constraints.close ();
sparsity_pattern.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs());
}
catch (std::exception &exc)
{
std::cerr << "\n\n----------------------------------------------------" << std::endl;
std::cerr << "Exception on processing: \n" << exc.what() << "\nAborting!\n"
<< "----------------------------------------------------" << std::endl;
return 1;
}
return 0;
}
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii