You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,18 +48,18 @@ All notable changes to this project will be documented in this file.
48
48
-`task_based_internal_add_hmatrix_hmatrix_product` for task based alternative to `{sequential,openmp}_internal_add_hmatrix_hmatrix_product`.
49
49
-`task_based_internal_triangular_hmatrix_hmatrix_solve` for task based alternative to `internal_triangular_hmatrix_hmatrix_solve`.
50
50
-`task_based_lu_factorization` and `task_based_cholesky_factorization` for task based alternatives to `{sequential,openmp}_lu_factorization` and `{sequential,openmp}_cholesky_factorization`.
51
-
-`test_task_based_hmatrix_***.hpp` for testing various task based features.
51
+
-`test_task_based_hmatrix_*.hpp` for testing various task based features.
52
52
-`internal_add_lrmat_hmatrix` is now overloaded to handle the case where the HMatrix is larger than the LowRankMatrix.
53
53
-`get_leaves_from` is overloaded to return non const arguments.
54
54
-`get_false_positive` in a tree builder.
55
55
-`left_hmatrix_ancestor_of_right_hmatrix` and `left_hmatrix_descendant_of_right_hmatrix` for returning parent and children of a hmatrix.
56
+
-`Partition_N` is an alternative to `Partition` for defining the partition of a cluster. The latter only splits along the principal axis of the cluster, while the former tries to be smarter.
56
57
57
58
### Changed
58
59
59
60
-`VirtualInternalLowRankGenerator` and `VirtualLowRankGenerator`'s `copy_low_rank_approximation` function takes a `LowRankMatrix` as input to populate it and returns a boolean. The return value is true if the compression succeded, false otherwise.
60
61
-`LowRankMatrix` constructors changed. It only takes sizes and an epsilon or a required rank. Then, it is expected to call a `VirtualInternalLowRankGenerator` to populate it.
61
62
-`ClusterTreeBuilder` has now one strategy as `VirtualPartitioning`. Usual implementations are still available, for example using `Partitioning<double,ComputeLargestExtent,RegularSplitting>`.
62
-
- When using `ClusterTreeBuilder` with `number_of_children=2^spatial_dimension`, it will do a binary/quad/octo-tree instead of `number_of_children` cut along the main direction.
63
63
-`ClusterTreeBuilder` parameter `minclustersize` was removed, and a parameter `maximal_leaf_size` has been added.
64
64
-`DistributedOperator` supports now both "global-to-local" and "local-to-local" operators, using respectively `VirtualGlobalToLocalOperator` and `VirtualLocalToLocalOperator` interfaces. The linear algebra associated has been updated to follow a more Blas-like interface.
65
65
-`MatrixView` has been added to ease the use of matrix product. Most public functions for matrix products are also new templated to accept, `Matrix`, `MatrixView` or any other type following the same interface.
std::sort(result.begin(), result.end(), [](auto a, auto b) { return a.first < b.first; });
143
+
return result;
144
+
}
145
+
65
146
// Sort along main direction
66
147
std::sort(permutation.begin() + current_offset, permutation.begin() + current_offset + current_size, [&](int a, int b) {
67
148
CoordinatePrecision c = std::inner_product(coordinates + spatial_dimension * a, coordinates + spatial_dimension * (1 + a), directions.data(), CoordinatePrecision(0));
@@ -77,14 +158,13 @@ class Partitioning : public VirtualPartitioning<CoordinatePrecision> {
77
158
template <typename T>
78
159
classComputeLargestExtent {
79
160
public:
80
-
static Matrix<T> compute_direction(const Cluster<T> &cluster, int spatial_dimension, const T *const coordinates, const T *const, const T *const weights) {
161
+
staticstd::pair<Matrix<T>, std::vector<T>> compute_direction(const Cluster<T> &cluster, int spatial_dimension, const T *const coordinates, const T *const, const T *const weights) {
81
162
if (spatial_dimension != 2 && spatial_dimension != 3) {
82
163
htool::Logger::get_instance().log(LogLevel::ERROR, "clustering not define for spatial dimension !=2 and !=3"); // LCOV_EXCL_LINE
auto evp_eigs = spatial_dimension == 2 ? solve_EVP_2(cov) : solve_EVP_3(cov);
183
+
for (auto &eig : evp_eigs.second) {
184
+
if (eig > 0) {
185
+
eig = std::sqrt(eig);
186
+
} else {
187
+
eig = 0;
188
+
}
105
189
}
106
-
returndirections;
190
+
returnevp_eigs;
107
191
}
108
192
};
109
193
110
194
template <typename T>
111
195
classComputeBoundingBox {
112
196
public:
113
-
static Matrix<T> compute_direction(const Cluster<T> &cluster, int spatial_dimension, const T *const coordinates, const T *const, const T *const) {
197
+
staticstd::pair<Matrix<T>, std::vector<T>> compute_direction(const Cluster<T> &cluster, int spatial_dimension, const T *const coordinates, const T *const, const T *const) {
std::vector<int> test_local_partition(int spatial_dimension, int number_of_points, std::vector<CoordinatePrecision> &coordinates, int partition_size) {
0 commit comments