// File: /workspace/github_cpp_makefile_star2_O2/jamesliu516[P]amrdg2d/outputgrid.cpp
// Function: outputcell_sol(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void outputcell_sol(int ij, const string &str123)
{
	//
	ofstream fpxx;

	string proxfile1(FILE_PROX);

	string  str1=str0+proxfile1;

	ostringstream omess1;

	ostringstream omess2;
	omess2 << str1<<str123<<"cp_"<< ij<<".plt";
	omess1 << str1<<str123<<setw(6)<<setfill('0')<< ij<<".plt";

	fpxx.open(omess1.str().c_str());
double tm_tdiv;

	double u,v,Et, p, den, ma, u1,v1,p1, den1;
	double volsum, vol, entrpy,erss, tp, tper;
    double rtp000;
    
    if(isOutVorM) getAllVorM();

	fpxx<<"TITLE =\"EULER SOLVER\"\n"
		<< "VARIABLES = \"X\", \"Y\",   \"DEN\" ,\"U\",\"V\", \"PRESS\" ,\"MA\", \"xingqu\"\n"
		<<"ZONE N=   "<<points4out.size() << ", E=    "<< cellPoints.size()<< ", F=FEPOINT, ET=QUADRILATERAL\n";  

	for(vector<pointInCell>::size_type j=0;j!=points4out.size();++j)
	{
		volsum=0.0;
        tm_tdiv=0.0;
		u=v=p=den=0.0;
		//  if(j==0){int iitm; cout<<"look look"<< points4out[j].nmc<<endl; cin>>iitm;}

		for(int ii=0; ii< points4out[j].nmc; ++ii){
			vol=1.0/((points4out[j].mcell[ii])->dx*(points4out[j].mcell[ii])->dy);
			volsum+=vol;
			den1=(points4out[j].mcell[ii])->dof[0][0];	     	     
			u1=(points4out[j].mcell[ii])->dof[1][0]/den1;
			v1=(points4out[j].mcell[ii])->dof[2][0]/den1;
			Et=(points4out[j].mcell[ii])->dof[3][0];	     
			p1=GAM11*(Et-0.5*den1*(u1*u1+v1*v1));

			den+=vol*den1;
			u+=vol*u1;
			v+=vol*v1;
			p+=vol*p1;
           // rtp000=(((points4out[j].mcell[ii])->trb==true)?1.0:0.0);
            rtp000=(points4out[j].mcell[ii])->kxrcf;
         //   rtp000=(points4out[j].mcell[ii])->vorM;
       //     tm_tdiv+=vol*(points4out[j].mcell[ii])->tdiv;
            tm_tdiv+=vol*rtp000;
		}

		u/=volsum;
		v/=volsum;
		den/=volsum;
		p/=volsum;
        tm_tdiv/=volsum;

		entrpy = p/pow(den,GAMMA);
		erss=fabs(initP/pow(initQ,GAMMA)-entrpy)/(initP/pow(initQ,GAMMA));
		tp = 0.5 * den * (u *u + v * v) + p;
		tper = fabs(tp-0.5*initQ*(uFree*uFree + vFree*vFree)-initP);

		ma=sqrt(u*u+v*v)/sqrt(GAMMA*p/den);

		fpxx<<fixed<<points4out[j].pt[0]<<"  "<<points4out[j].pt[1]<<"  "<<setw(15)<<den<<" " << setw(15)<<u <<" " << setw(15)<<v <<" "
			<< setw(15)<< p << " "<<setw(15)<<ma<<" "
			<<"  "<<setw(15)<<tm_tdiv << '\n'; 
	}
	for(map<OctCell *, cellPointIndex> ::iterator ik=cellPoints.begin();ik!=cellPoints.end(); ++ik)
	{
		for(int i=0;i<4;i++)
		{
			fpxx<<ik->second.iPoint[i]<<"   ";

		}
		fpxx<<"\n";
	}

    for (int jj=0; jj<N_BODY;++jj){
        fpxx<<"\n\n";	
        fpxx<<"TITLE =\"Wall Points\"\n"
            // <<"VARIABLES = \"X\", \"Y\"\n"
            << "VARIABLES = \"X\", \"Y\",   \"DEN\" ,\"U\",\"V\", \"PRESS\" ,\"MA\",\"xingqu\"\n"
            <<"ZONE I=   "<<NWallPts[jj]<< ", F=POINT\n";  

        for(int ii=0; ii< NWallPts[jj]; ++ii) {
            fpxx<<MultiCircle[jj][ii].x<<"  "<<MultiCircle[jj][ii].y<<"  "<<0.0<<"  "<<0.0
                <<"  "<<0.0<<"  "<<0.0<<"  "<<0.0<<"  "<<0.0<<"\n";
        }	
    }

    computWallPresCp();
    fpxx.close();
    fpxx.clear();
    fpxx.open(omess2.str().c_str());
    for (int jj=0; jj<N_BODY;++jj){
        fpxx<<"TITLE =\"Cp\"\n"
            // <<"VARIABLES = \"X\", \"Y\"\n"
            << "VARIABLES = \"X\",\"Cp\"\n"
            <<"ZONE I=   "<<NWallPts[jj]<< ", F=POINT\n";  

        for(int ii=0; ii< NWallPts[jj]; ++ii) {
            fpxx<<MultiCircle[jj][ii].x<<"  "<<MultiCompany[jj][ii].cp<<"\n";
        }	
    }
    fpxx.close();	
    fpxx.clear();	
    computeCL_Cd(ij);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5b8, %rsp            # imm = 0x5B8
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xc8(%rsp), %rdi
callq 0x3320
leaq 0x138f8(%rip), %rsi     # 0x1b250
leaq 0xa8(%rsp), %rdi
leaq 0x2c8(%rsp), %rdx
callq 0x4b4e
leaq 0x20f2c(%rip), %rsi     # 0x288a0
leaq 0x88(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x8415
leaq 0x2c8(%rsp), %rdi
callq 0x3260
leaq 0x440(%rsp), %rdi
callq 0x3260
leaq 0x440(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x31b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x31b0
leaq 0x1390a(%rip), %rsi     # 0x1b2d4
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
movl %ebp, %esi
callq 0x3330
leaq 0x13870(%rip), %rsi     # 0x1b253
movq %rax, %rdi
callq 0x31d0
leaq 0x2c8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x31b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x31b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x6, 0x10(%rax,%rcx)
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x32c0
movq %rax, %rdi
movl %ebp, %esi
callq 0x3330
leaq 0x1381c(%rip), %rsi     # 0x1b253
movq %rax, %rdi
callq 0x31d0
leaq 0x2d0(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x32d0
movq 0x50(%rsp), %rsi
leaq 0xc8(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x3040
movl %ebp, 0xc(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x33b8
leaq 0x137dd(%rip), %rsi     # 0x1b258
leaq 0xc8(%rsp), %rdi
callq 0x31d0
leaq 0x13849(%rip), %rsi     # 0x1b2d8
movq %rax, %rdi
callq 0x31d0
leaq 0x137e7(%rip), %rsi     # 0x1b285
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
leaq 0x20c48(%rip), %r13     # 0x286f8
movq 0x8(%r13), %rax
subq (%r13), %rax
pushq $0x38
popq %rcx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x3140
leaq 0x137fc(%rip), %rsi     # 0x1b2cb
movq %rax, %rdi
callq 0x31d0
leaq 0x20bea(%rip), %rcx     # 0x286c8
movq 0x28(%rcx), %rsi
movq %rax, %rdi
callq 0x3140
leaq 0x137a7(%rip), %rsi     # 0x1b298
movq %rax, %rdi
callq 0x31d0
pushq $0x10
popq %rbp
leaq 0x1427b(%rip), %r12     # 0x1bd7e
xorl %r15d, %r15d
movq (%r13), %rcx
movq 0x8(%r13), %rax
subq %rcx, %rax
cqto
pushq $0x38
popq %rsi
idivq %rsi
cmpq %rax, %r15
je 0x7e4b
imulq $0x38, %r15, %rbx
movl 0x30(%rcx,%rbx), %eax
testw %ax, %ax
movl $0x0, %edx
cmovlel %edx, %eax
movzwl %ax, %eax
addq %rbp, %rcx
xorpd %xmm5, %xmm5
xorps %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %edx, %edx
movaps %xmm0, 0x40(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
cmpq %rdx, %rax
je 0x7c23
movq (%rcx,%rdx,8), %rsi
movsd 0x288(%rsi), %xmm1
mulsd 0x290(%rsi), %xmm1
movsd 0x136a5(%rip), %xmm0    # 0x1b220
divsd %xmm1, %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd 0x30(%rsi), %xmm1
movsd 0x60(%rsi), %xmm2
divsd %xmm1, %xmm2
movsd 0x90(%rsi), %xmm3
divsd %xmm1, %xmm3
movapd %xmm3, %xmm4
mulsd %xmm3, %xmm4
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
mulsd %xmm2, %xmm2
addsd %xmm4, %xmm2
movapd %xmm1, %xmm4
mulsd 0x135a9(%rip), %xmm4    # 0x1b170
mulsd %xmm2, %xmm4
addsd 0xc0(%rsi), %xmm4
mulsd 0x1364d(%rip), %xmm4    # 0x1b228
movapd %xmm0, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
unpcklpd %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0]
mulpd %xmm2, %xmm3
movapd 0x10(%rsp), %xmm4
addpd %xmm3, %xmm4
movapd %xmm4, 0x10(%rsp)
mulpd %xmm2, %xmm1
addpd %xmm1, %xmm5
mulsd 0x218(%rsi), %xmm0
movapd 0x40(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, 0x40(%rsp)
incq %rdx
jmp 0x7b56
movapd %xmm5, %xmm0
movsd (%rsp), %xmm1
divsd %xmm1, %xmm0
movapd %xmm0, 0x30(%rsp)
unpckhpd %xmm5, %xmm5            # xmm5 = xmm5[1,1]
divsd %xmm1, %xmm5
movapd %xmm5, 0x70(%rsp)
movsd 0x135e4(%rip), %xmm1    # 0x1b230
callq 0x3340
movapd 0x70(%rsp), %xmm0
mulsd 0x135d1(%rip), %xmm0    # 0x1b230
divsd 0x30(%rsp), %xmm0
ucomisd 0x135cb(%rip), %xmm0    # 0x1b238
jb 0x7c75
sqrtsd %xmm0, %xmm0
jmp 0x7c7a
callq 0x3180
movsd %xmm0, 0x28(%rsp)
movq 0xc8(%rsp), %rax
movq -0x18(%rax), %rax
movl 0xe0(%rsp,%rax), %ecx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl %edx, %ecx
orl $0x4, %ecx
movl %ecx, 0xe0(%rsp,%rax)
movq (%r13), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0xc3aa
movsd (%rax), %xmm0
leaq 0xc8(%rsp), %rdi
callq 0x32e0
movq %rax, %rdi
leaq 0x140b0(%rip), %rsi     # 0x1bd7d
callq 0x31d0
movq %rax, %r14
addq (%r13), %rbx
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xc3aa
movsd (%rax), %xmm0
movq %r14, %rdi
callq 0x32e0
movq %rax, %rdi
leaq 0x14083(%rip), %rsi     # 0x1bd7d
callq 0x31d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
movq %rax, %rdi
movapd 0x30(%rsp), %xmm0
callq 0x32e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31d0
movapd 0x10(%rsp), %xmm0
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
divsd (%rsp), %xmm0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
movq %rax, %rdi
movapd %xmm0, 0x30(%rsp)
callq 0x32e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31d0
movapd 0x10(%rsp), %xmm0
divsd (%rsp), %xmm0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
movq %rax, %rdi
movapd %xmm0, 0x10(%rsp)
callq 0x32e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
movq %rax, %rdi
movapd 0x70(%rsp), %xmm0
callq 0x32e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31d0
movapd 0x10(%rsp), %xmm0
mulsd %xmm0, %xmm0
movapd 0x30(%rsp), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
sqrtsd %xmm1, %xmm0
divsd 0x28(%rsp), %xmm0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31d0
movq %rax, %rdi
leaq 0x13f71(%rip), %rsi     # 0x1bd7d
callq 0x31d0
movapd 0x40(%rsp), %xmm0
divsd (%rsp), %xmm0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
pushq $0xa
popq %rsi
callq 0x3230
incq %r15
addq $0x38, %rbp
jmp 0x7b06
leaq 0x20876(%rip), %r13     # 0x286c8
movq 0x18(%r13), %rbx
addq $0x8, %r13
leaq 0x134b9(%rip), %r14     # 0x1b31a
leaq 0xc8(%rsp), %r15
leaq 0x13f0c(%rip), %r12     # 0x1bd7c
cmpq %r13, %rbx
je 0x7eb1
pushq $0xa
popq %rbp
cmpq $0xe, %rbp
je 0x7e99
movl (%rbx,%rbp,4), %esi
movq %r15, %rdi
callq 0x3330
movq %rax, %rdi
movq %r12, %rsi
callq 0x31d0
incq %rbp
jmp 0x7e78
movq %r15, %rdi
movq %r14, %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3150
movq %rax, %rbx
jmp 0x7e70
leaq 0x13461(%rip), %rsi     # 0x1b319
leaq 0xc8(%rsp), %rdi
callq 0x31d0
leaq 0x13450(%rip), %rsi     # 0x1b31c
leaq 0xc8(%rsp), %rdi
callq 0x31d0
leaq 0x13452(%rip), %rsi     # 0x1b332
movq %rax, %rdi
callq 0x31d0
leaq 0x13483(%rip), %rsi     # 0x1b372
movq %rax, %rdi
callq 0x31d0
leaq 0x1b302(%rip), %r13     # 0x23200
movl (%r13), %esi
movq %rax, %rdi
callq 0x3330
leaq 0x1346c(%rip), %rsi     # 0x1b37d
movq %rax, %rdi
callq 0x31d0
leaq 0x1b460(%rip), %rbp     # 0x23380
leaq 0x8(%rbp), %rbx
xorl %r14d, %r14d
leaq 0x13e4f(%rip), %r15     # 0x1bd7d
leaq 0x133e5(%rip), %r12     # 0x1b31a
movslq (%r13), %rax
cmpq %rax, %r14
jge 0x800c
movsd -0x8(%rbx), %xmm0
leaq 0xc8(%rsp), %rdi
callq 0x32e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x31d0
movsd (%rbx), %xmm0
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x31d0
xorpd %xmm0, %xmm0
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x31d0
xorpd %xmm0, %xmm0
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x31d0
xorpd %xmm0, %xmm0
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x31d0
xorpd %xmm0, %xmm0
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x31d0
xorpd %xmm0, %xmm0
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x31d0
xorpd %xmm0, %xmm0
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x31d0
incq %r14
addq $0x10, %rbx
jmp 0x7f35
callq 0x12f4e
leaq 0xc8(%rsp), %rbx
movq %rbx, %rdi
callq 0x3280
movq 0xc8(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3310
leaq 0x448(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x32d0
movq 0x50(%rsp), %rsi
leaq 0xc8(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x3040
leaq 0x50(%rsp), %rdi
callq 0x33b8
leaq 0x13319(%rip), %rsi     # 0x1b388
leaq 0xc8(%rsp), %rdi
callq 0x31d0
leaq 0x13312(%rip), %rsi     # 0x1b395
movq %rax, %rdi
callq 0x31d0
leaq 0x132e0(%rip), %rsi     # 0x1b372
movq %rax, %rdi
callq 0x31d0
movl (%r13), %esi
movq %rax, %rdi
callq 0x3330
leaq 0x132d0(%rip), %rsi     # 0x1b37d
movq %rax, %rdi
callq 0x31d0
leaq 0x209d4(%rip), %r12     # 0x28a90
addq $0x20, %r12
xorl %r13d, %r13d
leaq 0xc8(%rsp), %rbx
leaq 0x13cab(%rip), %r14     # 0x1bd7d
leaq 0x13241(%rip), %r15     # 0x1b31a
leaq 0x1b120(%rip), %rax     # 0x23200
movslq (%rax), %rax
cmpq %rax, %r13
jge 0x8126
movsd (%rbp), %xmm0
movq %rbx, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x31d0
movsd (%r12), %xmm0
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x31d0
incq %r13
addq $0x10, %rbp
addq $0x38, %r12
jmp 0x80d9
leaq 0xc8(%rsp), %rbx
movq %rbx, %rdi
callq 0x3280
movq 0xc8(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3310
movl 0xc(%rsp), %edi
callq 0x12d10
leaq 0x440(%rsp), %rdi
callq 0x3070
leaq 0x2c8(%rsp), %rdi
callq 0x3070
leaq 0x88(%rsp), %rdi
callq 0x33b8
leaq 0xa8(%rsp), %rdi
callq 0x33b8
leaq 0xc8(%rsp), %rdi
callq 0x32a0
addq $0x5b8, %rsp            # imm = 0x5B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x81ac
jmp 0x81e1
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x33b8
jmp 0x81e4
jmp 0x81e1
movq %rax, %rbx
jmp 0x81f1
movq %rax, %rbx
jmp 0x81fe
movq %rax, %rbx
jmp 0x820b
movq %rax, %rbx
jmp 0x8218
jmp 0x81e1
jmp 0x81e1
jmp 0x81e1
jmp 0x81e1
jmp 0x81e1
jmp 0x81e1
jmp 0x81e1
jmp 0x81e1
movq %rax, %rbx
leaq 0x440(%rsp), %rdi
callq 0x3070
leaq 0x2c8(%rsp), %rdi
callq 0x3070
leaq 0x88(%rsp), %rdi
callq 0x33b8
leaq 0xa8(%rsp), %rdi
callq 0x33b8
leaq 0xc8(%rsp), %rdi
callq 0x32a0
movq %rbx, %rdi
callq 0x3350