Skip to content
Snippets Groups Projects
Makefile 3.91 KiB
Newer Older
  • Learn to ignore specific revisions
  • #
    # C Mods Makefile
    # (c) MIT CBA Neil Gershenfeld 6/30/20
    #
    
    all: cpu gpu
    cpu: bonds_GL CPU_check particles_GL particles_STL pipe_check STL_particles strain_GL
    gpu: bonds_stress_strain GPU_check particles_bonds
    
    #
    # bonds_GL
    #
    bonds_GL: bonds_GL.cpp
    	g++ bonds_GL.cpp -o bonds_GL -O3 -ffast-math -pthread -lglfw3 -lGL -lGLEW -ldl
    #
    bonds_GL_test: STL_particles particles_bonds bonds_GL
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    	STL_particles nlattice=200 < test.stl | particles_bonds grid=32 block=32 | bonds_GL
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    # bonds_stress_strain
    #s
    
    bonds_stress_strain: bonds_stress_strain.cu
    	nvcc bonds_stress_strain.cu -o bonds_stress_strain -O3
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    #s
    bonds_stress_strain2: bonds_stress_strain2.cu
    	nvcc bonds_stress_strain2.cu -o bonds_stress_strain2 -O3
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    bonds_stress_strain_debug: bonds_stress_strain_debug.cu
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    	nvcc bonds_stress_strain_debug.cu -o bonds_stress_strain_debug -O3
    
    #
    bonds_stress_strain_test: STL_particles particles_bonds bonds_stress_strain
    	STL_particles 400 < test.stl | particles_bonds 2048 1024 | bonds_stress_strain 2048 1024 2000 0.05 100 20 0.0001 100 2>&1 | less
    
    #
    # CPU_check
    #
    CPU_check: CPU_check.cpp
    	g++ CPU_check.cpp -o CPU_check -O3 -ffast-math -pthread
    
    #
    # GPU_check
    #
    GPU_check: GPU_check.cu
    	nvcc GPU_check.cu -o GPU_check
    
    #
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    # particles_bonds
    
    #
    particles_bonds: particles_bonds.cu
    	nvcc particles_bonds.cu -o particles_bonds -O3
    
    #
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    # particles_GL
    
    #
    particles_GL: particles_GL.cpp
    	g++ particles_GL.cpp -o particles_GL -O3 -ffast-math -pthread -lglfw3 -lGL -lGLEW -ldl
    #
    particles_GL_test: STL_particles particles_GL
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    	STL_particles nlattice=200 < test.stl | particles_GL size=1
    
    
    #
    # particles_STL
    #
    particles_STL: particles_STL.cpp
    	g++ particles_STL.cpp -o particles_STL -O3 -ffast-math
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    #
    particles_STL_test: STL_particles particles_STL
    	STL_particles nlattice=100 < test.stl | particles_STL size=1 > out.stl
    
    
    #
    # pipe_check
    #
    pipe_check: pipe_check.cpp
    	g++ pipe_check.cpp -o pipe_check -O3 -ffast-math
    pipe_check_test: pipe_check
    	pipe_check 0 | pipe_check 1
    
    #
    # STL_particles
    #
    STL_particles: STL_particles.cpp
    	g++ STL_particles.cpp -o STL_particles -O3 -ffast-math
    
    #
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    # strain_GL
    
    #
    strain_GL: strain_GL.cpp
    	g++ strain_GL.cpp -o strain_GL -O3 -ffast-math -pthread -lglfw3 -lGL -lGLEW -ldl
    #
    strain_GL_test: STL_particles particles_bonds bonds_stress_strain strain_GL
    #
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    # 2014.stl Sandia fracture test
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    	STL_particles nlattice=175 < test.stl | particles_bonds grid=1024 block=1024 | bonds_stress_strain grid=512 block=512 spring=40000000 mass=1 dissipation=100 dt=0.000001 loop=100 step=+0.00005 bond=1.1 load=ycylinder xmin=37.5 zmin=23 rmin=4 xmax=37.5 zmax=40.7 rmax=4 | strain_GL size=1.5 scale=50 rx=1.57 ry=0 rz=0 sxyz=0.5 perspective=0.05
    
    #
    # 1x1x4 chiral
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    # too fast, bond breaking
    
    # 126630 particles
    #
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    #	STL_particles nlattice=100 < test.stl | particles_bonds grid=1024 block=1024 | bonds_stress_strain grid=1024 block=1024 spring=100000000 mass=0.1 dissipation=100 dt=0.00001 loop=100 step=-0.001 bond=1.01 load=zlimit percent=5 | strain_GL size=1.5 scale=200 rx=1.4 ry=0.15 rz=-0.05 sxyz=0.25 perspective=0.05
    
    #
    # 1x1x4 chiral
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    # 126630 particles
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    #	STL_particles nlattice=100 < test.stl | particles_bonds grid=1024 block=1024 | bonds_stress_strain grid=512 block=512 spring=30000000 mass=1 dissipation=100 dt=0.0001 loop=1000 bond=15 step=-0.0002 load=zlimit percent=2.5 | strain_GL size=1.5 scale=200 rx=1.55 ry=0. rz=-0.0 sxyz=0.25 perspective=0.05
    
    #
    # 1x1x4 chiral
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    # 1058444 particles
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    #	STL_particles nlattice=200 < test.stl | particles_bonds 1024 1024 | bonds_stress_strain grid=2048 block=1024 spring=100000000 mass=0.1 dissipation=100 dt=0.00001 loop=1000 fraction=0.04 step=-0.0002 bond=15 | strain_GL size=1.5 scale=200 rx=1.55 ry=0. rz=-0.0 sxyz=0.25 perspective=0
    
    #
    # coupon
    # 986154 particles
    #
    
    Amira Abdel-Rahman (admin)'s avatar
    Amira Abdel-Rahman (admin) committed
    #	STL_particles nlattice=90 < test.stl | particles_bonds 1024 1024 | bonds_stress_strain grid=1024 block=1024 spring=50000000 mass=0.02 dissipation=300 dt=0.000005 loop=1000 fraction=0.05 step=+0.00005 bond=1.25 | strain_GL size=1.5 scale=10 rx=1.57 ry=0.1 rx=0 sxyz=0.1 perspective=0