Loading src/functions/CMakeLists.txt +16 −6 Original line number Diff line number Diff line ADD_SUBDIRECTORY( initial_conditions ) SET( headers tnlFunctionEvaluator.h tnlFunctionEvaluator_impl.h tnlFunctionAdapter.h tnlConstantFunction.h SET( headers tnlConstantFunction.h tnlConstantFunction_impl.h tnlDomain.h tnlExactOperatorFunction.h tnlExpBumpFunction.h tnlExpBumpFunction_impl.h tnlFunctionAdapter.h tnlFunctionEvaluator.h tnlFunctionEvaluator_impl.h tnlMeshFunction.h tnlMeshFunction_impl.h tnlMeshFunctionEvaluator.h tnlMeshFunctionEvaluator_impl.h tnlMeshFunctionGnuplotWriter.h tnlMeshFunctionVTKWriter.h tnlMeshFunctionNormGetter.h tnlOperatorFunction.h tnlOperatorFunction_impl.h tnlSinBumpsFunction.h tnlSinBumpsFunction_impl.h tnlSinWaveFunction.h tnlSinWaveFunction_impl.h tnlTestFunction.h tnlDomain.h tnlTestFunction_impl.h ) SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/functions ) Loading src/functions/tnlMeshFunction.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ #include <core/tnlObject.h> #include <functions/tnlDomain.h> #include <functions/tnlMeshFunctionGnuplotWriter.h> #include <functions/tnlMeshFunctionVTKWriter.h> #ifndef TNLMESHFUNCTION_H #define TNLMESHFUNCTION_H Loading src/functions/tnlMeshFunctionGnuplotWriter.h 0 → 100644 +63 −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_H #define TNLMESHFUNCTIONGNUPLOTWRITER_H 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; } }; /*** * 1D grids cells */ template< typename MeshReal, typename Device, typename MeshIndex, typename Real > class tnlMeshFunctionGnuplotWriter< tnlMeshFunction< tnlGrid< 1, MeshReal, Device, MeshIndex >, 1, Real > { public: typedef tnlGrid< 1, MeshReal, Device, MeshIndex > MeshType; typedef Real RealType; typedef tnlMeshFunction< MeshType, 1, RealType > MeshFunctionType; bool write( const MeshFunctionType& function, const tnlString& fileName ) { } bool write( const MeshFunctionType& function, ostream& str ) { } }; #endif /* TNLMESHFUNCTIONGNUPLOTWRITER_H */ src/functions/tnlMeshFunctionVTKWriter.h 0 → 100644 +35 −0 Original line number Diff line number Diff line /*************************************************************************** tnlMeshFunctionVTKWriter.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_H #define TNLMESHFUNCTIONVTKWRITER_H template< typename MeshFunction > class tnlMeshFunctionVTKWriter { public: bool write( const MeshFunction& function ) { std::cerr << "VTK writer for mesh functions defined on mesh type " << MeshFunction::Mesh::getType() << " is not (yet) implmeneted." << std::endl; return false; } }; #endif /* TNLMESHFUNCTIONVTKWRITER_H */ src/functions/tnlMeshFunction_impl.h +4 −0 Original line number Diff line number Diff line Loading @@ -360,6 +360,10 @@ tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: write( const tnlString& fileName, const tnlString& format ) const { if( format == "vtk" ) return tnlMeshFunctionVTKWriter< ThisType >( *this ); if( format == "gnuplot" ) return tnlMeshFunctionGnuplotWriter< ThisType >( *this ); return true; } Loading Loading
src/functions/CMakeLists.txt +16 −6 Original line number Diff line number Diff line ADD_SUBDIRECTORY( initial_conditions ) SET( headers tnlFunctionEvaluator.h tnlFunctionEvaluator_impl.h tnlFunctionAdapter.h tnlConstantFunction.h SET( headers tnlConstantFunction.h tnlConstantFunction_impl.h tnlDomain.h tnlExactOperatorFunction.h tnlExpBumpFunction.h tnlExpBumpFunction_impl.h tnlFunctionAdapter.h tnlFunctionEvaluator.h tnlFunctionEvaluator_impl.h tnlMeshFunction.h tnlMeshFunction_impl.h tnlMeshFunctionEvaluator.h tnlMeshFunctionEvaluator_impl.h tnlMeshFunctionGnuplotWriter.h tnlMeshFunctionVTKWriter.h tnlMeshFunctionNormGetter.h tnlOperatorFunction.h tnlOperatorFunction_impl.h tnlSinBumpsFunction.h tnlSinBumpsFunction_impl.h tnlSinWaveFunction.h tnlSinWaveFunction_impl.h tnlTestFunction.h tnlDomain.h tnlTestFunction_impl.h ) SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/functions ) Loading
src/functions/tnlMeshFunction.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ #include <core/tnlObject.h> #include <functions/tnlDomain.h> #include <functions/tnlMeshFunctionGnuplotWriter.h> #include <functions/tnlMeshFunctionVTKWriter.h> #ifndef TNLMESHFUNCTION_H #define TNLMESHFUNCTION_H Loading
src/functions/tnlMeshFunctionGnuplotWriter.h 0 → 100644 +63 −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_H #define TNLMESHFUNCTIONGNUPLOTWRITER_H 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; } }; /*** * 1D grids cells */ template< typename MeshReal, typename Device, typename MeshIndex, typename Real > class tnlMeshFunctionGnuplotWriter< tnlMeshFunction< tnlGrid< 1, MeshReal, Device, MeshIndex >, 1, Real > { public: typedef tnlGrid< 1, MeshReal, Device, MeshIndex > MeshType; typedef Real RealType; typedef tnlMeshFunction< MeshType, 1, RealType > MeshFunctionType; bool write( const MeshFunctionType& function, const tnlString& fileName ) { } bool write( const MeshFunctionType& function, ostream& str ) { } }; #endif /* TNLMESHFUNCTIONGNUPLOTWRITER_H */
src/functions/tnlMeshFunctionVTKWriter.h 0 → 100644 +35 −0 Original line number Diff line number Diff line /*************************************************************************** tnlMeshFunctionVTKWriter.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_H #define TNLMESHFUNCTIONVTKWRITER_H template< typename MeshFunction > class tnlMeshFunctionVTKWriter { public: bool write( const MeshFunction& function ) { std::cerr << "VTK writer for mesh functions defined on mesh type " << MeshFunction::Mesh::getType() << " is not (yet) implmeneted." << std::endl; return false; } }; #endif /* TNLMESHFUNCTIONVTKWRITER_H */
src/functions/tnlMeshFunction_impl.h +4 −0 Original line number Diff line number Diff line Loading @@ -360,6 +360,10 @@ tnlMeshFunction< Mesh, MeshEntityDimensions, Real >:: write( const tnlString& fileName, const tnlString& format ) const { if( format == "vtk" ) return tnlMeshFunctionVTKWriter< ThisType >( *this ); if( format == "gnuplot" ) return tnlMeshFunctionGnuplotWriter< ThisType >( *this ); return true; } Loading