<commit_before>#ifndef AMGCL_LEVEL_PARAMS_HPP
#define AMGCL_LEVEL_PARAMS_HPP

/*
The MIT License

Copyright (c) 2012 <NAME> <<EMAIL>>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

/**
 * \file   level_params.hpp
 * \author <NAME> <<EMAIL>>
 * \brief  Common parameters for level construction/solution.
 */

namespace amgcl {

namespace level {

/// Common parameters for level construction/solution.
struct params {
    /// Number of pre-relaxations.
    unsigned npre;

    /// Number of post-relaxations.
    unsigned npost;

    /// Number of cycles (1 for V-cycle, 2 for W-cycle, etc.).
    unsigned ncycle;

    /// How often to invoke k-cycle instead of just v-cycle.
    /**
     * See \ref Notay_2008 "Notay (2008)". K-cycle employs a Krylov method
     * (here CG) on each level of the grid hierarchy and uses this grid
     * hierarchy for the preconditioning of this Krylov method. The approach is
     * further extended by allowing such inner iterations only at levels of
     * given multiplicity, whereas normal V-cycle formulation is used at all
     * other levels.
     */
    // TODO: Try flexible (generalized) CG method here.
    unsigned kcycle;

    /// Under-relaxation factor.
    float relax_factor;

    /// Maximum number of iterations in standalone solver.
    unsigned maxiter;

    /// The required precision for standalone solver.
    double   tol;

    params()
        : npre(1), npost(1), ncycle(1), kcycle(0), relax_factor(0.72f),
          maxiter(100), tol(1e-8)
    { }
};
<commit_msg>Removed damping factor from general level params<commit_after>#ifndef AMGCL_LEVEL_PARAMS_HPP
#define AMGCL_LEVEL_PARAMS_HPP

/*
The MIT License

Copyright (c) 2012 <NAME> <<EMAIL>>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

/**
 * \file   level_params.hpp
 * \author <NAME> <<EMAIL>>
 * \brief  Common parameters for level construction/solution.
 */

namespace amgcl {

namespace level {

/// Common parameters for level construction/solution.
struct params {
    /// Number of pre-relaxations.
    unsigned npre;

    /// Number of post-relaxations.
    unsigned npost;

    /// Number of cycles (1 for V-cycle, 2 for W-cycle, etc.).
    unsigned ncycle;

    /// How often to invoke k-cycle instead of just v-cycle.
    /**
     * See \ref Notay_2008 "Notay (2008)". K-cycle employs a Krylov method
     * (here CG) on each level of the grid hierarchy and uses this grid
     * hierarchy for the preconditioning of this Krylov method. The approach is
     * further extended by allowing such inner iterations only at levels of
     * given multiplicity, whereas normal V-cycle formulation is used at all
     * other levels.
     */
    // TODO: Try flexible (generalized) CG method here.
    unsigned kcycle;

    /// Maximum number of iterations in standalone solver.
    unsigned maxiter;

    /// The required precision for standalone solver.
    double   tol;

    params()
        : npre(1), npost(1), ncycle(1), kcycle(0), maxiter(100), tol(1e-8)
    { }
};

{'fraction_non_alphanumeric': 0.0721774193548387, 'fraction_numerical': 0.009879032258064515, 'mean_word_length': 3.429464285714286, 'pattern_counts': {'":': 0, '<': 15, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3269099', 'n_tokens_mistral': 1407, 'n_tokens_neox': 1294, 'n_words': 645}