Loading src/TNL/Functions/MeshFunction.h +5 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,11 @@ class MeshFunction : }; template< typename Mesh, int MeshEntityDimension, typename Real > std::ostream& operator << ( std::ostream& str, const MeshFunction< Mesh, MeshEntityDimension, Real >& f ); } // namespace Functions } // namespace TNL Loading src/TNL/Functions/MeshFunction_impl.h +11 −1 Original line number Diff line number Diff line Loading @@ -571,6 +571,16 @@ setupSynchronizer( DistributedMeshType *distributedMesh ) this->synchronizer.setDistributedGrid( distributedMesh ); } template< typename Mesh, int MeshEntityDimension, typename Real > std::ostream& operator << ( std::ostream& str, const MeshFunction< Mesh, MeshEntityDimension, Real >& f ) { str << f.getData(); return str; } } // namespace Functions } // namespace TNL Loading src/UnitTests/Functions/CMakeLists.txt +12 −5 Original line number Diff line number Diff line IF( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( MeshFunctionTest MeshFunctionTest.h MeshFunctionTest.cu OPTIONS ${CXX_TESTS_FLAGS} ) TARGET_COMPILE_OPTIONS( MeshFunctionTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( MeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) CUDA_ADD_EXECUTABLE( BoundaryMeshFunctionTest BoundaryMeshFunctionTest.h BoundaryMeshFunctionTest.cu OPTIONS ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( BoundaryMeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) TARGET_COMPILE_OPTIONS( BoundaryMeshFunctionTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( BoundaryMeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) ELSE( BUILD_CUDA ) ADD_EXECUTABLE( MeshFunctionTest MeshFunctionTest.h MeshFunctionTest.cpp ) TARGET_COMPILE_OPTIONS( MeshFunctionTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( MeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) ADD_EXECUTABLE( BoundaryMeshFunctionTest BoundaryMeshFunctionTest.h BoundaryMeshFunctionTest.cpp ) TARGET_COMPILE_OPTIONS( BoundaryMeshFunctionTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( BoundaryMeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) TARGET_LINK_LIBRARIES( BoundaryMeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) ENDIF( BUILD_CUDA ) ADD_TEST( MeshFunctionTest ${EXECUTABLE_OUTPUT_PATH}/MeshFunctionTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_TEST( BoundaryMeshFunctionTest ${EXECUTABLE_OUTPUT_PATH}/BoundaryMeshFunctionTest${CMAKE_EXECUTABLE_SUFFIX} ) No newline at end of file src/UnitTests/Functions/MeshFunctionTest.cpp 0 → 100644 +11 −0 Original line number Diff line number Diff line /*************************************************************************** MeshFunctionTest.cpp - description ------------------- begin : Sep 11, 2018 copyright : (C) 2018 by oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /* See Copyright Notice in tnl/Copyright */ #include "MeshFunctionTest.h" src/UnitTests/Functions/MeshFunctionTest.cu 0 → 100644 +11 −0 Original line number Diff line number Diff line /*************************************************************************** MeshFunctionTest.cu - description ------------------- begin : Sep 11, 2018 copyright : (C) 2018 by oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /* See Copyright Notice in tnl/Copyright */ #include "MeshFunctionTest.h" Loading
src/TNL/Functions/MeshFunction.h +5 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,11 @@ class MeshFunction : }; template< typename Mesh, int MeshEntityDimension, typename Real > std::ostream& operator << ( std::ostream& str, const MeshFunction< Mesh, MeshEntityDimension, Real >& f ); } // namespace Functions } // namespace TNL Loading
src/TNL/Functions/MeshFunction_impl.h +11 −1 Original line number Diff line number Diff line Loading @@ -571,6 +571,16 @@ setupSynchronizer( DistributedMeshType *distributedMesh ) this->synchronizer.setDistributedGrid( distributedMesh ); } template< typename Mesh, int MeshEntityDimension, typename Real > std::ostream& operator << ( std::ostream& str, const MeshFunction< Mesh, MeshEntityDimension, Real >& f ) { str << f.getData(); return str; } } // namespace Functions } // namespace TNL Loading
src/UnitTests/Functions/CMakeLists.txt +12 −5 Original line number Diff line number Diff line IF( BUILD_CUDA ) CUDA_ADD_EXECUTABLE( MeshFunctionTest MeshFunctionTest.h MeshFunctionTest.cu OPTIONS ${CXX_TESTS_FLAGS} ) TARGET_COMPILE_OPTIONS( MeshFunctionTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( MeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) CUDA_ADD_EXECUTABLE( BoundaryMeshFunctionTest BoundaryMeshFunctionTest.h BoundaryMeshFunctionTest.cu OPTIONS ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( BoundaryMeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) TARGET_COMPILE_OPTIONS( BoundaryMeshFunctionTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( BoundaryMeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) ELSE( BUILD_CUDA ) ADD_EXECUTABLE( MeshFunctionTest MeshFunctionTest.h MeshFunctionTest.cpp ) TARGET_COMPILE_OPTIONS( MeshFunctionTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( MeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) ADD_EXECUTABLE( BoundaryMeshFunctionTest BoundaryMeshFunctionTest.h BoundaryMeshFunctionTest.cpp ) TARGET_COMPILE_OPTIONS( BoundaryMeshFunctionTest PRIVATE ${CXX_TESTS_FLAGS} ) TARGET_LINK_LIBRARIES( BoundaryMeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) TARGET_LINK_LIBRARIES( BoundaryMeshFunctionTest ${GTEST_BOTH_LIBRARIES} tnl ) ENDIF( BUILD_CUDA ) ADD_TEST( MeshFunctionTest ${EXECUTABLE_OUTPUT_PATH}/MeshFunctionTest${CMAKE_EXECUTABLE_SUFFIX} ) ADD_TEST( BoundaryMeshFunctionTest ${EXECUTABLE_OUTPUT_PATH}/BoundaryMeshFunctionTest${CMAKE_EXECUTABLE_SUFFIX} ) No newline at end of file
src/UnitTests/Functions/MeshFunctionTest.cpp 0 → 100644 +11 −0 Original line number Diff line number Diff line /*************************************************************************** MeshFunctionTest.cpp - description ------------------- begin : Sep 11, 2018 copyright : (C) 2018 by oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /* See Copyright Notice in tnl/Copyright */ #include "MeshFunctionTest.h"
src/UnitTests/Functions/MeshFunctionTest.cu 0 → 100644 +11 −0 Original line number Diff line number Diff line /*************************************************************************** MeshFunctionTest.cu - description ------------------- begin : Sep 11, 2018 copyright : (C) 2018 by oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /* See Copyright Notice in tnl/Copyright */ #include "MeshFunctionTest.h"