13#include "config/config.h"
19#ifdef HAVE_LIBQUADMATH
21#include "VCluster.hpp"
22#include "PSE/Kernels_test_util.hpp"
23#include "Plot/GoogleChart.hpp"
24#include <boost/multiprecision/float128.hpp>
44int main(
int argc,
char* argv[])
52 openfpm_init(&argc,&argv);
58 std::cerr <<
"Error: only one processor is allowed" <<
"\n";
66 yn.add(
"(order 2) float128 overlap=2");
67 yn.add(
"(order 2) float128 overlap=4");
68 yn.add(
"(order 2) overlap 2 double ");
69 yn.add(
"(order 2) overlap 4 double (order 2)");
70 yn.add(
"(order 2) overlap 2 float (order 2)");
71 yn.add(
"(order 2) overlap 4 float (order 2)");
73 yn.add(
"(order 4) float128 overlap=2");
74 yn.add(
"(order 4) float128 overlap=4");
76 yn.add(
"(order 6) float128 overlap=2");
77 yn.add(
"(order 6) float128 overlap=4");
79 yn.add(
"(order 8) float128 overlap=2");
80 yn.add(
"(order 8) float128 overlap=4");
83 for (
size_t i = 125 ; i <= 2097152000 ; i*=2)
92 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,2>>(i,2,err);
93 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
94 y.last().add(err.linf_error);
96 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,2>>(i,4,err);
97 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
98 y.last().add(err.linf_error);
100 PSE_test<double,Lap_PSE<1,double,2>>(i,2,err);
101 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
102 y.last().add(err.linf_error);
104 PSE_test<double,Lap_PSE<1,double,2>>(i,4,err);
105 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
106 y.last().add(err.linf_error);
108 PSE_test<float,Lap_PSE<1,float,2>>(i,2,err);
109 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
110 y.last().add(err.linf_error);
112 PSE_test<float,Lap_PSE<1,float,2>>(i,4,err);
113 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
114 y.last().add(err.linf_error);
118 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,4>>(i,2,err);
119 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
120 y.last().add(err.linf_error);
122 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,4>>(i,4,err);
123 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
124 y.last().add(err.linf_error);
129 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,6>>(i,2,err);
130 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
131 y.last().add(err.linf_error);
133 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,6>>(i,4,err);
134 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
135 y.last().add(err.linf_error);
139 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,8>>(i,8,err);
140 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
141 y.last().add(err.linf_error);
143 PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,8>>(i,16,err);
144 std::cout <<
"Particles: " << i <<
" error: " << err.linf_error << std::endl;
145 y.last().add(err.linf_error);
151 options.
title = std::string(
"PSE Laplacian convergence");
152 options.
yAxis = std::string(
"Y Axis");
153 options.
xAxis = std::string(
"X Axis");
154 options.
more = std::string(
"hAxis:{logScale: true},vAxis:{logScale: true,format: 'scientific'}");
159 cg.
write(
"PSE_plot.html");
Small class to produce graph with Google chart in HTML.
void write(std::string file)
It write the graphs on file in html format using Google charts.
void AddLinesGraph(openfpm::vector< X > &x, openfpm::vector< Y > &y, const GCoptions &opt)
Add a simple lines graph.
size_t getProcessingUnits()
Get the total number of processors.
Implementation of VCluster class.
Implementation of 1-D std::vector like structure.
std::string xAxis
X axis name.
size_t lineWidth
Width of the line.
std::string title
Title of the chart.
std::string yAxis
Y axis name.