Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreMarchand20 committed Sep 23, 2024
1 parent 5f096de commit 9f11557
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion include/htool/hmatrix/tree_builder/tree_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@ class HMatrixTreeBuilder {
void set_minimal_source_depth(int minimal_source_depth) { m_minsourcedepth = minimal_source_depth; }
void set_minimal_target_depth(int minimal_target_depth) { m_mintargetdepth = minimal_target_depth; }
void set_dense_blocks_generator(std::shared_ptr<VirtualDenseBlocksGenerator<CoefficientPrecision>> dense_blocks_generator) { m_dense_blocks_generator = dense_blocks_generator; }
void set_block_tree_consistency(bool consistency) { m_is_block_tree_consistent = consistency; }
void set_block_tree_consistency(bool consistency) {
if (m_symmetry_type != 'N' && consistency == false) {
htool::Logger::get_instance().log(LogLevel::ERROR, "Block tree consistency cannot be set to false if symmetry is not N."); // LCOV_EXCL_LINE
}
m_is_block_tree_consistent = consistency;
}

// Getters
char get_symmetry() const { return m_symmetry_type; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) {
std::cout << nr << " " << nc << " " << use_local_cluster << " " << epsilon << " " << use_dense_block_generator << " " << block_tree_consistency << "\n";

is_error = is_error || test_hmatrix_build<std::complex<double>, GeneratorTestComplexSymmetric>(nr, nc, use_local_cluster, 'N', 'N', epsilon, use_dense_block_generator, block_tree_consistency);
if (nr == nc) {
if (nr == nc && block_tree_consistency) {
for (auto UPLO : {'U', 'L'}) {
is_error = is_error || test_hmatrix_build<std::complex<double>, GeneratorTestComplexSymmetric>(nr, nr, use_local_cluster, 'S', UPLO, epsilon, use_dense_block_generator, block_tree_consistency);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) {

is_error = is_error || test_hmatrix_build<double, GeneratorTestDoubleSymmetric>(nr, nc, use_local_cluster, 'N', 'N', epsilon, use_dense_block_generator, block_tree_consistency);

if (nr == nc) {
if (nr == nc && block_tree_consistency) {
for (auto UPLO : {'U', 'L'}) {
std::cout << UPLO << "\n";
is_error = is_error || test_hmatrix_build<double, GeneratorTestDoubleSymmetric>(nr, nc, use_local_cluster, 'S', UPLO, epsilon, use_dense_block_generator, block_tree_consistency);
Expand Down

0 comments on commit 9f11557

Please sign in to comment.