From: Wolfgang Bangerth Date: Fri, 17 Sep 2010 16:01:33 +0000 (+0000) Subject: Explicitly cast to the type we want. X-Git-Tag: v8.0.0~5458 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdc1314d0023ad1e4a43e630eaea3589eb7bd266;p=dealii.git Explicitly cast to the type we want. git-svn-id: https://svn.dealii.org/trunk@22016 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/numerics/mesh_worker_output.h b/deal.II/deal.II/include/numerics/mesh_worker_output.h index 1ae30f1ec8..7141ac5853 100644 --- a/deal.II/deal.II/include/numerics/mesh_worker_output.h +++ b/deal.II/deal.II/include/numerics/mesh_worker_output.h @@ -26,7 +26,7 @@ namespace MeshWorker { namespace Assembler { - + /** * A class that, instead of assembling into a matrix or vector, * outputs the results on a cell to a gnuplot patch. This works only @@ -53,7 +53,7 @@ namespace MeshWorker * the points. */ void initialize(unsigned int dim, unsigned int n_vectors, unsigned int n_points); - + /** * Set the stream #os to * which data is written. If @@ -62,7 +62,7 @@ namespace MeshWorker * to #deallog. */ void initialize_stream(std::ostream& stream); - + /** * Initialize the local data * in the @@ -83,14 +83,14 @@ namespace MeshWorker template void initialize_info(DoFInfo& info, bool interior_face); - + /** * Assemble the local values * into the global vectors. */ template void assemble(const DoFInfo& info); - + /** * Assemble both local values * into the global vectors. @@ -111,16 +111,16 @@ namespace MeshWorker void write(const T& t) const; void write_endl () const; - + unsigned int patch_dimension; unsigned int n_vectors; unsigned int n_points; - + std::ostream* os; }; //----------------------------------------------------------------------// - + template inline void GnuplotPatch::write(const T& d) const @@ -139,15 +139,15 @@ namespace MeshWorker else (*os) << std::endl; } - - - inline + + + inline GnuplotPatch::GnuplotPatch() : os(0) {} - - + + inline void GnuplotPatch::initialize(unsigned int dim, unsigned int np, unsigned int nv) { @@ -156,7 +156,7 @@ namespace MeshWorker n_points = np; } - + inline void GnuplotPatch::initialize_stream(std::ostream& stream) { @@ -172,14 +172,14 @@ namespace MeshWorker info.initialize_quadrature(n_points, n_vectors); } - + template inline void GnuplotPatch::assemble(const DoFInfo& info) { const unsigned int n_q_points = info.n_quadrature_points(); const unsigned int nv = info.n_quadrature_values(); - const unsigned int square_root = std::pow(n_q_points, 1./dim)+.5; + const unsigned int square_root = static_cast(std::pow(n_q_points, 1./dim)+.5); for (unsigned int k1=0; k1 inline void GnuplotPatch::assemble(const DoFInfo& /*info1*/, const DoFInfo& /*info2*/)