Loading src/functions/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -14,7 +14,9 @@ SET( headers tnlConstantFunction.h tnlMeshFunctionEvaluator.h tnlMeshFunctionEvaluator_impl.h tnlMeshFunctionGnuplotWriter.h tnlMeshFunctionGnuplotWriter_impl.h tnlMeshFunctionVTKWriter.h tnlMeshFunctionVTKWriter_impl.h tnlMeshFunctionNormGetter.h tnlOperatorFunction.h tnlOperatorFunction_impl.h Loading src/functions/tnlMeshFunctionGnuplotWriter.h +9 −18 Original line number Diff line number Diff line Loading @@ -18,16 +18,17 @@ #ifndef TNLMESHFUNCTIONGNUPLOTWRITER_H #define TNLMESHFUNCTIONGNUPLOTWRITER_H #include<mesh/tnlGrid.h> template< typename, int, typename > class tnlMeshFunction; template< typename MeshFunction > class tnlMeshFunctionGnuplotWriter { public: bool write( const MeshFunction& function ) { std::cerr << "Gnuplot writer for mesh functions defined on mesh type " << MeshFunction::Mesh::getType() << " is not (yet) implmeneted." << std::endl; return false; } static bool write( const MeshFunction& function, ostream& str ); }; /*** Loading @@ -44,18 +45,8 @@ class tnlMeshFunctionGnuplotWriter< tnlMeshFunction< tnlGrid< 1, MeshReal, Devic typedef Real RealType; typedef tnlMeshFunction< MeshType, 1, RealType > MeshFunctionType; bool write( const MeshFunctionType& function, const tnlString& fileName ) { } bool write( const MeshFunctionType& function, ostream& str ) { } static bool write( const MeshFunctionType& function, ostream& str ); }; Loading src/functions/tnlMeshFunctionGnuplotWriter_impl.h 0 → 100644 +44 −0 Original line number Diff line number Diff line /*************************************************************************** tnlMeshFunctionGnuplotWriter.h - description ------------------- begin : Jan 28, 2016 copyright : (C) 2016 by oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TNLMESHFUNCTIONGNUPLOTWRITER_IMPL_H #define TNLMESHFUNCTIONGNUPLOTWRITER_IMPL_H template< typename MeshFunction > tnlMeshFunctionGnuplotWriter< MeshFunction >:: bool write( const MeshFunction& function, ostream& str ) { std::cerr << "Gnuplot writer for mesh functions defined on mesh type " << MeshFunction::Mesh::getType() << " is not (yet) implmeneted." << std::endl; return false; } template< typename MeshReal, typename Device, typename MeshIndex, typename Real > bool tnlMeshFunctionGnuplotWriter< tnlMeshFunction< tnlGrid< 1, MeshReal, Device, MeshIndex >, 1, Real >:: write( const MeshFunctionType& function, ostream& str ) { } #endif /* TNLMESHFUNCTIONGNUPLOTWRITER_IMPL_H */ src/functions/tnlMeshFunctionVTKWriter_impl.h 0 → 100644 +24 −0 Original line number Diff line number Diff line /*************************************************************************** tnlMeshFunctionVTKWriter_impl.h - description ------------------- begin : Jan 28, 2016 copyright : (C) 2016 by oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TNLMESHFUNCTIONVTKWRITER_IMPL_H #define TNLMESHFUNCTIONVTKWRITER_IMPL_H #endif /* TNLMESHFUNCTIONVTKWRITER_IMPL_H */ src/functions/tnlMeshFunction_impl.h +4 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ #include <functions/tnlFunctionEvaluator.h> #include <functions/tnlMeshFunctionEvaluator.h> #include <functions/tnlMeshFunctionNormGetter.h> #include <functions/tnlMeshFunctionGnuplotWriter.h> #include <functions/tnlMeshFunctionVTKWriter.h> #ifndef TNLMESHFUNCTION_IMPL_H #define TNLMESHFUNCTION_IMPL_H Loading Loading @@ -361,9 +363,9 @@ write( const tnlString& fileName, const tnlString& format ) const { if( format == "vtk" ) return tnlMeshFunctionVTKWriter< ThisType >( *this ); return tnlMeshFunctionVTKWriter< ThisType >::write( *this, fileName ); if( format == "gnuplot" ) return tnlMeshFunctionGnuplotWriter< ThisType >( *this ); return tnlMeshFunctionGnuplotWriter< ThisType >::write( *this, fileName ); return true; } Loading Loading
src/functions/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -14,7 +14,9 @@ SET( headers tnlConstantFunction.h tnlMeshFunctionEvaluator.h tnlMeshFunctionEvaluator_impl.h tnlMeshFunctionGnuplotWriter.h tnlMeshFunctionGnuplotWriter_impl.h tnlMeshFunctionVTKWriter.h tnlMeshFunctionVTKWriter_impl.h tnlMeshFunctionNormGetter.h tnlOperatorFunction.h tnlOperatorFunction_impl.h Loading
src/functions/tnlMeshFunctionGnuplotWriter.h +9 −18 Original line number Diff line number Diff line Loading @@ -18,16 +18,17 @@ #ifndef TNLMESHFUNCTIONGNUPLOTWRITER_H #define TNLMESHFUNCTIONGNUPLOTWRITER_H #include<mesh/tnlGrid.h> template< typename, int, typename > class tnlMeshFunction; template< typename MeshFunction > class tnlMeshFunctionGnuplotWriter { public: bool write( const MeshFunction& function ) { std::cerr << "Gnuplot writer for mesh functions defined on mesh type " << MeshFunction::Mesh::getType() << " is not (yet) implmeneted." << std::endl; return false; } static bool write( const MeshFunction& function, ostream& str ); }; /*** Loading @@ -44,18 +45,8 @@ class tnlMeshFunctionGnuplotWriter< tnlMeshFunction< tnlGrid< 1, MeshReal, Devic typedef Real RealType; typedef tnlMeshFunction< MeshType, 1, RealType > MeshFunctionType; bool write( const MeshFunctionType& function, const tnlString& fileName ) { } bool write( const MeshFunctionType& function, ostream& str ) { } static bool write( const MeshFunctionType& function, ostream& str ); }; Loading
src/functions/tnlMeshFunctionGnuplotWriter_impl.h 0 → 100644 +44 −0 Original line number Diff line number Diff line /*************************************************************************** tnlMeshFunctionGnuplotWriter.h - description ------------------- begin : Jan 28, 2016 copyright : (C) 2016 by oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TNLMESHFUNCTIONGNUPLOTWRITER_IMPL_H #define TNLMESHFUNCTIONGNUPLOTWRITER_IMPL_H template< typename MeshFunction > tnlMeshFunctionGnuplotWriter< MeshFunction >:: bool write( const MeshFunction& function, ostream& str ) { std::cerr << "Gnuplot writer for mesh functions defined on mesh type " << MeshFunction::Mesh::getType() << " is not (yet) implmeneted." << std::endl; return false; } template< typename MeshReal, typename Device, typename MeshIndex, typename Real > bool tnlMeshFunctionGnuplotWriter< tnlMeshFunction< tnlGrid< 1, MeshReal, Device, MeshIndex >, 1, Real >:: write( const MeshFunctionType& function, ostream& str ) { } #endif /* TNLMESHFUNCTIONGNUPLOTWRITER_IMPL_H */
src/functions/tnlMeshFunctionVTKWriter_impl.h 0 → 100644 +24 −0 Original line number Diff line number Diff line /*************************************************************************** tnlMeshFunctionVTKWriter_impl.h - description ------------------- begin : Jan 28, 2016 copyright : (C) 2016 by oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TNLMESHFUNCTIONVTKWRITER_IMPL_H #define TNLMESHFUNCTIONVTKWRITER_IMPL_H #endif /* TNLMESHFUNCTIONVTKWRITER_IMPL_H */
src/functions/tnlMeshFunction_impl.h +4 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ #include <functions/tnlFunctionEvaluator.h> #include <functions/tnlMeshFunctionEvaluator.h> #include <functions/tnlMeshFunctionNormGetter.h> #include <functions/tnlMeshFunctionGnuplotWriter.h> #include <functions/tnlMeshFunctionVTKWriter.h> #ifndef TNLMESHFUNCTION_IMPL_H #define TNLMESHFUNCTION_IMPL_H Loading Loading @@ -361,9 +363,9 @@ write( const tnlString& fileName, const tnlString& format ) const { if( format == "vtk" ) return tnlMeshFunctionVTKWriter< ThisType >( *this ); return tnlMeshFunctionVTKWriter< ThisType >::write( *this, fileName ); if( format == "gnuplot" ) return tnlMeshFunctionGnuplotWriter< ThisType >( *this ); return tnlMeshFunctionGnuplotWriter< ThisType >::write( *this, fileName ); return true; } Loading