Skip to content

Commit

Permalink
chore: Simplify AnisoArgs constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo Milani committed Apr 9, 2024
1 parent 1949a15 commit a528e76
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions include/CoMMA/Args.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,29 +196,29 @@ class AnisotropicArgs {
/** @brief Constructor
* @param[in] is_anisotropic Whether to consider an anisotropic agglomeration.
* @param[in] anisotropicCompliantCells List of cells which have to be looked
* for anisotropy
* for anisotropy.
* @param[in] build_lines Whether lines joining the anisotropic cells should
* be built.
* be built. Default: true.
* @param[in] odd_line_length Whether anisotropic lines with odd length are
* allowed.
* allowed. Default: true.
* @param[in] threshold_anisotropy Value of the aspect-ratio above which a
* cell is considered as anisotropic.
* @param[in] max_cells_in_line [Optional] Maximum number of cells in an
* anisotropic line.
* cell is considered as anisotropic. Default: 4.0
* @param[in] max_cells_in_line Maximum number of cells in an anisotropic
* line. Default: no limit.
*/
AnisotropicArgs(
bool is_anisotropic,
const std::vector<CoMMAIndexType> &anisotropicCompliantCells,
std::optional<bool> build_lines = std::nullopt,
std::optional<bool> odd_line_length = std::nullopt,
std::optional<CoMMAWeightType> threshold_anisotropy = std::nullopt,
bool build_lines = true,
bool odd_line_length = true,
CoMMAWeightType threshold_anisotropy = 4.,
std::optional<CoMMAIndexType> max_cells_in_line = std::nullopt
) :
is_anisotropic(is_anisotropic),
anisotropicCompliantCells(anisotropicCompliantCells),
build_lines(build_lines.value_or(true)),
odd_line_length(odd_line_length.value_or(true)),
threshold_anisotropy(threshold_anisotropy.value_or(4.)),
build_lines(build_lines),
odd_line_length(odd_line_length),
threshold_anisotropy(threshold_anisotropy),
max_cells_in_line(max_cells_in_line) {}
};

Expand Down

0 comments on commit a528e76

Please sign in to comment.