// PACKAGE : FFPUB: routines for reporting in html // PKG.TYPE: Publishing tools // VERSION : 0.1.072619 // AUTHOR : Fotios Kasolis, fotios.kasolis@gmail.com, // LICENSE : Creative Commons Attribution 4.0 International License // http://creativecommons.org/licenses/by/4.0/ bool PUBfigs = false; string PUBtimerinfo = "Solution"; macro PUBconvert(PUBfilename) { exec("inkscape -z -f \"" + PUBfilename + ".eps\" --export-dpi=128 -e \"" + PUBfilename + ".png\""); }// macro PUBopen(PUBfilename, title, author) { ofstream pubfile(PUBfilename+".html", append); pubfile << ""<< endl; pubfile << "" << endl; pubfile << "" << endl; pubfile << "" + title + "" << endl; pubfile << "" << endl; pubfile << "

" + title + "

" << endl; pubfile << "

" + author + "

" << endl; }// macro PUBclose(PUBfilename) { ofstream pubfile(PUBfilename+".html", append); pubfile << "" << endl; }// macro PUBmesh(PUBfilename, msh) { fespace pubmeshdata(msh, P0); pubmeshdata h = hTriangle; ofstream pubfile(PUBfilename+".html", append); pubfile.scientific; pubfile << "

" << Stringification(msh) << ": Mesh

" << endl; pubfile << "" << endl; pubfile << "" << endl; pubfile << "" << endl; pubfile << "" << endl; pubfile << "
AttributeValue
Number of elements" << msh.nt << "
Number of vertices " << msh.nv << "
Maximum edge length" << h[].max << "
Minimum edge size " << h[].min << "
" << endl; }// macro PUBfespace(PUBfilename, fem) { ofstream pubfile(PUBfilename+".html", append); pubfile.scientific; pubfile << "

" << Stringification(fem) << ": Finite Element Space

" << endl; pubfile << "" << endl; pubfile << "" << endl; pubfile << "
AttributeValue
Degrees of freedom" << fem.ndof << "
Degrees of freedom per element" << fem.ndofK << "
" << endl; }// macro PUBtic(PUBtimerid) { PUBtimerid = clock(); }// macro PUBtoc(PUBfilename, PUBtimerid) { ofstream pubfile(PUBfilename+".html", append); pubfile.precision(4); pubfile << "

" << Stringification(PUBtimerid) << ": Timing Information

" << endl; pubfile << "

The process you timed took " << clock() - PUBtimerid << " seconds

" << endl; ; }// macro PUBsolution(PUBfilename, PUBsolution) { ofstream pubfile(PUBfilename+".html", append); pubfile.scientific; pubfile << "

" << Stringification(PUBsolution) << ": Solution Information

" << endl; pubfile << "" << endl; pubfile << "" << endl; pubfile << "
AttributeValue
Maximum value of finite element function " << Stringification(PUBsolution) << "" << PUBsolution[].max << "
Minimum value of finite element function " << Stringification(PUBsolution) << "" << PUBsolution[].min << "
" << endl; }// macro PUBuserinfo(PUBfilename, PUBdim, PUBmeshgen, PUBelements, PUBlinsolver, PUBnonlinsolver, PUBtransient) { ofstream pubfile(PUBfilename+".html", append); pubfile.scientific; pubfile << "

General Information

" << endl; pubfile << "" << endl; pubfile << "" << endl; pubfile << "" << endl; pubfile << "" << endl; pubfile << "" << endl; pubfile << "" << endl; pubfile << "
AttributeValue
Space Dimension " << "" << PUBdim << "
Mesh Generator " << "" << PUBmeshgen << "
Finite Elements " << "" << PUBelements << "
Linear Solver " << "" << PUBlinsolver << "
Nonlinear Solver " << "" << PUBnonlinsolver << "
Time Integration " << "" << PUBtransient << "
" << endl; }// macro PUBaddfig(PUBfilename, PUBfigname) { ofstream pubfile(PUBfilename+".html", append); pubfile << "

" << endl; ; }// macro PUBremark(PUBfilename, PUBcomment) { ofstream pubfile(PUBfilename+".html", append); pubfile << "
" << endl; pubfile << "Remark." << PUBcomment << "

" << endl; pubfile << "
" << endl; }//