diff --git a/include/htool/solvers/utility.hpp b/include/htool/solvers/utility.hpp index cf8a7580..58b13150 100644 --- a/include/htool/solvers/utility.hpp +++ b/include/htool/solvers/utility.hpp @@ -122,30 +122,30 @@ class DDMSolverWithDenseLocalSolver { return permuted_block_diagonal_dense_matrix_with_overlap; }; - std::function(int, const CoordinatePrecision *)> initialize_local_cluster = [this](int spatial_dimension, const CoordinatePrecision *global_geometry) { + std::function(int, const CoordinatePrecision *)> initialize_local_cluster = [this](int spatial_dimension0, const CoordinatePrecision *global_geometry0) { // Local geometry int local_size = local_to_global_numbering.size(); - std::vector local_geometry(spatial_dimension * local_size); + std::vector local_geometry(spatial_dimension0 * local_size); for (int i = 0; i < local_to_global_numbering.size(); i++) { - for (int dimension = 0; dimension < spatial_dimension; dimension++) { - local_geometry[spatial_dimension * i + dimension] = global_geometry[spatial_dimension * local_to_global_numbering[i] + dimension]; + for (int dimension = 0; dimension < spatial_dimension0; dimension++) { + local_geometry[spatial_dimension0 * i + dimension] = global_geometry0[spatial_dimension0 * local_to_global_numbering[i] + dimension]; } } // Local cluster ClusterTreeBuilder recursive_build_strategy; - return recursive_build_strategy.create_cluster_tree(local_to_global_numbering.size(), spatial_dimension, local_geometry.data(), 2, 2, nullptr); + return recursive_build_strategy.create_cluster_tree(local_to_global_numbering.size(), spatial_dimension0, local_geometry.data(), 2, 2, nullptr); }; std::unique_ptr> local_cluster; - std::function(const VirtualGeneratorInUserNumbering &, underlying_type, CoordinatePrecision, char)> initialize_local_hmatrix = [this](const VirtualGeneratorInUserNumbering &generator, underlying_type epsilon, CoordinatePrecision eta, char symmetry) { + std::function(const VirtualGeneratorInUserNumbering &, underlying_type, CoordinatePrecision, char)> initialize_local_hmatrix = [this](const VirtualGeneratorInUserNumbering &generator0, underlying_type epsilon0, CoordinatePrecision eta0, char symmetry0) { struct LocalGeneratorInUserNumbering : public VirtualGeneratorInUserNumbering { const std::vector &m_target_local_to_global_numbering; const std::vector &m_source_local_to_global_numbering; const VirtualGeneratorInUserNumbering &m_generator; - LocalGeneratorInUserNumbering(const VirtualGeneratorInUserNumbering &generator, const std::vector &target_local_to_global_numbering, const std::vector &source_local_to_global_numbering) : m_target_local_to_global_numbering(target_local_to_global_numbering), m_source_local_to_global_numbering(source_local_to_global_numbering), m_generator(generator) {} + LocalGeneratorInUserNumbering(const VirtualGeneratorInUserNumbering &generator0, const std::vector &target_local_to_global_numbering, const std::vector &source_local_to_global_numbering) : m_target_local_to_global_numbering(target_local_to_global_numbering), m_source_local_to_global_numbering(source_local_to_global_numbering), m_generator(generator0) {} void copy_submatrix(int M, int N, const int *const rows, const int *const cols, CoefficientPrecision *ptr) const override { std::vector new_rows(M), new_cols(N); @@ -160,10 +160,10 @@ class DDMSolverWithDenseLocalSolver { }; // Local Generator - LocalGeneratorInUserNumbering local_generator(generator, local_to_global_numbering, local_to_global_numbering); + LocalGeneratorInUserNumbering local_generator(generator0, local_to_global_numbering, local_to_global_numbering); // Local HMatrix - HMatrixTreeBuilder local_hmatrix_builder(*local_cluster, *local_cluster, epsilon, eta, symmetry, symmetry != 'N' ? 'L' : 'N', -1, -1, -1); + HMatrixTreeBuilder local_hmatrix_builder(*local_cluster, *local_cluster, epsilon0, eta0, symmetry0, symmetry != 'N' ? 'L' : 'N', -1, -1, -1); return local_hmatrix_builder.build(local_generator); }; @@ -221,24 +221,24 @@ class DDMSolver { return blocks_in_overlap0; }; - std::function(int, const CoordinatePrecision *)> initialize_local_cluster = [this](int spatial_dimension, const CoordinatePrecision *global_geometry) { + std::function(int, const CoordinatePrecision *)> initialize_local_cluster = [this](int spatial_dimension0, const CoordinatePrecision *global_geometry0) { // Local geometry int local_size = local_to_global_numbering.size(); - std::vector local_geometry(spatial_dimension * local_size); + std::vector local_geometry(spatial_dimension0 * local_size); for (int i = 0; i < local_to_global_numbering.size(); i++) { - for (int dimension = 0; dimension < spatial_dimension; dimension++) { - local_geometry[spatial_dimension * i + dimension] = global_geometry[spatial_dimension * local_to_global_numbering[i] + dimension]; + for (int dimension = 0; dimension < spatial_dimension0; dimension++) { + local_geometry[spatial_dimension0 * i + dimension] = global_geometry0[spatial_dimension0 * local_to_global_numbering[i] + dimension]; } } // Local cluster ClusterTreeBuilder recursive_build_strategy; - return recursive_build_strategy.create_cluster_tree(local_to_global_numbering.size(), spatial_dimension, local_geometry.data(), 2, 2); + return recursive_build_strategy.create_cluster_tree(local_to_global_numbering.size(), spatial_dimension0, local_geometry.data(), 2, 2); }; std::unique_ptr> local_cluster; - std::function(const VirtualGeneratorInUserNumbering &, underlying_type, CoordinatePrecision, char)> initialize_local_hmatrix = [this](const VirtualGeneratorInUserNumbering &generator, underlying_type epsilon, CoordinatePrecision eta, char symmetry) { + std::function(const VirtualGeneratorInUserNumbering &, underlying_type, CoordinatePrecision, char)> initialize_local_hmatrix = [this](const VirtualGeneratorInUserNumbering &generator0, underlying_type epsilon0, CoordinatePrecision eta0, char symmetry0) { struct LocalGeneratorInUserNumbering : public VirtualGeneratorInUserNumbering { const std::vector &m_target_local_to_global_numbering; const std::vector &m_source_local_to_global_numbering; @@ -259,10 +259,10 @@ class DDMSolver { }; // Local Generator - LocalGeneratorInUserNumbering local_generator(generator, local_to_global_numbering, local_to_global_numbering); + LocalGeneratorInUserNumbering local_generator(generator0, local_to_global_numbering, local_to_global_numbering); // Local HMatrix - HMatrixTreeBuilder local_hmatrix_builder(*local_cluster, *local_cluster, epsilon, eta, symmetry, symmetry != 'N' ? 'L' : 'N', -1, -1, -1); + HMatrixTreeBuilder local_hmatrix_builder(*local_cluster, *local_cluster, epsilon0, eta0, symmetry0, symmetry0 != 'N' ? 'L' : 'N', -1, -1, -1); return local_hmatrix_builder.build(local_generator); };