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

	myOctree::create_list_of_leaf_nodes();

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

   		Field* field = (*it)->get_block_data()->scalarfields[1];
   		VecField* location = (*it)->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];
 					
					if((*it)->get_block_data()->flag[i][j][k]==myOctree::DOMAIN) 
						field->val[i][j][k] = 1.0;		
					//if(x*x + y*y >= 3.0)	{field->val[i][j][k] = 100.0; }		
                        	}
                	}
        	}

    	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
callq 0x4930
leaq 0x2241c(%rip), %rdi     # 0x262b0
callq 0x4490
movq %rax, -0x8(%rbp)
leaq 0x2240c(%rip), %rdi     # 0x262b0
callq 0x44c0
movq %rax, -0x10(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x44f0
testb $0x1, %al
jne 0x3ec3
jmp 0x4049
leaq -0x8(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x4039
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x4029
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x4019
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x48(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x4520
movq (%rax), %rdi
callq 0x6de0
movq 0x88(%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x7, (%rax,%rcx,4)
jne 0x4009
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd 0x1d00c(%rip), %xmm0    # 0x21010
movsd %xmm0, (%rax,%rcx,8)
jmp 0x400b
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3f2c
jmp 0x401b
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3f15
jmp 0x402b
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3eff
jmp 0x403b
leaq -0x8(%rbp), %rdi
callq 0x4550
jmp 0x3ead
addq $0x50, %rsp
popq %rbp
retq
nop