// File: /workspace/github_cpp_makefile_star2_O2/suhasjains[P]AMR-Solver/src/vecfield.cpp
// Function: myOctree::VecField::VecField(myOctree::VecField const&)
VecField::VecField(const VecField &obj) {

//              std::cerr << "copy constructor of vecfield is working" << std::endl;

        Nx = obj.Nx;
        Ny = obj.Ny;
        Nz = obj.Nz;
        N = obj.N;
        name = obj.name;

        x = new double** [Nx];
        y = new double** [Nx];
        z = new double** [Nx];
        for(int i=0;i<Nx;i++) {
                x[i] = new double* [Ny];
                y[i] = new double* [Ny];
                z[i] = new double* [Ny];
                for(int j=0;j<Ny;j++) {
                        x[i][j] = new double [Nz];
                        y[i][j] = new double [Nz];
                        z[i][j] = new double [Nz];
                        memcpy(x[i][j],obj.x[i][j],sizeof(double)*Nz);
                        memcpy(y[i][j],obj.y[i][j],sizeof(double)*Nz);
                        memcpy(z[i][j],obj.z[i][j],sizeof(double)*Nz);
                }
        }

	for(int i = 0; i < 3; ++ i) {
                 memcpy(&(xbc[i][0]), &(obj.xbc[i][0]), 2 * sizeof(FieldBc));
                 memcpy(&(ybc[i][0]), &(obj.ybc[i][0]), 2 * sizeof(FieldBc));
                 memcpy(&(zbc[i][0]), &(obj.zbc[i][0]), 2 * sizeof(FieldBc));
     	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x38(%rdi), %rax
movq %rax, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
addq $0x28, %rdi
movb $0x0, 0x38(%rbx)
movl (%rsi), %eax
movl %eax, (%rbx)
movl 0x4(%rsi), %eax
movl %eax, 0x4(%rbx)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rbx)
movl 0xc(%rsi), %eax
movl %eax, 0xc(%rbx)
movq %rsi, -0x30(%rbp)
addq $0x28, %rsi
movq %rdi, -0x38(%rbp)
callq 0x2130
movslq (%rbx), %r15
leaq (,%r15,8), %r12
testq %r15, %r15
pushq $-0x1
popq %rax
cmovsq %rax, %r12
movq %r12, %rdi
callq 0x2030
movq %rax, 0x10(%rbx)
movq %r12, %rdi
callq 0x2030
movq %rax, 0x18(%rbx)
movq %r12, %rdi
callq 0x2030
movq %rax, 0x20(%rbx)
xorl %r14d, %r14d
movslq %r15d, %rax
cmpq %rax, %r14
jge 0x616f
movslq 0x4(%rbx), %r13
leaq (,%r13,8), %r12
testq %r13, %r13
pushq $-0x1
popq %rax
cmovsq %rax, %r12
movq %r12, %rdi
callq 0x2030
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movq %r12, %rdi
callq 0x2030
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movq %r12, %rdi
callq 0x2030
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
xorl %r15d, %r15d
movslq %r13d, %rax
cmpq %rax, %r15
jge 0x6164
movslq 0x8(%rbx), %rax
leaq (,%rax,8), %r12
testq %rax, %rax
movq %r12, %r13
pushq $-0x1
popq %rax
cmovsq %rax, %r13
movq %r13, %rdi
callq 0x2030
movq 0x10(%rbx), %rcx
movq (%rcx,%r14,8), %rcx
movq %rax, (%rcx,%r15,8)
movq %r13, %rdi
callq 0x2030
movq 0x18(%rbx), %rcx
movq (%rcx,%r14,8), %rcx
movq %rax, (%rcx,%r15,8)
movq %r13, %rdi
callq 0x2030
movq 0x20(%rbx), %rcx
movq (%rcx,%r14,8), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
movq -0x30(%rbp), %r13
movq 0x10(%r13), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rsi
movq %r12, %rdx
callq 0x2180
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
movq 0x18(%r13), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rsi
movslq 0x8(%rbx), %rdx
shlq $0x3, %rdx
callq 0x2180
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
movq 0x20(%r13), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rsi
movslq 0x8(%rbx), %rdx
shlq $0x3, %rdx
callq 0x2180
incq %r15
movl 0x4(%rbx), %r13d
jmp 0x6089
incq %r14
movl (%rbx), %r15d
jmp 0x6034
pushq $-0x18
popq %rax
movq -0x30(%rbp), %rdx
testq %rax, %rax
je 0x61a5
movq 0x60(%rdx,%rax), %rcx
movq %rcx, 0x60(%rbx,%rax)
movq 0x78(%rdx,%rax), %rcx
movq %rcx, 0x78(%rbx,%rax)
movq 0x90(%rdx,%rax), %rcx
movq %rcx, 0x90(%rbx,%rax)
addq $0x8, %rax
jmp 0x6176
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x61b8
jmp 0x61b8
movq %rax, %rbx
movq -0x38(%rbp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x2320