argiope/utils.py
def _equation(nodes = (1, 2), dofs = (1, 1), coefficients = (1., 1.), 
              comment = None):
    """
    Returns an Abaqus INP formated string for a given linear equation.
    """
    N = len(nodes)
    if comment == None:
      out = ""
    else:
      out = "**EQUATION: {0}\n".format(comment)  
    out+= "*EQUATION\n  {0}\n  ".format(N)
    out += "\n  ".join([ ",".join([ str(nodes[i]), 
                                  str(int(dofs[i])), 
                                  str(coefficients[i]) ]) for i in range(N)])
    return out
def _equation(nodes = (1, 2), dofs = (1, 1), coefficients = (1., 1.), 
              comment = None):
    N = len(nodes)
    if comment == None:
      out = ""
    else:
      out = "**EQUATION: {0}\n".format(comment)  
    out+= "*EQUATION\n  {0}\n  ".format(N)
    out += "\n  ".join([ ",".join([ str(nodes[i]), 
                                  str(int(dofs[i])), 
                                  str(coefficients[i]) ]) for i in range(N)])
    return out
def _equation ( nodes = ( 1 , 2 ) , dofs = ( 1 , 1 ) , coefficients = ( 1. , 1. ) , comment = None ) : N = len ( nodes ) if comment == None : out = "" else : out = "**EQUATION: {0}\n" . format ( comment ) out += "*EQUATION\n  {0}\n  " . format ( N ) out += "\n  " . join ( [ "," . join ( [ str ( nodes [ i ] ) , str ( int ( dofs [ i ] ) ) , str ( coefficients [ i ] ) ] ) for i in range ( N ) ] ) return out
Returns an Abaqus INP formated string for a given linear equation.
Returns an Abaqus INP formated string for a given linear equation .