Ready for fvm steady case

This commit is contained in:
2025-09-21 20:57:02 +02:00
parent 3a53b6ebf7
commit 513f071748
59 changed files with 1813 additions and 983 deletions
+64 -1
View File
@@ -10,6 +10,9 @@
#include <iostream>
#include <stdexcept>
#include <chrono>
//#include "./numerics/interpolation/interpolation_linear.h"
@@ -17,7 +20,67 @@
int main(int argc, char const *argv[])
{
utils::Md A;
/*
int hw = omp_get_max_active_levels();
if (hw <= 1) return 0;
const uint64_t m=512, k=512, p=512; // ~134M MACs; adjust if needed
utils::Md A(m,k,1), B(k,p,1), C(k,p,1);
omp_set_max_active_levels(1);
auto t0 = std::chrono::high_resolution_clock::now();
for (int i = 0; i < m*k*p; ++i){
A==B
}
double t1 = std::chrono::duration<double>(std::chrono::high_resolution_clock::now() - t0).count();
omp_set_max_active_levels(2);
auto t0 = std::chrono::high_resolution_clock::now();
for (int i = 0; i < m*k*p; ++i){
A==B
}
double t1 = std::chrono::duration<double>(std::chrono::high_resolution_clock::now() - t0).count();
omp_set_num_threads(prev);
// Must not be notably slower with many threads
CHECK(tN <= t1 * 1.05, "rows_omp: multi-thread slower than single-thread");
utils::Md A(5,5, 1);
utils::Md B(5,5, 1);
utils::Md C(5,5, 2);
bool result1 = (A==B);
bool result2 = (A==C);
omp_set_max_active_levels(1):
for (int i = 0; i < 100; ++i){
(A==B)
}
omp_set_max_active_levels(2):
for (int i = 0; i < 100; ++i){
(A==B)
}
std::cout << result1 << std::endl;
std::cout << result2 << std::endl;
*/
/*
utils::Vector<double> x(100, 0), y(100,0);
for (uint64_t i = 0; i < 100; ++i){
@@ -78,6 +141,6 @@ int main(int argc, char const *argv[])
std::cout << rational.interp(p) << std::endl;
std::cout << barycentric.interp(p) << std::endl;
*/
return 0;
}