tmemcheck_tests.py - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
 (HTM) git clone git://src.adamsgaard.dk/sphere
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
       tmemcheck_tests.py (684B)
       ---
            1 #!/usr/bin/env python
            2 from pytestutils import *
            3 import sphere
            4 
            5 #### Input/output tests ####
            6 print("### Memory tests ###")
            7 
            8 # Generate data in python
            9 orig = sphere.sim(np = 100, nw = 1, sid = "test-initgrid")
           10 orig.generateRadii(histogram = False)
           11 orig.defaultParams()
           12 orig.initRandomGridPos()
           13 orig.initTemporal(current = 0.0, total = 0.0)
           14 orig.time_total = 2.0*orig.time_dt;
           15 orig.time_file_dt = orig.time_dt;
           16 
           17 # Test C++ routines
           18 print("Valgrind: C++ routines")
           19 orig.run(verbose=False, hideinputfile=True, valgrind=True)
           20 
           21 
           22 # Test CUDA routines
           23 print("cuda-memcheck: CUDA routines")
           24 orig.run(verbose=False, hideinputfile=True, cudamemcheck=True)
           25 
           26 # Remove temporary files
           27 cleanup(orig)