from __future__ import division

import torch
import torch.autograd as autograd
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import numpy as np
import sys
import os
import time


#
# TORCH INSTALLATION: refer to https://pytorch.org/get-started/locally/
#



def update_progress(job_title, progress):
    length = 20 # modify this to change the length
    block = int(round(length*progress))
    msg = "\r{0}: [{1}] {2}%".format(job_title, "#"*block + "-"*(length-block), round(progress*100, 2))
    if progress >= 1: msg += " DONE\r\n"
    sys.stdout.write(msg)
    sys.stdout.flush()

def cls():
    os.system('cls' if os.name=='nt' else 'clear')


cls()


################################################################################################################

# Initialize torch tensor for coordiantes 
coords_data  = [[ 0.0           , 0.0 , 0.0           ],
                [ 1.0/(2.0**0.5), 0.0 , 1.0/(2.0**0.5)],
                [ 1.0/(2.0**0.5), 0.0 ,-1.0/(2.0**0.5)],
                [ 2.0**0.5      , 0.0 , 0.0           ],
                [ 0.0           , 1.0 , 0.0           ],
                [ 1.0/(2.0**0.5), 1.0 , 1.0/(2.0**0.5)],
                [ 1.0/(2.0**0.5), 1.0 ,-1.0/(2.0**0.5)],
                [ 2.0**0.5      , 1.0 , 0.0           ],
                ] 
coords = torch.tensor(coords_data,requires_grad=True,dtype=torch.float64)


nnodes_r   = coords.size(0)
nnodes_ie  = 8 
nnodes_if  = 4 
nterms_s   = 8
ndirs      = 3
coord_sys  = 'CARTESIAN'



# Define matrix of polynomial basis terms at support nodes
val_r_data = [[ 1.0,-1.0,-1.0,-1.0, 1.0, 1.0, 1.0,-1.0],
              [ 1.0,-1.0,-1.0, 1.0,-1.0,-1.0, 1.0, 1.0],
              [ 1.0, 1.0,-1.0,-1.0,-1.0, 1.0,-1.0, 1.0],
              [ 1.0, 1.0,-1.0, 1.0, 1.0,-1.0,-1.0,-1.0],
              [ 1.0,-1.0, 1.0,-1.0, 1.0,-1.0,-1.0, 1.0],
              [ 1.0,-1.0, 1.0, 1.0,-1.0, 1.0,-1.0,-1.0],
              [ 1.0, 1.0, 1.0,-1.0,-1.0,-1.0, 1.0,-1.0],
              [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
              ] 
val_r = torch.tensor(val_r_data,requires_grad=False,dtype=torch.float64)


# Define matrices at interpolation nodes (quadrature, level = 1)
val_i_data = [[ 1.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), 1.0/3.0, 1.0/3.0, 1.0/3.0,-1.0/3.0*np.sqrt(1.0/3.0)],
              [ 1.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0/3.0,-1.0/3.0, 1.0/3.0, 1.0/3.0*np.sqrt(1.0/3.0)],
              [ 1.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0/3.0, 1.0/3.0,-1.0/3.0, 1.0/3.0*np.sqrt(1.0/3.0)],
              [ 1.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), 1.0/3.0,-1.0/3.0,-1.0/3.0,-1.0/3.0*np.sqrt(1.0/3.0)],
              [ 1.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), 1.0/3.0,-1.0/3.0,-1.0/3.0, 1.0/3.0*np.sqrt(1.0/3.0)],
              [ 1.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0/3.0, 1.0/3.0,-1.0/3.0,-1.0/3.0*np.sqrt(1.0/3.0)],
              [ 1.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0/3.0,-1.0/3.0, 1.0/3.0,-1.0/3.0*np.sqrt(1.0/3.0)],
              [ 1.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), 1.0/3.0, 1.0/3.0, 1.0/3.0, 1.0/3.0*np.sqrt(1.0/3.0)],
              ]
val_i = torch.tensor(val_i_data,requires_grad=False,dtype=torch.float64)


ddxi_i_data  = [[ 0.0,0.0,0.0,1.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),0.0, 1.0/3.0],
                [ 0.0,0.0,0.0,1.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),0.0, 1.0/3.0],
                [ 0.0,0.0,0.0,1.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),0.0,-1.0/3.0],
                [ 0.0,0.0,0.0,1.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),0.0,-1.0/3.0],
                [ 0.0,0.0,0.0,1.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),0.0,-1.0/3.0],
                [ 0.0,0.0,0.0,1.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),0.0,-1.0/3.0],
                [ 0.0,0.0,0.0,1.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),0.0, 1.0/3.0],
                [ 0.0,0.0,0.0,1.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),0.0, 1.0/3.0],
                ]
ddxi_i = torch.tensor(ddxi_i_data,requires_grad=False,dtype=torch.float64)

ddeta_i_data = [[ 0.0,1.0,0.0,0.0,-np.sqrt(1.0/3.0),0.0,-np.sqrt(1.0/3.0), 1.0/3.0],
                [ 0.0,1.0,0.0,0.0, np.sqrt(1.0/3.0),0.0,-np.sqrt(1.0/3.0),-1.0/3.0],
                [ 0.0,1.0,0.0,0.0,-np.sqrt(1.0/3.0),0.0,-np.sqrt(1.0/3.0), 1.0/3.0],
                [ 0.0,1.0,0.0,0.0, np.sqrt(1.0/3.0),0.0,-np.sqrt(1.0/3.0),-1.0/3.0],
                [ 0.0,1.0,0.0,0.0,-np.sqrt(1.0/3.0),0.0, np.sqrt(1.0/3.0),-1.0/3.0],
                [ 0.0,1.0,0.0,0.0, np.sqrt(1.0/3.0),0.0, np.sqrt(1.0/3.0), 1.0/3.0],
                [ 0.0,1.0,0.0,0.0,-np.sqrt(1.0/3.0),0.0, np.sqrt(1.0/3.0),-1.0/3.0],
                [ 0.0,1.0,0.0,0.0, np.sqrt(1.0/3.0),0.0, np.sqrt(1.0/3.0), 1.0/3.0],
                ]
ddeta_i = torch.tensor(ddeta_i_data,requires_grad=False,dtype=torch.float64)

ddzeta_i_data= [[ 0.0,0.0,1.0,0.0,0.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), 1.0/3.0],
                [ 0.0,0.0,1.0,0.0,0.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0/3.0],
                [ 0.0,0.0,1.0,0.0,0.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0/3.0],
                [ 0.0,0.0,1.0,0.0,0.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), 1.0/3.0],
                [ 0.0,0.0,1.0,0.0,0.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), 1.0/3.0],
                [ 0.0,0.0,1.0,0.0,0.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0/3.0],
                [ 0.0,0.0,1.0,0.0,0.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0/3.0],
                [ 0.0,0.0,1.0,0.0,0.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), 1.0/3.0],
                ]
ddzeta_i = torch.tensor(ddzeta_i_data,requires_grad=False,dtype=torch.float64)

# Define element interpolation nodes weights for linear element
weights_e_data = [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0] 
weights_e = torch.tensor(weights_e_data,requires_grad=False,dtype=torch.float64)


# Define val_f for each face
# Face 1, XI_MIN
val_1_data   = [[ 1.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), 1.0/3.0,-1.0/3.0],
               [ 1.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0/3.0, 1.0/3.0],
               [ 1.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0/3.0, 1.0/3.0],
               [ 1.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), 1.0/3.0,-1.0/3.0],
               ]
val_1 = torch.tensor(val_1_data,requires_grad=False,dtype=torch.float64)

# Face 2, XI_MAX
val_2_data   = [[ 1.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),1.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), 1.0/3.0, 1.0/3.0],
                [ 1.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),1.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0/3.0,-1.0/3.0],
                [ 1.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),1.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0/3.0,-1.0/3.0],
                [ 1.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),1.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), 1.0/3.0, 1.0/3.0],
                ] 
val_2 = torch.tensor(val_2_data,requires_grad=False,dtype=torch.float64)

# Face 3, ETA_MIN
val_3_data   = [[ 1.0,-1.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), 1.0/3.0, np.sqrt(1.0/3.0),-1.0/3.0],
                [ 1.0,-1.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0/3.0, np.sqrt(1.0/3.0), 1.0/3.0],
                [ 1.0,-1.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0/3.0,-np.sqrt(1.0/3.0), 1.0/3.0],
                [ 1.0,-1.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), 1.0/3.0,-np.sqrt(1.0/3.0),-1.0/3.0],
                ] 
val_3 = torch.tensor(val_3_data,requires_grad=False,dtype=torch.float64)

# Face 4, ETA_MAX
val_4_data   = [[ 1.0,1.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), 1.0/3.0,-np.sqrt(1.0/3.0), 1.0/3.0],
                [ 1.0,1.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0/3.0,-np.sqrt(1.0/3.0),-1.0/3.0],
                [ 1.0,1.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0/3.0, np.sqrt(1.0/3.0),-1.0/3.0],
                [ 1.0,1.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), 1.0/3.0, np.sqrt(1.0/3.0), 1.0/3.0],
                ]
val_4 = torch.tensor(val_4_data,requires_grad=False,dtype=torch.float64)

# Face 5, ZETA_MIN
val_5_data   = [[ 1.0,-np.sqrt(1.0/3.0),-1.0,-np.sqrt(1.0/3.0), 1.0/3.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0/3.0],
                [ 1.0,-np.sqrt(1.0/3.0),-1.0, np.sqrt(1.0/3.0),-1.0/3.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), 1.0/3.0],
                [ 1.0, np.sqrt(1.0/3.0),-1.0,-np.sqrt(1.0/3.0),-1.0/3.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), 1.0/3.0],
                [ 1.0, np.sqrt(1.0/3.0),-1.0, np.sqrt(1.0/3.0), 1.0/3.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0/3.0],
                ]
val_5 = torch.tensor(val_5_data,requires_grad=False,dtype=torch.float64)

# Face 6, ZETA_MAX
val_6_data   = [[ 1.0,-np.sqrt(1.0/3.0),1.0,-np.sqrt(1.0/3.0), 1.0/3.0,-np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0), 1.0/3.0],
                [ 1.0,-np.sqrt(1.0/3.0),1.0, np.sqrt(1.0/3.0),-1.0/3.0, np.sqrt(1.0/3.0),-np.sqrt(1.0/3.0),-1.0/3.0],
                [ 1.0, np.sqrt(1.0/3.0),1.0,-np.sqrt(1.0/3.0),-1.0/3.0,-np.sqrt(1.0/3.0), np.sqrt(1.0/3.0),-1.0/3.0],
                [ 1.0, np.sqrt(1.0/3.0),1.0, np.sqrt(1.0/3.0), 1.0/3.0, np.sqrt(1.0/3.0), np.sqrt(1.0/3.0), 1.0/3.0],
                ]
val_6 = torch.tensor(val_6_data,requires_grad=False,dtype=torch.float64)





#--------------------------------------------------------------------

# Matrix modes_to_nodes
val_r_inv = torch.inverse(val_r)


# Computes coordiantes modes
coords_modes = torch.mm(val_r_inv,coords)


# Initialized coordiantes
interp_coords = torch.mm(val_i,coords_modes)


# Initialized jacobian
jacobian = torch.empty(3,3,nnodes_ie, dtype=torch.float64) 
for inode in range(0,nnodes_ie):
    jacobian[0,0,inode] = torch.dot(ddxi_i[inode,:]   , coords_modes[:,0])
    jacobian[0,1,inode] = torch.dot(ddeta_i[inode,:]  , coords_modes[:,0])
    jacobian[0,2,inode] = torch.dot(ddzeta_i[inode,:] , coords_modes[:,0])
    jacobian[1,0,inode] = torch.dot(ddxi_i[inode,:]   , coords_modes[:,1])
    jacobian[1,1,inode] = torch.dot(ddeta_i[inode,:]  , coords_modes[:,1])
    jacobian[1,2,inode] = torch.dot(ddzeta_i[inode,:] , coords_modes[:,1])
    jacobian[2,0,inode] = torch.dot(ddxi_i[inode,:]   , coords_modes[:,2])
    jacobian[2,1,inode] = torch.dot(ddeta_i[inode,:]  , coords_modes[:,2])
    jacobian[2,2,inode] = torch.dot(ddzeta_i[inode,:] , coords_modes[:,2])
    update_progress("Computing Jacobian                 ", inode/(nnodes_ie-1))
if coord_sys == 'CYLINDRICAL':
    scaling_factor = torch.mm(val_i,coords_modes[:,0])
    for inode in range(0,nnodes_ie):
        jacobian[1,0,inode] = jacobian[1,0,inode] * scaling_factor[inode]
        jacobian[1,1,inode] = jacobian[1,1,inode] * scaling_factor[inode]
        jacobian[1,2,inode] = jacobian[1,2,inode] * scaling_factor[inode]



# Matrics and Determinant
metrics = torch.empty(3,3,nnodes_ie, dtype=torch.float64) 
jinv    = torch.empty(nnodes_ie, dtype=torch.float64) 
for inode in range(0,nnodes_ie):
    ijacobian = torch.empty(3,3, dtype=torch.float64)
    imetric   = torch.empty(3,3, dtype=torch.float64)
    for irow in range(0,3):
        for icol in range(0,3):
            ijacobian[irow,icol] = jacobian[irow,icol,inode]
    # Compute jacobian for the ith node
    update_progress("Computing Jinv and Metric          ", inode/(nnodes_ie-1))
    jinv[inode] = torch.det(ijacobian) 
    imetric     = torch.inverse(ijacobian)
    for irow in range(0,3):
        for icol in range(0,3):
            metrics[irow,icol,inode] = imetric[irow,icol]

 
# Compute inverse Mass matrix
invmass = torch.empty(nterms_s,nterms_s,nnodes_ie, dtype=torch.float64)
mass    = torch.empty(nterms_s,nterms_s,nnodes_ie, dtype=torch.float64)
val_tmp = torch.empty(nterms_s,nnodes_ie, dtype=torch.float64)
i = 1
for iterm in range(0,nterms_s):
    for inode in range(0,nnodes_ie):
        val_tmp[inode,iterm] = val_i[inode,iterm] * weights_e[inode] * jinv[inode]
        update_progress("Computing invmass                  ", i/(nterms_s*nnodes_ie))
        i += 1
mass    = torch.mm(torch.t(val_tmp),val_i)
invmass = torch.inverse(mass)


# Compute BR2_VOL for each face
br2_vol_face1 = torch.mm(val_i,torch.mm(invmass,torch.t(val_1)))
br2_vol_face2 = torch.mm(val_i,torch.mm(invmass,torch.t(val_2)))
br2_vol_face3 = torch.mm(val_i,torch.mm(invmass,torch.t(val_3)))
br2_vol_face4 = torch.mm(val_i,torch.mm(invmass,torch.t(val_4)))
br2_vol_face5 = torch.mm(val_i,torch.mm(invmass,torch.t(val_5)))
br2_vol_face6 = torch.mm(val_i,torch.mm(invmass,torch.t(val_6)))
update_progress("Computing br2_vol                  ", 1)


# Compute BR2_FACE for each face
br2_face_face1 = torch.mm(val_1,torch.mm(invmass,torch.t(val_1)))
br2_face_face2 = torch.mm(val_2,torch.mm(invmass,torch.t(val_2)))
br2_face_face3 = torch.mm(val_3,torch.mm(invmass,torch.t(val_3)))
br2_face_face4 = torch.mm(val_4,torch.mm(invmass,torch.t(val_4)))
br2_face_face5 = torch.mm(val_5,torch.mm(invmass,torch.t(val_5)))
br2_face_face6 = torch.mm(val_6,torch.mm(invmass,torch.t(val_6)))
update_progress("Computing br2_face                 ", 1)


# Grad1, Grad2, and Grad3
grad1 = torch.empty(nnodes_ie,nterms_s, dtype=torch.float64)
grad2 = torch.empty(nnodes_ie,nterms_s, dtype=torch.float64)
grad3 = torch.empty(nnodes_ie,nterms_s, dtype=torch.float64)
i = 1
for iterm in range(0,nterms_s):
    for inode in range(0,nnodes_ie):
        grad1[inode,iterm] = metrics[0,0,inode] * ddxi_i[inode,iterm] + metrics[1,0,inode] * ddeta_i[inode,iterm] + metrics[2,0,inode] * ddzeta_i[inode,iterm] 
        grad2[inode,iterm] = metrics[0,1,inode] * ddxi_i[inode,iterm] + metrics[1,1,inode] * ddeta_i[inode,iterm] + metrics[2,1,inode] * ddzeta_i[inode,iterm] 
        grad3[inode,iterm] = metrics[0,2,inode] * ddxi_i[inode,iterm] + metrics[1,2,inode] * ddeta_i[inode,iterm] + metrics[2,2,inode] * ddzeta_i[inode,iterm] 
        update_progress("Computing grad1, grad2, grad3      ", i/(nnodes_ie*nterms_s))
        i += 1







#WRITE_____________________

#
# Metrics
#
f = open("metrics.txt","w")
i = 1
for inode in range (0,nnodes_ie):
    f.write("Metric interpolation node %d \n" % (inode+1))
    array = np.zeros([3, 3])
    for irow in range(0,3):
        for icol in range(0,3):
            array[irow,icol] = metrics[irow,icol,inode].item() 
            update_progress("Writing metrics to file            ", i/(nnodes_ie*9))
            i += 1
    np.savetxt(f,array)
f.close()

#
# jinv
#
f = open("jinv.txt","w")
array = np.zeros([1])
i = 1
for inode in range (0,nnodes_ie):
    f.write("Jinv interpolation node %d \n" % (inode+1))
    array[0] = jinv[inode].item()
    np.savetxt(f,array)
    update_progress("Writing jinv to file               ", i/(nnodes_ie))
    i += 1
f.close()

#
# Grad1
#
f = open("grad1.txt","w")
f.write("Grad1 \n")
array = np.zeros([nnodes_ie,nterms_s])
i = 1
for inode in range (0,nnodes_ie):
    for iterm in range(0,nterms_s):
        array[inode,iterm] = grad1[inode,iterm].item()
        update_progress("Writing grad1 to file              ", i/(nnodes_ie*nterms_s))
        i += 1
np.savetxt(f,array)
f.close()

#
# Grad2
#
f = open("grad2.txt","w")
f.write("Grad2 \n")
array = np.zeros([nnodes_ie,nterms_s])
i = 1
for inode in range (0,nnodes_ie):
    for iterm in range(0,nterms_s):
        array[inode,iterm] = grad2[inode,iterm].item()
        update_progress("Writing grad2 to file              ", i/(nnodes_ie*nterms_s))
        i += 1
np.savetxt(f,array)
f.close()

#
# Grad3
#
f = open("grad3.txt","w")
f.write("Grad3 \n")
array = np.zeros([nnodes_ie,nterms_s])
i = 1
for inode in range (0,nnodes_ie):
    for iterm in range(0,nterms_s):
        array[inode,iterm] = grad3[inode,iterm].item()
        update_progress("Writing grad3 to file              ", i/(nnodes_ie*nterms_s))
        i += 1
np.savetxt(f,array)
f.close()

#
# dmetric_dx
#
f = open("dmetric_dx.txt","w")
i = 1
for inode in range (0,nnodes_ie):
    for inode_diff in range(0,nnodes_r):
        for idir in range(0,ndirs):
            array = np.zeros([3,3])
            f.write("dmetric_dx interpolation node %s, diff_node %s, diff_dir %s \n" % (inode+1,inode_diff+1,idir+1))
            for irow in range(0,3):
                for icol in range(0,3):
                    data = metrics[irow,icol,inode]
                    data.backward(retain_graph=True)
                    ddata = coords.grad
                    ddata_np = ddata.numpy()
                    array[irow,icol] = ddata_np[inode_diff,idir]
                    update_progress("Writing dmetric_dx to file         ", i/(nnodes_ie*nnodes_r*ndirs*3*3))
                    # This avoid to accumulate derivatives
                    dummy = coords.grad.data.zero_()
                    i += 1
            np.savetxt(f,array)
f.close()

#
# interp_coords_dx
#
f = open("dinterp_xcoords_dx.txt","w")
i = 1
f.write("xcoord interpolation, coord 1,  row=node, col=nnodes_r*dir \n")
array = np.zeros([nnodes_ie,nnodes_r*ndirs])
for inode in range (0,nnodes_ie):
    data = interp_coords[inode,0]
    data.backward(retain_graph=True)
    ddata = coords.grad
    ddata_np = ddata.numpy()
    for inode_diff in range(0,nnodes_r):
        for idir in range(0,ndirs):
            if idir == 0:
                index = inode_diff
            elif idir == 1:
                index = nnodes_r + inode_diff
            elif idir == 2:
                index = 2*nnodes_r + inode_diff
            array[inode,index] = ddata_np[inode_diff,idir]
            update_progress("Writing interp_xcoords_dx to file  ", i/(nnodes_ie*nnodes_r*3))
            i += 1
    # This avoid to accumulate derivatives
    dummy = coords.grad.data.zero_()
np.savetxt(f,array)
f.close()
f = open("dinterp_ycoords_dx.txt","w")
i = 1
f.write("ycoord interpolation, coord 2,  row=node, col=nnodes_r*dir \n")
array = np.zeros([nnodes_ie,nnodes_r*ndirs])
for inode in range (0,nnodes_ie):
    data = interp_coords[inode,1]
    data.backward(retain_graph=True)
    ddata = coords.grad
    ddata_np = ddata.numpy()
    for inode_diff in range(0,nnodes_r):
        for idir in range(0,ndirs):
            if idir == 0:
                index = inode_diff
            elif idir == 1:
                index = nnodes_r + inode_diff
            elif idir == 2:
                index = 2*nnodes_r + inode_diff
            array[inode,index] = ddata_np[inode_diff,idir]
            update_progress("Writing interp_ycoords_dx to file  ", i/(nnodes_ie*nnodes_r*3))
            i += 1
    # This avoid to accumulate derivatives
    dummy = coords.grad.data.zero_()
np.savetxt(f,array)
f.close()
f = open("dinterp_zcoords_dx.txt","w")
i = 1
f.write("zcoord interpolation, coord 3,  row=node, col=nnodes_r*dir \n")
array = np.zeros([nnodes_ie,nnodes_r*ndirs])
for inode in range (0,nnodes_ie):
    data = interp_coords[inode,2]
    data.backward(retain_graph=True)
    ddata = coords.grad
    ddata_np = ddata.numpy()
    for inode_diff in range(0,nnodes_r):
        for idir in range(0,ndirs):
            if idir == 0:
                index = inode_diff
            elif idir == 1:
                index = nnodes_r + inode_diff
            elif idir == 2:
                index = 2*nnodes_r + inode_diff
            array[inode,index] = ddata_np[inode_diff,idir]
            update_progress("Writing interp_zcoords_dx to file  ", i/(nnodes_ie*nnodes_r*3))
            i += 1
    # This avoid to accumulate derivatives
    dummy = coords.grad.data.zero_()
np.savetxt(f,array)
f.close()

#
# djinv_dx
#
f = open("djinv_dx.txt","w")
i = 1
for inode in range (0,nnodes_ie):
    array = np.zeros([nnodes_r,ndirs])
    f.write("djinv_dx interpolation node %s, row=inode_diff, col=dir \n" % (inode+1))
    for inode_diff in range(0,nnodes_r):
        for idir in range(0,ndirs):
                data = jinv[inode]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[inode_diff,idir] = ddata_np[inode_diff,idir]
                update_progress("Writing djinv_dx to file           ", i/(nnodes_ie*nnodes_r*ndirs))
                dummy = coords.grad.data.zero_()
                i += 1
    np.savetxt(f,array)
f.close()

#
# dmass_dx
# 
f = open("dmass_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dmass_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nterms_s,nterms_s])
        for irow in range(0,nterms_s):
            for icol in range(0,nterms_s):
                data = mass[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dmass_dx to file           ", i/(nterms_s*nnodes_r*ndirs*nterms_s))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()

#
# dinvmass_dx
# 
f = open("dinvmass_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dinvmass_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nterms_s,nterms_s])
        for irow in range(0,nterms_s):
            for icol in range(0,nterms_s):
                data = invmass[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dinvmass_dx to file        ", i/(nterms_s*nnodes_r*ndirs*nterms_s))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()

#
# dbr2_vol_dx
#
# 
f = open("dbr2_vol_face1_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_vol_face1_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_ie,nnodes_if])
        for irow in range(0,nnodes_ie):
            for icol in range(0,nnodes_if):
                data = br2_vol_face1[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_vol_face1_dx to file  ", i/(nnodes_ie*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()
f = open("dbr2_vol_face2_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_vol_face2_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_ie,nnodes_if])
        for irow in range(0,nnodes_ie):
            for icol in range(0,nnodes_if):
                data = br2_vol_face2[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_vol_face2_dx to file  ", i/(nnodes_ie*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()
f = open("dbr2_vol_face3_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_vol_face3_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_ie,nnodes_if])
        for irow in range(0,nnodes_ie):
            for icol in range(0,nnodes_if):
                data = br2_vol_face3[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_vol_face3_dx to file  ", i/(nnodes_ie*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()
f = open("dbr2_vol_face4_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_vol_face4_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_ie,nnodes_if])
        for irow in range(0,nnodes_ie):
            for icol in range(0,nnodes_if):
                data = br2_vol_face4[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_vol_face4_dx to file  ", i/(nnodes_ie*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()
f = open("dbr2_vol_face5_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_vol_face5_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_ie,nnodes_if])
        for irow in range(0,nnodes_ie):
            for icol in range(0,nnodes_if):
                data = br2_vol_face5[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_vol_face5_dx to file  ", i/(nnodes_ie*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()
f = open("dbr2_vol_face6_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_vol_face6_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_ie,nnodes_if])
        for irow in range(0,nnodes_ie):
            for icol in range(0,nnodes_if):
                data = br2_vol_face6[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_vol_face6_dx to file  ", i/(nnodes_ie*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()

#
# dbr2_face_dx
#
# 
f = open("dbr2_face_face1_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_face_face1_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_if,nnodes_if])
        for irow in range(0,nnodes_if):
            for icol in range(0,nnodes_if):
                data = br2_face_face1[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_face_face1_dx to file ", i/(nnodes_if*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()
f = open("dbr2_face_face2_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_face_face2_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_if,nnodes_if])
        for irow in range(0,nnodes_if):
            for icol in range(0,nnodes_if):
                data = br2_face_face2[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_face_face2_dx to file ", i/(nnodes_if*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()
f = open("dbr2_face_face3_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_face_face3_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_if,nnodes_if])
        for irow in range(0,nnodes_if):
            for icol in range(0,nnodes_if):
                data = br2_face_face3[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_face_face3_dx to file ", i/(nnodes_if*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()
f = open("dbr2_face_face4_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_face_face4_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_if,nnodes_if])
        for irow in range(0,nnodes_if):
            for icol in range(0,nnodes_if):
                data = br2_face_face4[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_face_face4_dx to file ", i/(nnodes_if*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()
f = open("dbr2_face_face5_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_face_face5_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_if,nnodes_if])
        for irow in range(0,nnodes_if):
            for icol in range(0,nnodes_if):
                data = br2_face_face5[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_face_face5_dx to file ", i/(nnodes_if*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()
f = open("dbr2_face_face6_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dbr2_face_face6_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_if,nnodes_if])
        for irow in range(0,nnodes_if):
            for icol in range(0,nnodes_if):
                data = br2_face_face6[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dbr2_face_face6_dx to file ", i/(nnodes_if*nnodes_r*ndirs*nnodes_if))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()

#
# dgrad1_dx
#
f = open("dgrad1_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dgrad1_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_ie,nterms_s])
        for irow in range(0,nnodes_ie):
            for icol in range(0,nterms_s):
                data = grad1[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dgrad1_dx to file          ", i/(nnodes_ie*nnodes_r*ndirs*nterms_s))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()

#
# dgrad2_dx
#
f = open("dgrad2_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dgrad2_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_ie,nterms_s])
        for irow in range(0,nnodes_ie):
            for icol in range(0,nterms_s):
                data = grad2[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dgrad2_dx to file          ", i/(nnodes_ie*nnodes_r*ndirs*nterms_s))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()

#
# dgrad3_dx
#
f = open("dgrad3_dx.txt","w")
i = 1
for inode_diff in range(0,nnodes_r):
    for idir in range(0,ndirs):
        f.write("dgrad3_dx => diff_node %s, diff_dir %s \n" % (inode_diff+1,idir+1))
        array = np.zeros([nnodes_ie,nterms_s])
        for irow in range(0,nnodes_ie):
            for icol in range(0,nterms_s):
                data = grad3[irow,icol]
                data.backward(retain_graph=True)
                ddata = coords.grad
                ddata_np = ddata.numpy()
                array[irow,icol] = ddata_np[inode_diff,idir]
                update_progress("Writing dgrad3_dx to file          ", i/(nnodes_ie*nnodes_r*ndirs*nterms_s))
                dummy = coords.grad.data.zero_()
                i += 1
        np.savetxt(f,array)
f.close()









[((1336, 1402), 'torch.tensor', 'torch.tensor', (['coords_data'], {'requires_grad': '(True)', 'dtype': 'torch.float64'}), '(coords_data, requires_grad=True, dtype=torch.float64)\n', (1348, 1402), False, 'import torch\n'), ((2061, 2127), 'torch.tensor', 'torch.tensor', (['val_r_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(val_r_data, requires_grad=False, dtype=torch.float64)\n', (2073, 2127), False, 'import torch\n'), ((3249, 3315), 'torch.tensor', 'torch.tensor', (['val_i_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(val_i_data, requires_grad=False, dtype=torch.float64)\n', (3261, 3315), False, 'import torch\n'), ((4023, 4090), 'torch.tensor', 'torch.tensor', (['ddxi_i_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(ddxi_i_data, requires_grad=False, dtype=torch.float64)\n', (4035, 4090), False, 'import torch\n'), ((4798, 4866), 'torch.tensor', 'torch.tensor', (['ddeta_i_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(ddeta_i_data, requires_grad=False, dtype=torch.float64)\n', (4810, 4866), False, 'import torch\n'), ((5575, 5644), 'torch.tensor', 'torch.tensor', (['ddzeta_i_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(ddzeta_i_data, requires_grad=False, dtype=torch.float64)\n', (5587, 5644), False, 'import torch\n'), ((5772, 5842), 'torch.tensor', 'torch.tensor', (['weights_e_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(weights_e_data, requires_grad=False, dtype=torch.float64)\n', (5784, 5842), False, 'import torch\n'), ((6387, 6453), 'torch.tensor', 'torch.tensor', (['val_1_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(val_1_data, requires_grad=False, dtype=torch.float64)\n', (6399, 6453), False, 'import torch\n'), ((6969, 7035), 'torch.tensor', 'torch.tensor', (['val_2_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(val_2_data, requires_grad=False, dtype=torch.float64)\n', (6981, 7035), False, 'import torch\n'), ((7556, 7622), 'torch.tensor', 'torch.tensor', (['val_3_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(val_3_data, requires_grad=False, dtype=torch.float64)\n', (7568, 7622), False, 'import torch\n'), ((8138, 8204), 'torch.tensor', 'torch.tensor', (['val_4_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(val_4_data, requires_grad=False, dtype=torch.float64)\n', (8150, 8204), False, 'import torch\n'), ((8725, 8791), 'torch.tensor', 'torch.tensor', (['val_5_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(val_5_data, requires_grad=False, dtype=torch.float64)\n', (8737, 8791), False, 'import torch\n'), ((9308, 9374), 'torch.tensor', 'torch.tensor', (['val_6_data'], {'requires_grad': '(False)', 'dtype': 'torch.float64'}), '(val_6_data, requires_grad=False, dtype=torch.float64)\n', (9320, 9374), False, 'import torch\n'), ((9485, 9505), 'torch.inverse', 'torch.inverse', (['val_r'], {}), '(val_r)\n', (9498, 9505), False, 'import torch\n'), ((9552, 9579), 'torch.mm', 'torch.mm', (['val_r_inv', 'coords'], {}), '(val_r_inv, coords)\n', (9560, 9579), False, 'import torch\n'), ((9623, 9652), 'torch.mm', 'torch.mm', (['val_i', 'coords_modes'], {}), '(val_i, coords_modes)\n', (9631, 9652), False, 'import torch\n'), ((9688, 9737), 'torch.empty', 'torch.empty', (['(3)', '(3)', 'nnodes_ie'], {'dtype': 'torch.float64'}), '(3, 3, nnodes_ie, dtype=torch.float64)\n', (9699, 9737), False, 'import torch\n'), ((10909, 10958), 'torch.empty', 'torch.empty', (['(3)', '(3)', 'nnodes_ie'], {'dtype': 'torch.float64'}), '(3, 3, nnodes_ie, dtype=torch.float64)\n', (10920, 10958), False, 'import torch\n'), ((10968, 11011), 'torch.empty', 'torch.empty', (['nnodes_ie'], {'dtype': 'torch.float64'}), '(nnodes_ie, dtype=torch.float64)\n', (10979, 11011), False, 'import torch\n'), ((11639, 11702), 'torch.empty', 'torch.empty', (['nterms_s', 'nterms_s', 'nnodes_ie'], {'dtype': 'torch.float64'}), '(nterms_s, nterms_s, nnodes_ie, dtype=torch.float64)\n', (11650, 11702), False, 'import torch\n'), ((11711, 11774), 'torch.empty', 'torch.empty', (['nterms_s', 'nterms_s', 'nnodes_ie'], {'dtype': 'torch.float64'}), '(nterms_s, nterms_s, nnodes_ie, dtype=torch.float64)\n', (11722, 11774), False, 'import torch\n'), ((11783, 11836), 'torch.empty', 'torch.empty', (['nterms_s', 'nnodes_ie'], {'dtype': 'torch.float64'}), '(nterms_s, nnodes_ie, dtype=torch.float64)\n', (11794, 11836), False, 'import torch\n'), ((12149, 12168), 'torch.inverse', 'torch.inverse', (['mass'], {}), '(mass)\n', (12162, 12168), False, 'import torch\n'), ((13176, 13229), 'torch.empty', 'torch.empty', (['nnodes_ie', 'nterms_s'], {'dtype': 'torch.float64'}), '(nnodes_ie, nterms_s, dtype=torch.float64)\n', (13187, 13229), False, 'import torch\n'), ((13237, 13290), 'torch.empty', 'torch.empty', (['nnodes_ie', 'nterms_s'], {'dtype': 'torch.float64'}), '(nnodes_ie, nterms_s, dtype=torch.float64)\n', (13248, 13290), False, 'import torch\n'), ((13298, 13351), 'torch.empty', 'torch.empty', (['nnodes_ie', 'nterms_s'], {'dtype': 'torch.float64'}), '(nnodes_ie, nterms_s, dtype=torch.float64)\n', (13309, 13351), False, 'import torch\n'), ((14520, 14533), 'numpy.zeros', 'np.zeros', (['[1]'], {}), '([1])\n', (14528, 14533), True, 'import numpy as np\n'), ((14851, 14882), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nterms_s]'], {}), '([nnodes_ie, nterms_s])\n', (14859, 14882), True, 'import numpy as np\n'), ((15115, 15135), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (15125, 15135), True, 'import numpy as np\n'), ((15212, 15243), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nterms_s]'], {}), '([nnodes_ie, nterms_s])\n', (15220, 15243), True, 'import numpy as np\n'), ((15476, 15496), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (15486, 15496), True, 'import numpy as np\n'), ((15573, 15604), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nterms_s]'], {}), '([nnodes_ie, nterms_s])\n', (15581, 15604), True, 'import numpy as np\n'), ((15837, 15857), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (15847, 15857), True, 'import numpy as np\n'), ((16958, 16997), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nnodes_r * ndirs]'], {}), '([nnodes_ie, nnodes_r * ndirs])\n', (16966, 16997), True, 'import numpy as np\n'), ((17692, 17712), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (17702, 17712), True, 'import numpy as np\n'), ((17848, 17887), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nnodes_r * ndirs]'], {}), '([nnodes_ie, nnodes_r * ndirs])\n', (17856, 17887), True, 'import numpy as np\n'), ((18582, 18602), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (18592, 18602), True, 'import numpy as np\n'), ((18738, 18777), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nnodes_r * ndirs]'], {}), '([nnodes_ie, nnodes_r * ndirs])\n', (18746, 18777), True, 'import numpy as np\n'), ((19472, 19492), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (19482, 19492), True, 'import numpy as np\n'), ((577, 598), 'sys.stdout.write', 'sys.stdout.write', (['msg'], {}), '(msg)\n', (593, 598), False, 'import sys\n'), ((603, 621), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n', (619, 621), False, 'import sys\n'), ((638, 686), 'os.system', 'os.system', (["('cls' if os.name == 'nt' else 'clear')"], {}), "('cls' if os.name == 'nt' else 'clear')\n", (647, 686), False, 'import os\n'), ((9796, 9847), 'torch.dot', 'torch.dot', (['ddxi_i[(inode), :]', 'coords_modes[:, (0)]'], {}), '(ddxi_i[(inode), :], coords_modes[:, (0)])\n', (9805, 9847), False, 'import torch\n'), ((9871, 9923), 'torch.dot', 'torch.dot', (['ddeta_i[(inode), :]', 'coords_modes[:, (0)]'], {}), '(ddeta_i[(inode), :], coords_modes[:, (0)])\n', (9880, 9923), False, 'import torch\n'), ((9946, 9999), 'torch.dot', 'torch.dot', (['ddzeta_i[(inode), :]', 'coords_modes[:, (0)]'], {}), '(ddzeta_i[(inode), :], coords_modes[:, (0)])\n', (9955, 9999), False, 'import torch\n'), ((10021, 10072), 'torch.dot', 'torch.dot', (['ddxi_i[(inode), :]', 'coords_modes[:, (1)]'], {}), '(ddxi_i[(inode), :], coords_modes[:, (1)])\n', (10030, 10072), False, 'import torch\n'), ((10096, 10148), 'torch.dot', 'torch.dot', (['ddeta_i[(inode), :]', 'coords_modes[:, (1)]'], {}), '(ddeta_i[(inode), :], coords_modes[:, (1)])\n', (10105, 10148), False, 'import torch\n'), ((10171, 10224), 'torch.dot', 'torch.dot', (['ddzeta_i[(inode), :]', 'coords_modes[:, (1)]'], {}), '(ddzeta_i[(inode), :], coords_modes[:, (1)])\n', (10180, 10224), False, 'import torch\n'), ((10246, 10297), 'torch.dot', 'torch.dot', (['ddxi_i[(inode), :]', 'coords_modes[:, (2)]'], {}), '(ddxi_i[(inode), :], coords_modes[:, (2)])\n', (10255, 10297), False, 'import torch\n'), ((10321, 10373), 'torch.dot', 'torch.dot', (['ddeta_i[(inode), :]', 'coords_modes[:, (2)]'], {}), '(ddeta_i[(inode), :], coords_modes[:, (2)])\n', (10330, 10373), False, 'import torch\n'), ((10396, 10449), 'torch.dot', 'torch.dot', (['ddzeta_i[(inode), :]', 'coords_modes[:, (2)]'], {}), '(ddzeta_i[(inode), :], coords_modes[:, (2)])\n', (10405, 10449), False, 'import torch\n'), ((10577, 10614), 'torch.mm', 'torch.mm', (['val_i', 'coords_modes[:, (0)]'], {}), '(val_i, coords_modes[:, (0)])\n', (10585, 10614), False, 'import torch\n'), ((11062, 11100), 'torch.empty', 'torch.empty', (['(3)', '(3)'], {'dtype': 'torch.float64'}), '(3, 3, dtype=torch.float64)\n', (11073, 11100), False, 'import torch\n'), ((11116, 11154), 'torch.empty', 'torch.empty', (['(3)', '(3)'], {'dtype': 'torch.float64'}), '(3, 3, dtype=torch.float64)\n', (11127, 11154), False, 'import torch\n'), ((11413, 11433), 'torch.det', 'torch.det', (['ijacobian'], {}), '(ijacobian)\n', (11422, 11433), False, 'import torch\n'), ((11453, 11477), 'torch.inverse', 'torch.inverse', (['ijacobian'], {}), '(ijacobian)\n', (11466, 11477), False, 'import torch\n'), ((12115, 12131), 'torch.t', 'torch.t', (['val_tmp'], {}), '(val_tmp)\n', (12122, 12131), False, 'import torch\n'), ((14197, 14213), 'numpy.zeros', 'np.zeros', (['[3, 3]'], {}), '([3, 3])\n', (14205, 14213), True, 'import numpy as np\n'), ((14445, 14465), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (14455, 14465), True, 'import numpy as np\n'), ((14669, 14689), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (14679, 14689), True, 'import numpy as np\n'), ((19599, 19626), 'numpy.zeros', 'np.zeros', (['[nnodes_r, ndirs]'], {}), '([nnodes_r, ndirs])\n', (19607, 19626), True, 'import numpy as np\n'), ((20194, 20214), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (20204, 20214), True, 'import numpy as np\n'), ((2379, 2397), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2386, 2397), True, 'import numpy as np\n'), ((2472, 2490), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2479, 2490), True, 'import numpy as np\n'), ((2601, 2619), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2608, 2619), True, 'import numpy as np\n'), ((2637, 2655), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2644, 2655), True, 'import numpy as np\n'), ((2748, 2766), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2755, 2766), True, 'import numpy as np\n'), ((2877, 2895), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2884, 2895), True, 'import numpy as np\n'), ((2895, 2913), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2902, 2913), True, 'import numpy as np\n'), ((2988, 3006), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2995, 3006), True, 'import numpy as np\n'), ((3006, 3024), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3013, 3024), True, 'import numpy as np\n'), ((3117, 3135), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3124, 3135), True, 'import numpy as np\n'), ((3135, 3153), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3142, 3153), True, 'import numpy as np\n'), ((3153, 3171), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3160, 3171), True, 'import numpy as np\n'), ((3521, 3539), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3528, 3539), True, 'import numpy as np\n'), ((3606, 3624), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3613, 3624), True, 'import numpy as np\n'), ((3709, 3727), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3716, 3727), True, 'import numpy as np\n'), ((3794, 3812), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3801, 3812), True, 'import numpy as np\n'), ((3861, 3879), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3868, 3879), True, 'import numpy as np\n'), ((3879, 3897), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3886, 3897), True, 'import numpy as np\n'), ((3946, 3964), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3953, 3964), True, 'import numpy as np\n'), ((3964, 3982), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3971, 3982), True, 'import numpy as np\n'), ((4210, 4228), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4217, 4228), True, 'import numpy as np\n'), ((4380, 4398), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4387, 4398), True, 'import numpy as np\n'), ((4487, 4505), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4494, 4505), True, 'import numpy as np\n'), ((4550, 4568), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4557, 4568), True, 'import numpy as np\n'), ((4572, 4590), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4579, 4590), True, 'import numpy as np\n'), ((4657, 4675), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4664, 4675), True, 'import numpy as np\n'), ((4720, 4738), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4727, 4738), True, 'import numpy as np\n'), ((4742, 4760), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4749, 4760), True, 'import numpy as np\n'), ((4990, 5008), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4997, 5008), True, 'import numpy as np\n'), ((5093, 5111), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5100, 5111), True, 'import numpy as np\n'), ((5160, 5178), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5167, 5178), True, 'import numpy as np\n'), ((5178, 5196), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5185, 5196), True, 'import numpy as np\n'), ((5330, 5348), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5337, 5348), True, 'import numpy as np\n'), ((5433, 5451), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5440, 5451), True, 'import numpy as np\n'), ((5500, 5518), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5507, 5518), True, 'import numpy as np\n'), ((5518, 5536), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5525, 5536), True, 'import numpy as np\n'), ((5953, 5971), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5960, 5971), True, 'import numpy as np\n'), ((5971, 5989), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5978, 5989), True, 'import numpy as np\n'), ((6030, 6048), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6037, 6048), True, 'import numpy as np\n'), ((6089, 6107), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6096, 6107), True, 'import numpy as np\n'), ((6166, 6184), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6173, 6184), True, 'import numpy as np\n'), ((6189, 6207), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6196, 6207), True, 'import numpy as np\n'), ((6266, 6284), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6273, 6284), True, 'import numpy as np\n'), ((6284, 6302), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6291, 6302), True, 'import numpy as np\n'), ((6611, 6629), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6618, 6629), True, 'import numpy as np\n'), ((6651, 6669), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6658, 6669), True, 'import numpy as np\n'), ((6747, 6765), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6754, 6765), True, 'import numpy as np\n'), ((6787, 6805), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6794, 6805), True, 'import numpy as np\n'), ((6847, 6865), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6854, 6865), True, 'import numpy as np\n'), ((6865, 6883), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6872, 6883), True, 'import numpy as np\n'), ((6887, 6905), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6894, 6905), True, 'import numpy as np\n'), ((6905, 6923), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6912, 6923), True, 'import numpy as np\n'), ((7117, 7135), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7124, 7135), True, 'import numpy as np\n'), ((7144, 7162), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7151, 7162), True, 'import numpy as np\n'), ((7218, 7236), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7225, 7236), True, 'import numpy as np\n'), ((7263, 7281), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7270, 7281), True, 'import numpy as np\n'), ((7319, 7337), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7326, 7337), True, 'import numpy as np\n'), ((7355, 7373), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7362, 7373), True, 'import numpy as np\n'), ((7438, 7456), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7445, 7456), True, 'import numpy as np\n'), ((7456, 7474), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7463, 7474), True, 'import numpy as np\n'), ((7803, 7821), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7810, 7821), True, 'import numpy as np\n'), ((7821, 7839), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7828, 7839), True, 'import numpy as np\n'), ((7903, 7921), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7910, 7921), True, 'import numpy as np\n'), ((7966, 7984), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7973, 7984), True, 'import numpy as np\n'), ((8021, 8039), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8028, 8039), True, 'import numpy as np\n'), ((8039, 8057), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8046, 8057), True, 'import numpy as np\n'), ((8057, 8075), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8064, 8075), True, 'import numpy as np\n'), ((8084, 8102), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8091, 8102), True, 'import numpy as np\n'), ((8296, 8314), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8303, 8314), True, 'import numpy as np\n'), ((8314, 8332), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8321, 8332), True, 'import numpy as np\n'), ((8388, 8406), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8395, 8406), True, 'import numpy as np\n'), ((8433, 8451), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8440, 8451), True, 'import numpy as np\n'), ((8484, 8502), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8491, 8502), True, 'import numpy as np\n'), ((8534, 8552), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8541, 8552), True, 'import numpy as np\n'), ((8603, 8621), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8610, 8621), True, 'import numpy as np\n'), ((8626, 8644), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8633, 8644), True, 'import numpy as np\n'), ((8973, 8991), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8980, 8991), True, 'import numpy as np\n'), ((9000, 9018), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (9007, 9018), True, 'import numpy as np\n'), ((9069, 9087), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (9076, 9087), True, 'import numpy as np\n'), ((9136, 9154), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (9143, 9154), True, 'import numpy as np\n'), ((9187, 9205), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (9194, 9205), True, 'import numpy as np\n'), ((9209, 9227), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (9216, 9227), True, 'import numpy as np\n'), ((9236, 9254), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (9243, 9254), True, 'import numpy as np\n'), ((9254, 9272), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (9261, 9272), True, 'import numpy as np\n'), ((12251, 12265), 'torch.t', 'torch.t', (['val_1'], {}), '(val_1)\n', (12258, 12265), False, 'import torch\n'), ((12316, 12330), 'torch.t', 'torch.t', (['val_2'], {}), '(val_2)\n', (12323, 12330), False, 'import torch\n'), ((12381, 12395), 'torch.t', 'torch.t', (['val_3'], {}), '(val_3)\n', (12388, 12395), False, 'import torch\n'), ((12446, 12460), 'torch.t', 'torch.t', (['val_4'], {}), '(val_4)\n', (12453, 12460), False, 'import torch\n'), ((12511, 12525), 'torch.t', 'torch.t', (['val_5'], {}), '(val_5)\n', (12518, 12525), False, 'import torch\n'), ((12576, 12590), 'torch.t', 'torch.t', (['val_6'], {}), '(val_6)\n', (12583, 12590), False, 'import torch\n'), ((12735, 12749), 'torch.t', 'torch.t', (['val_1'], {}), '(val_1)\n', (12742, 12749), False, 'import torch\n'), ((12801, 12815), 'torch.t', 'torch.t', (['val_2'], {}), '(val_2)\n', (12808, 12815), False, 'import torch\n'), ((12867, 12881), 'torch.t', 'torch.t', (['val_3'], {}), '(val_3)\n', (12874, 12881), False, 'import torch\n'), ((12933, 12947), 'torch.t', 'torch.t', (['val_4'], {}), '(val_4)\n', (12940, 12947), False, 'import torch\n'), ((12999, 13013), 'torch.t', 'torch.t', (['val_5'], {}), '(val_5)\n', (13006, 13013), False, 'import torch\n'), ((13065, 13079), 'torch.t', 'torch.t', (['val_6'], {}), '(val_6)\n', (13072, 13079), False, 'import torch\n'), ((20445, 20475), 'numpy.zeros', 'np.zeros', (['[nterms_s, nterms_s]'], {}), '([nterms_s, nterms_s])\n', (20453, 20475), True, 'import numpy as np\n'), ((20972, 20992), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (20982, 20992), True, 'import numpy as np\n'), ((21232, 21262), 'numpy.zeros', 'np.zeros', (['[nterms_s, nterms_s]'], {}), '([nterms_s, nterms_s])\n', (21240, 21262), True, 'import numpy as np\n'), ((21762, 21782), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (21772, 21782), True, 'import numpy as np\n'), ((22036, 22068), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nnodes_if]'], {}), '([nnodes_ie, nnodes_if])\n', (22044, 22068), True, 'import numpy as np\n'), ((22578, 22598), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (22588, 22598), True, 'import numpy as np\n'), ((22830, 22862), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nnodes_if]'], {}), '([nnodes_ie, nnodes_if])\n', (22838, 22862), True, 'import numpy as np\n'), ((23372, 23392), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (23382, 23392), True, 'import numpy as np\n'), ((23624, 23656), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nnodes_if]'], {}), '([nnodes_ie, nnodes_if])\n', (23632, 23656), True, 'import numpy as np\n'), ((24166, 24186), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (24176, 24186), True, 'import numpy as np\n'), ((24418, 24450), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nnodes_if]'], {}), '([nnodes_ie, nnodes_if])\n', (24426, 24450), True, 'import numpy as np\n'), ((24960, 24980), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (24970, 24980), True, 'import numpy as np\n'), ((25212, 25244), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nnodes_if]'], {}), '([nnodes_ie, nnodes_if])\n', (25220, 25244), True, 'import numpy as np\n'), ((25754, 25774), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (25764, 25774), True, 'import numpy as np\n'), ((26006, 26038), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nnodes_if]'], {}), '([nnodes_ie, nnodes_if])\n', (26014, 26038), True, 'import numpy as np\n'), ((26548, 26568), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (26558, 26568), True, 'import numpy as np\n'), ((26825, 26857), 'numpy.zeros', 'np.zeros', (['[nnodes_if, nnodes_if]'], {}), '([nnodes_if, nnodes_if])\n', (26833, 26857), True, 'import numpy as np\n'), ((27368, 27388), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (27378, 27388), True, 'import numpy as np\n'), ((27622, 27654), 'numpy.zeros', 'np.zeros', (['[nnodes_if, nnodes_if]'], {}), '([nnodes_if, nnodes_if])\n', (27630, 27654), True, 'import numpy as np\n'), ((28165, 28185), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (28175, 28185), True, 'import numpy as np\n'), ((28419, 28451), 'numpy.zeros', 'np.zeros', (['[nnodes_if, nnodes_if]'], {}), '([nnodes_if, nnodes_if])\n', (28427, 28451), True, 'import numpy as np\n'), ((28962, 28982), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (28972, 28982), True, 'import numpy as np\n'), ((29216, 29248), 'numpy.zeros', 'np.zeros', (['[nnodes_if, nnodes_if]'], {}), '([nnodes_if, nnodes_if])\n', (29224, 29248), True, 'import numpy as np\n'), ((29759, 29779), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (29769, 29779), True, 'import numpy as np\n'), ((30013, 30045), 'numpy.zeros', 'np.zeros', (['[nnodes_if, nnodes_if]'], {}), '([nnodes_if, nnodes_if])\n', (30021, 30045), True, 'import numpy as np\n'), ((30556, 30576), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (30566, 30576), True, 'import numpy as np\n'), ((30810, 30842), 'numpy.zeros', 'np.zeros', (['[nnodes_if, nnodes_if]'], {}), '([nnodes_if, nnodes_if])\n', (30818, 30842), True, 'import numpy as np\n'), ((31353, 31373), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (31363, 31373), True, 'import numpy as np\n'), ((31606, 31637), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nterms_s]'], {}), '([nnodes_ie, nterms_s])\n', (31614, 31637), True, 'import numpy as np\n'), ((32137, 32157), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (32147, 32157), True, 'import numpy as np\n'), ((32390, 32421), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nterms_s]'], {}), '([nnodes_ie, nterms_s])\n', (32398, 32421), True, 'import numpy as np\n'), ((32921, 32941), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (32931, 32941), True, 'import numpy as np\n'), ((33174, 33205), 'numpy.zeros', 'np.zeros', (['[nnodes_ie, nterms_s]'], {}), '([nnodes_ie, nterms_s])\n', (33182, 33205), True, 'import numpy as np\n'), ((33705, 33725), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (33715, 33725), True, 'import numpy as np\n'), ((2214, 2232), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2221, 2232), True, 'import numpy as np\n'), ((2232, 2250), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2239, 2250), True, 'import numpy as np\n'), ((2250, 2268), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2257, 2268), True, 'import numpy as np\n'), ((2303, 2321), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2310, 2321), True, 'import numpy as np\n'), ((2343, 2361), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2350, 2361), True, 'import numpy as np\n'), ((2361, 2379), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2368, 2379), True, 'import numpy as np\n'), ((2432, 2450), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2439, 2450), True, 'import numpy as np\n'), ((2490, 2508), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2497, 2508), True, 'import numpy as np\n'), ((2508, 2526), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2515, 2526), True, 'import numpy as np\n'), ((2561, 2579), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2568, 2579), True, 'import numpy as np\n'), ((2619, 2637), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2626, 2637), True, 'import numpy as np\n'), ((2690, 2708), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2697, 2708), True, 'import numpy as np\n'), ((2730, 2748), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2737, 2748), True, 'import numpy as np\n'), ((2766, 2784), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2773, 2784), True, 'import numpy as np\n'), ((2819, 2837), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2826, 2837), True, 'import numpy as np\n'), ((2859, 2877), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2866, 2877), True, 'import numpy as np\n'), ((2948, 2966), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (2955, 2966), True, 'import numpy as np\n'), ((3024, 3042), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3031, 3042), True, 'import numpy as np\n'), ((3077, 3095), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3084, 3095), True, 'import numpy as np\n'), ((3206, 3224), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3213, 3224), True, 'import numpy as np\n'), ((3351, 3369), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3358, 3369), True, 'import numpy as np\n'), ((3369, 3387), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3376, 3387), True, 'import numpy as np\n'), ((3436, 3454), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3443, 3454), True, 'import numpy as np\n'), ((3454, 3472), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3461, 3472), True, 'import numpy as np\n'), ((3539, 3557), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3546, 3557), True, 'import numpy as np\n'), ((3624, 3642), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3631, 3642), True, 'import numpy as np\n'), ((3691, 3709), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3698, 3709), True, 'import numpy as np\n'), ((3776, 3794), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (3783, 3794), True, 'import numpy as np\n'), ((4125, 4143), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4132, 4143), True, 'import numpy as np\n'), ((4147, 4165), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4154, 4165), True, 'import numpy as np\n'), ((4232, 4250), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4239, 4250), True, 'import numpy as np\n'), ((4295, 4313), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4302, 4313), True, 'import numpy as np\n'), ((4317, 4335), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4324, 4335), True, 'import numpy as np\n'), ((4402, 4420), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4409, 4420), True, 'import numpy as np\n'), ((4465, 4483), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4472, 4483), True, 'import numpy as np\n'), ((4635, 4653), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4642, 4653), True, 'import numpy as np\n'), ((4905, 4923), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4912, 4923), True, 'import numpy as np\n'), ((4923, 4941), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (4930, 4941), True, 'import numpy as np\n'), ((5008, 5026), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5015, 5026), True, 'import numpy as np\n'), ((5075, 5093), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5082, 5093), True, 'import numpy as np\n'), ((5245, 5263), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5252, 5263), True, 'import numpy as np\n'), ((5263, 5281), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5270, 5281), True, 'import numpy as np\n'), ((5348, 5366), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5355, 5366), True, 'import numpy as np\n'), ((5415, 5433), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5422, 5433), True, 'import numpy as np\n'), ((5912, 5930), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5919, 5930), True, 'import numpy as np\n'), ((5930, 5948), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (5937, 5948), True, 'import numpy as np\n'), ((6048, 6066), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6055, 6066), True, 'import numpy as np\n'), ((6071, 6089), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6078, 6089), True, 'import numpy as np\n'), ((6148, 6166), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6155, 6166), True, 'import numpy as np\n'), ((6207, 6225), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6214, 6225), True, 'import numpy as np\n'), ((6307, 6325), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6314, 6325), True, 'import numpy as np\n'), ((6325, 6343), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6332, 6343), True, 'import numpy as np\n'), ((6493, 6511), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6500, 6511), True, 'import numpy as np\n'), ((6511, 6529), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6518, 6529), True, 'import numpy as np\n'), ((6533, 6551), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6540, 6551), True, 'import numpy as np\n'), ((6551, 6569), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6558, 6569), True, 'import numpy as np\n'), ((6629, 6647), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6636, 6647), True, 'import numpy as np\n'), ((6669, 6687), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6676, 6687), True, 'import numpy as np\n'), ((6729, 6747), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6736, 6747), True, 'import numpy as np\n'), ((6769, 6787), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (6776, 6787), True, 'import numpy as np\n'), ((7081, 7099), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7088, 7099), True, 'import numpy as np\n'), ((7099, 7117), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7106, 7117), True, 'import numpy as np\n'), ((7200, 7218), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7207, 7218), True, 'import numpy as np\n'), ((7236, 7254), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7243, 7254), True, 'import numpy as np\n'), ((7337, 7355), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7344, 7355), True, 'import numpy as np\n'), ((7382, 7400), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7389, 7400), True, 'import numpy as np\n'), ((7474, 7492), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7481, 7492), True, 'import numpy as np\n'), ((7501, 7519), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7508, 7519), True, 'import numpy as np\n'), ((7667, 7685), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7674, 7685), True, 'import numpy as np\n'), ((7685, 7703), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7692, 7703), True, 'import numpy as np\n'), ((7703, 7721), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7710, 7721), True, 'import numpy as np\n'), ((7730, 7748), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7737, 7748), True, 'import numpy as np\n'), ((7785, 7803), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7792, 7803), True, 'import numpy as np\n'), ((7848, 7866), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7855, 7866), True, 'import numpy as np\n'), ((7921, 7939), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7928, 7939), True, 'import numpy as np\n'), ((7939, 7957), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (7946, 7957), True, 'import numpy as np\n'), ((8246, 8264), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8253, 8264), True, 'import numpy as np\n'), ((8269, 8287), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8276, 8287), True, 'import numpy as np\n'), ((8365, 8383), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8372, 8383), True, 'import numpy as np\n'), ((8415, 8433), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8422, 8433), True, 'import numpy as np\n'), ((8507, 8525), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8514, 8525), True, 'import numpy as np\n'), ((8552, 8570), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8559, 8570), True, 'import numpy as np\n'), ((8653, 8671), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8660, 8671), True, 'import numpy as np\n'), ((8671, 8689), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8678, 8689), True, 'import numpy as np\n'), ((8833, 8851), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8840, 8851), True, 'import numpy as np\n'), ((8855, 8873), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8862, 8873), True, 'import numpy as np\n'), ((8882, 8900), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8889, 8900), True, 'import numpy as np\n'), ((8900, 8918), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8907, 8918), True, 'import numpy as np\n'), ((8951, 8969), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (8958, 8969), True, 'import numpy as np\n'), ((9018, 9036), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (9025, 9036), True, 'import numpy as np\n'), ((9091, 9109), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (9098, 9109), True, 'import numpy as np\n'), ((9118, 9136), 'numpy.sqrt', 'np.sqrt', (['(1.0 / 3.0)'], {}), '(1.0 / 3.0)\n', (9125, 9136), True, 'import numpy as np\n'), ((16053, 16069), 'numpy.zeros', 'np.zeros', (['[3, 3]'], {}), '([3, 3])\n', (16061, 16069), True, 'import numpy as np\n'), ((16778, 16798), 'numpy.savetxt', 'np.savetxt', (['f', 'array'], {}), '(f, array)\n', (16788, 16798), True, 'import numpy as np\n')]