diff --git a/main.cpp b/main.cpp index 638cc8b6f7a30c1629424e13f52e1e2f72cf9fca..56081e71993150e70fbfdba010e6b2907961a74d 100644 --- a/main.cpp +++ b/main.cpp @@ -132,7 +132,7 @@ int main(int argc, char *argv[]) method_cost_map["AcousticSolverWithMesh"] = timer.seconds(); - { + { // gnuplot output for density const Kokkos::View<const Rd*> xj = mesh_data.xj(); const Kokkos::View<const double*> rhoj = unknowns.rhoj(); std::ofstream fout("rho"); @@ -143,22 +143,6 @@ int main(int argc, char *argv[]) } - Kokkos::View<TinyVector<2,double>*[2]> test("test", 10); - constexpr size_t N = 3; - std::cout << "sizeof(TinyVector<" << N << ",double>)=" << sizeof(TinyVector<N,double>) << std::endl; - std::cout << "sizeof(double)=" << sizeof(double) << std::endl; - std::cout << "sizeof(size_t) = " << sizeof(size_t) << std::endl; - std::cout << "sizeof(int) = " << sizeof(int) << std::endl; - std::cout << "sizeof(unsigned int) = " << sizeof(unsigned int) << std::endl; - std::cout << "sizeof(unsigned short) = " << sizeof(unsigned short) << std::endl; - std::cout << "std::numeric_limits<size_t>::max() = " << std::numeric_limits<size_t>::max() << std::endl; - std::cout << "std::numeric_limits<int>::max() = " << std::numeric_limits<int>::max() << std::endl; - std::cout << "std::numeric_limits<unsigned int>::max() = " << std::numeric_limits<unsigned int>::max() << std::endl; - std::cout << "std::numeric_limits<short>::max() = " << std::numeric_limits<short>::max() << std::endl; - std::cout << "std::numeric_limits<unsigned short>::max() = " << std::numeric_limits<unsigned short>::max() << std::endl; - std::cout << "std::numeric_limits<char>::max() = " << unsigned(std::numeric_limits<char>::max()) << std::endl; - std::cout << "std::numeric_limits<unsigned char>::max() = " << unsigned(std::numeric_limits<unsigned char>::max()) << std::endl; - Kokkos::finalize(); std::cout << "----------------------\n"; @@ -169,46 +153,16 @@ int main(int argc, char *argv[]) } for (const auto& method_cost : method_cost_map) { - std::cout << "* [" << std::setw(size) << std::left + std::cout << "* [" + << rang::fgB::cyan + << std::setw(size) << std::left << method_cost.first - << " ] Execution time: " + << rang::fg::reset + << "] Execution time: " << rang::style::bold << method_cost.second << rang::style::reset << '\n'; } - - TinyVector<2> x=zero; - TinyVector<2> y{1,2}; - - - TinyVector<6> kk{1,2,3,4,5,6}; - - x=TinyVector<2>{3,2}; - - std::cout << x << "-" << y << "=" << x-y << std::endl; - std::cout << x << "+" << y << "=" << x+y << std::endl; - std::cout << "3*" << x << '=' << 3*x << std::endl; - x[1]=3; y[1]=0.1; - std::cout << "< " << x << " | " << y << " > = " << (x,y) << std::endl; - - - TinyMatrix<2> Z = zero; - TinyMatrix<2> A(1,2, - 3,4); - TinyMatrix<2> B = identity; - - B(1,1)=2; - - std::cout << "A=" << A << '\n'; - std::cout << "B=" << B << '\n'; - std::cout << "2A=" << 2*A << '\n'; - std::cout << "A+B=" << A+B << '\n'; - std::cout << "A-B=" << A-B << '\n'; - std::cout << "AB=" << A*B << '\n'; - - std::cout << "Ax=" << A*x << '\n'; - - std::cout << "x tens y" << tensorProduct(x,y) << '\n'; return 0; }