// File: /workspace/github_cpp_makefile_star2_O2/suhasjains[P]AMR-Solver/src/amrsolver.cpp
// Function: amrsolver::set_initial_field()
void set_initial_field() {

	myOctree::create_list_of_leaf_nodes();

    	for (std::list<Octree*>::iterator i = myOctree::leaf_nodes.begin(), end = myOctree::leaf_nodes.end(); i != end; ++i) {

   		Field* field = (*i)->get_block_data()->field;
   		VecField* location = (*i)->get_block_data()->mesh;
	
		for(int i=0;i<field->Nx;i++) {
                	for(int j=0;j<field->Ny;j++) {
                        	for(int k=0;k<field->Nz;k++) {
                                	
					double x = location->x[i][j][k];
					double y = location->y[i][j][k];
					double z = location->z[i][j][k];
 					
					((x-1.0)*(x-1.0) + (y-1.0)*(y-1.0) >= 0.5625)?(field->val[i][j][k] = 1.0):(field->val[i][j][k] = 100.0);		

//					((x-1.0)*(x-1.0) + (y-1.0)*(y-1.0) + (z-1.0)*(z-1.0) >= 0.421875)?(field->val[i][j][k] = 1.0):(field->val[i][j][k] = 100.0);		
					//((x-1.0)*(x-1.0) + (y-1.0)*(y-1.0) >= 0.5625)?(field->val[i][j][k] = 1.0):(field->val[i][j][k] = 100.0);		
				//	(x*x + y*y >= 1.0)?(field->val[i][j][k] = 1.0):(field->val[i][j][k] = 100.0);		
					if(x*x + y*y <= 1.0)	{field->val[i][j][k] = 0.1; }		
					if(x*x + y*y >= 3.0)	{field->val[i][j][k] = 100.0; }		
                        	}
                	}
        	}
    	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x2dec
leaq 0x1096a(%rip), %rax     # 0x13210
xorl %r14d, %r14d
leaq 0xc778(%rip), %r15      # 0xf028
movabsq $0x4059000000000000, %r12 # imm = 0x4059000000000000
movabsq $0x3fb999999999999a, %r13 # imm = 0x3FB999999999999A
movq (%rax), %rax
cmpq 0x106ea(%rip), %rax     # 0x12fb8
je 0x29f7
movq 0x10(%rax), %rdi
movq %rax, -0x30(%rbp)
callq 0x3db0
movq 0x8(%rax), %rbx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3db0
movsd 0xc726(%rip), %xmm7     # 0xf020
movsd 0xc716(%rip), %xmm6     # 0xf018
movsd 0xc706(%rip), %xmm5     # 0xf010
movsd 0xc6f6(%rip), %xmm4     # 0xf008
movq (%rax), %rax
movl (%rbx), %ecx
testl %ecx, %ecx
cmovlel %r14d, %ecx
xorl %edx, %edx
cmpq %rcx, %rdx
je 0x29ee
movl 0x4(%rbx), %esi
testl %esi, %esi
cmovlel %r14d, %esi
xorl %edi, %edi
cmpq %rsi, %rdi
je 0x29e6
movl 0x8(%rbx), %r8d
testl %r8d, %r8d
cmovlel %r14d, %r8d
xorl %r9d, %r9d
cmpq %r9, %r8
je 0x29de
movq 0x10(%rax), %r10
movq 0x18(%rax), %r11
movq (%r10,%rdx,8), %r10
movq (%r10,%rdi,8), %r10
movsd (%r10,%r9,8), %xmm0
movq (%r11,%rdx,8), %r10
movq (%r10,%rdi,8), %r10
movsd (%r10,%r9,8), %xmm1
movapd %xmm0, %xmm2
addsd %xmm4, %xmm2
movapd %xmm1, %xmm3
addsd %xmm4, %xmm3
mulsd %xmm3, %xmm3
mulsd %xmm2, %xmm2
addsd %xmm3, %xmm2
xorl %r11d, %r11d
ucomisd %xmm5, %xmm2
setb %r11b
movq 0x10(%rbx), %r10
movq (%r10,%rdx,8), %r10
movq (%r10,%rdi,8), %r10
movsd (%r15,%r11,8), %xmm2
movsd %xmm2, (%r10,%r9,8)
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm0, %xmm6
jb 0x29cc
movq %r13, (%r10,%r9,8)
ucomisd %xmm7, %xmm0
jb 0x29d6
movq %r12, (%r10,%r9,8)
incq %r9
jmp 0x294a
incq %rdi
jmp 0x2933
incq %rdx
jmp 0x291f
movq -0x30(%rbp), %rax
jmp 0x28c4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq