<commit_before>//----------------------------  dof_tools_3.cc  ---------------------------
//    $Id$
//    Version: $Name$ 
//
//    Copyright (C) 2003, 2004, 2006 by the deal.II authors
//
//    This file is subject to QPL and may not be  distributed
//    without copyright and license information. Please refer
//    to the file deal.II/doc/license.html for the  text  and
//    further information on this license.
//
//----------------------------  dof_tools_3.cc  ---------------------------

#include "../tests.h"
#include "dof_tools_common.cc"
#include <dofs/dof_constraints.h>
#include <lac/vector.h>

// check
//   DoFTools::
//   make_hanging_node_constraints (const DoFHandler<dim> &,
//	                            ConstraintMatrix      &);


std::string output_file_name = "dof_tools_03/output";


template <int dim>
void
check_this (const DoFHandler<dim> &dof_handler)
{
                                   // don't run this test if hanging
                                   // nodes are not implemented
  if (dof_handler.get_fe().constraints_are_implemented() == false)
    return;
  
  ConstraintMatrix cm;
  DoFTools::make_hanging_node_constraints (dof_handler, cm);
  cm.close ();

  deallog << cm.n_constraints () << std::endl;
  deallog << cm.max_constraint_indirections () << std::endl;

  for (unsigned int i=0; i<dof_handler.n_dofs(); ++i)
    deallog << (cm.is_constrained(i) ? '0' : '1');
  deallog << std::endl;
  
  deallog << cm.n_constraints () << std::endl;
  for (unsigned int i=0; i<dof_handler.n_dofs(); ++i)
    deallog << (cm.is_identity_constrained(i) ? '0' : '1');
  deallog << std::endl;

  for (unsigned int i=0; i<dof_handler.n_dofs(); ++i)
    if (cm.is_constrained(i))
      {
	deallog << "not identity constrained: " << i << std::endl;
	Vector<double> v (dof_handler.n_dofs());
	v(i) = 1;
	cm.condense (v);
	for (unsigned int j=0; j<dof_handler.n_dofs(); ++j)
	  if (v(j) != 0)
	    deallog << "  line " << j << ": " << v(j) << std::endl;
      }
}
<commit_msg>Use a higher accuracy for results<commit_after>//----------------------------  dof_tools_3.cc  ---------------------------
//    $Id$
//    Version: $Name$ 
//
//    Copyright (C) 2003, 2004, 2006 by the deal.II authors
//
//    This file is subject to QPL and may not be  distributed
//    without copyright and license information. Please refer
//    to the file deal.II/doc/license.html for the  text  and
//    further information on this license.
//
//----------------------------  dof_tools_3.cc  ---------------------------

#include "../tests.h"
#include "dof_tools_common.cc"
#include <dofs/dof_constraints.h>
#include <lac/vector.h>

// check
//   DoFTools::
//   make_hanging_node_constraints (const DoFHandler<dim> &,
//	                            ConstraintMatrix      &);


std::string output_file_name = "dof_tools_03/output";


template <int dim>
void
check_this (const DoFHandler<dim> &dof_handler)
{
  deallog.get_file_stream().precision (5);
                                   // don't run this test if hanging
                                   // nodes are not implemented
  if (dof_handler.get_fe().constraints_are_implemented() == false)
    return;
  
  ConstraintMatrix cm;
  DoFTools::make_hanging_node_constraints (dof_handler, cm);
  cm.close ();

  deallog << cm.n_constraints () << std::endl;
  deallog << cm.max_constraint_indirections () << std::endl;

  for (unsigned int i=0; i<dof_handler.n_dofs(); ++i)
    deallog << (cm.is_constrained(i) ? '0' : '1');
  deallog << std::endl;
  
  deallog << cm.n_constraints () << std::endl;
  for (unsigned int i=0; i<dof_handler.n_dofs(); ++i)
    deallog << (cm.is_identity_constrained(i) ? '0' : '1');
  deallog << std::endl;

  for (unsigned int i=0; i<dof_handler.n_dofs(); ++i)
    if (cm.is_constrained(i))
      {
	deallog << "not identity constrained: " << i << std::endl;
	Vector<double> v (dof_handler.n_dofs());
	v(i) = 1;
	cm.condense (v);
	for (unsigned int j=0; j<dof_handler.n_dofs(); ++j)
	  if (v(j) != 0)
	    deallog << "  line " << j << ": " << v(j) << std::endl;
      }
}

{'fraction_non_alphanumeric': 0.20294478527607362, 'fraction_numerical': 0.013006134969325154, 'mean_word_length': 2.2765273311897105, 'pattern_counts': {'":': 2, '<': 95, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7190892', 'n_tokens_mistral': 1481, 'n_tokens_neox': 1407, 'n_words': 325}