https://github.com/geodynamics/citcoms
Revision 4bfc600b0851aad9165cd2e4816359fa02a9eebc authored by Rajesh Kommu on 20 August 2014, 19:29:51 UTC, committed by Rajesh Kommu on 20 August 2014, 19:29:51 UTC
1 parent 53fbc9c
Raw File
Tip revision: 4bfc600b0851aad9165cd2e4816359fa02a9eebc authored by Rajesh Kommu on 20 August 2014, 19:29:51 UTC
commented out p_to_nodes_petsc, v_from_vector_petsc, v_from_vector_pseudo_surf_petsc, solve_constrained_flow_iterative_petsc
Tip revision: 4bfc600
citcoms_datadir
#!/usr/bin/env python

def get_var():
    # get your username on this machine, and make it upper case
    import os
    var = os.environ.get("USER")
    return var.upper()


# invariant prefix of datadir
prefix = "/scratch/"

# invariant suffix of datadir
suffix = ""

# get the machine-dependent part of datadir
var_path = get_var()

# construct the full string for datadir
print "%s%s%s" % ( prefix, var_path, suffix )
back to top