<commit_before>//---------------------------------------------------------------------------
//    $Id$
//
//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 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.
//
//---------------------------------------------------------------------------
#ifndef __deal2__relaxation_block_templates_h
#define __deal2__relaxation_block_templates_h

#include <deal.II/lac/relaxation_block.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/vector_memory.h>

DEAL_II_NAMESPACE_OPEN

template <class MATRIX, typename inverse_type>
inline
RelaxationBlock<MATRIX,inverse_type>::AdditionalData::AdditionalData (
  const double relaxation,
  const bool invert_diagonal,
  const bool same_diagonal)
		:
		relaxation(relaxation),
		invert_diagonal(invert_diagonal),
		same_diagonal(same_diagonal),
		inversion(PreconditionBlockBase<inverse_type>::gauss_jordan),
		threshold(0.)
{}


template <class MATRIX, typename inverse_type>
inline
RelaxationBlock<MATRIX,inverse_type>::AdditionalData::AdditionalData (
  const BlockList& bl,
  const double relaxation,
  const bool invert_diagonal,
  const bool same_diagonal)
		:
		block_list(bl),
		relaxation(relaxation),
		invert_diagonal(invert_diagonal),
		same_diagonal(same_diagonal),
		inversion(PreconditionBlockBase<inverse_type>::gauss_jordan),
		threshold(0.)
{}


template <class MATRIX, typename inverse_type>
inline
void
RelaxationBlock<MATRIX,inverse_type>::initialize (
  const MATRIX& M,
  const AdditionalData& parameters)
{
  Assert (parameters.invert_diagonal, ExcNotImplemented());
  
  clear();
//  Assert (M.m() == M.n(), ExcNotQuadratic());
  A = &M;
  additional_data = &parameters;
  
  this->reinit(additional_data->block_list.size(), 0, additional_data->same_diagonal,
	       additional_data->inversion);
  
  if (additional_data->invert_diagonal)
    invert_diagblocks();
}


template <class MATRIX, typename inverse_type>
inline
void
RelaxationBlock<MATRIX,inverse_type>::clear ()
{
  A = 0;
  PreconditionBlockBase<inverse_type>::clear ();
}

<commit_msg>actually use inversion method in parameter object<commit_after>//---------------------------------------------------------------------------
//    $Id$
//
//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 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.
//
//---------------------------------------------------------------------------
#ifndef __deal2__relaxation_block_templates_h
#define __deal2__relaxation_block_templates_h

#include <deal.II/lac/relaxation_block.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/vector_memory.h>

DEAL_II_NAMESPACE_OPEN

template <class MATRIX, typename inverse_type>
inline
RelaxationBlock<MATRIX,inverse_type>::AdditionalData::AdditionalData (
  const double relaxation,
  const bool invert_diagonal,
  const bool same_diagonal)
		:
		relaxation(relaxation),
		invert_diagonal(invert_diagonal),
		same_diagonal(same_diagonal),
		inversion(PreconditionBlockBase<inverse_type>::gauss_jordan),
		threshold(0.)
{}


template <class MATRIX, typename inverse_type>
inline
RelaxationBlock<MATRIX,inverse_type>::AdditionalData::AdditionalData (
  const BlockList& bl,
  const double relaxation,
  const bool invert_diagonal,
  const bool same_diagonal)
		:
		block_list(bl),
		relaxation(relaxation),
		invert_diagonal(invert_diagonal),
		same_diagonal(same_diagonal),
		inversion(PreconditionBlockBase<inverse_type>::gauss_jordan),
		threshold(0.)
{}


template <class MATRIX, typename inverse_type>
inline
void
RelaxationBlock<MATRIX,inverse_type>::initialize (
  const MATRIX& M,
  const AdditionalData& parameters)
{
  Assert (parameters.invert_diagonal, ExcNotImplemented());
  
  clear();
//  Assert (M.m() == M.n(), ExcNotQuadratic());
  A = &M;
  additional_data = &parameters;
  this->inversion = parameters.inversion;
  
  this->reinit(additional_data->block_list.size(), 0, additional_data->same_diagonal,
	       additional_data->inversion);
  
  if (additional_data->invert_diagonal)
    invert_diagblocks();
}


template <class MATRIX, typename inverse_type>
inline
void
RelaxationBlock<MATRIX,inverse_type>::clear ()
{
  A = 0;
  PreconditionBlockBase<inverse_type>::clear ();
}


{'fraction_non_alphanumeric': 0.1668086919471666, 'fraction_numerical': 0.023008095440988495, 'mean_word_length': 3.6577380952380953, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '370122', 'n_tokens_mistral': 1663, 'n_tokens_neox': 1415, 'n_words': 312}