44 using namespace QuadTreeNames;
103 edge_S[
i]=corner_SW[
i]+(corner_SE[
i]-corner_SW[
i])*0.5*(S[0]+1.0);
104 edge_N[
i]=corner_NW[
i]+(corner_NE[
i]-corner_NW[
i])*0.5*(S[0]+1.0);
107 f_rect[
i]=edge_S[
i]+(edge_N[
i]-edge_S[
i])*0.5*(S[1]+1.0);
110 diff_N[
i]=bound_N[
i]-f_rect[
i];
111 diff_S[
i]=bound_S[
i]-f_rect[
i];
112 diff_E[
i]=bound_E[
i]-f_rect[
i];
113 diff_W[
i]=bound_W[
i]-f_rect[
i];
117 diff_S[
i]*(1.0-0.5*(S[1]+1.0)) +
118 diff_N[
i]*0.5*(S[1]+1.0) +
119 diff_W[
i]*(1.0-0.5*(S[0]+1.0)) +
120 diff_E[
i]*0.5*(S[0]+1.0);
129 const unsigned& nplot)
131 using namespace QuadTreeNames;
137 for (
unsigned idirect=
N;idirect<=
W;idirect++)
139 outfile <<
"ZONE I=" << nplot << std::endl;
140 for (
unsigned j=0;j<nplot;j++)
142 s[0]=-1.0+2.0*double(j)/double(nplot-1);
144 outfile << f[0] <<
" " << f[1]<< std::endl;
159 using namespace QuadTreeNames;
219 0.25*(corner_SW[0] - corner_SE[0] + corner_NW[0] - corner_NE[0]
220 - corner_NE[0]*S[1] + corner_NW[0]*S[1] + corner_SE[0]*S[1]
221 - corner_SW[0]*S[1])+0.5*(dbound_S[0] + dbound_N[0] - bound_W[0]
222 + bound_E[0] - dbound_S[0]*S[1]
226 0.25*(corner_SW[1] - corner_SE[1] + corner_NW[1] - corner_NE[1]
227 - corner_NE[1]*S[1] + corner_NW[1]*S[1] + corner_SE[1]*S[1]
228 - corner_SW[1]*S[1])+0.5*(dbound_S[1] + dbound_N[1] - bound_W[1]
229 + bound_E[1] - dbound_S[1]*S[1]
233 0.25*(corner_SW[0] + corner_SE[0] - corner_NW[0] - corner_NE[0]
234 + corner_SE[0]*S[0] - corner_SW[0]*S[0] - corner_NE[0]*S[0]
235 + corner_NW[0]*S[0])+0.5*(-bound_S[0] + bound_N[0] + dbound_W[0]
236 + dbound_E[0] - dbound_W[0]*S[0]
240 0.25*(corner_SW[1] + corner_SE[1] - corner_NW[1] - corner_NE[1]
241 + corner_SE[1]*S[0] - corner_SW[1]*S[0] - corner_NE[1]*S[0]
242 + corner_NW[1]*S[0])+0.5*(-bound_S[1] + bound_N[1] + dbound_W[1]
243 + dbound_E[1] - dbound_W[1]*S[0]
255 using namespace QuadTreeNames;
327 jacobian2(0,0) = 0.5*(d2bound_S[0] + d2bound_N[0] - d2bound_S[0]*S[1] +
330 jacobian2(1,0) = 0.5*(d2bound_W[0] + d2bound_E[0] - d2bound_W[0]*S[0] +
333 jacobian2(2,0) = 0.25*(-corner_NE[0] + corner_NW[0] + corner_SE[0] -
334 corner_SW[0]) +0.5*(-dbound_W[0] + dbound_E[0] -
335 dbound_S[0] + dbound_N[0]);
337 jacobian2(0,1) = 0.5*(d2bound_S[1] + d2bound_N[1] - d2bound_S[1]*S[1] +
340 jacobian2(1,1) = 0.5*(d2bound_W[1] + d2bound_E[1] - d2bound_W[1]*S[0] +
343 jacobian2(2,1) = 0.25*(-corner_NE[1] + corner_NW[1] + corner_SE[1] -
344 corner_SW[1]) + 0.5*(-dbound_W[1] + dbound_E[1] -
345 dbound_S[1] + dbound_N[1]);
492 for(
unsigned i=0;
i<3;
i++)
501 ptUp=corner_LU[
i]+(corner_RU[
i]-corner_LU[
i])*0.5*(S[0]+1.0);
502 ptDo=corner_LD[
i]+(corner_RD[
i]-corner_LD[
i])*0.5*(S[0]+1.0);
504 slice_mid=ptDo+0.5*(1.0+S[1])*(ptUp-ptDo);
507 double diff_L,diff_R,diff_D,diff_U;
508 diff_L=edge_mid_L[
i]-slice_mid;
509 diff_R=edge_mid_R[
i]-slice_mid;
510 diff_D=edge_mid_D[
i]-slice_mid;
511 diff_U=edge_mid_U[
i]-slice_mid;
514 slice_mid+=diff_L*(1.0-0.5*(S[0]+1.0)) +
515 diff_R*0.5*(S[0]+1.0) +
516 diff_D*(1.0-0.5*(S[1]+1.0)) +
517 diff_U*0.5*(S[1]+1.0);
525 ptUp=corner_LUB[
i]+(corner_RUB[
i]-corner_LUB[
i])*0.5*(S[0]+1.0);
526 ptDo=corner_LDB[
i]+(corner_RDB[
i]-corner_LDB[
i])*0.5*(S[0]+1.0);
528 slice_back=ptDo+0.5*(1.0+S[1])*(ptUp-ptDo);
531 diff_L=edge_back_L[
i]-slice_back;
532 diff_R=edge_back_R[
i]-slice_back;
533 diff_D=edge_back_D[
i]-slice_back;
534 diff_U=edge_back_U[
i]-slice_back;
537 slice_back+=diff_L*(1.0-0.5*(S[0]+1.0)) +
538 diff_R*0.5*(S[0]+1.0) +
539 diff_D*(1.0-0.5*(S[1]+1.0)) +
540 diff_U*0.5*(S[1]+1.0);
547 ptUp=corner_LUF[
i]+(corner_RUF[
i]-corner_LUF[
i])*0.5*(S[0]+1.0);
548 ptDo=corner_LDF[
i]+(corner_RDF[
i]-corner_LDF[
i])*0.5*(S[0]+1.0);
550 slice_front=ptDo+0.5*(1.0+S[1])*(ptUp-ptDo);
553 diff_L=edge_front_L[
i]-slice_front;
554 diff_R=edge_front_R[
i]-slice_front;
555 diff_D=edge_front_D[
i]-slice_front;
556 diff_U=edge_front_U[
i]-slice_front;
559 slice_front+=diff_L*(1.0-0.5*(S[0]+1.0)) +
560 diff_R*0.5*(S[0]+1.0) +
561 diff_D*(1.0-0.5*(S[1]+1.0)) +
562 diff_U*0.5*(S[1]+1.0);
567 double diff_back=face_B[
i]-slice_back;
568 double diff_front=face_F[
i]-slice_front;
573 r[
i]=slice_mid+0.5*(1+S[2])*diff_front+0.5*(1-S[2])*diff_back;
585 const unsigned& nplot)
587 using namespace OcTreeNames;
593 for (
unsigned idirect=
L;idirect<=
F;idirect++)
595 outfile <<
"ZONE I=" << nplot <<
", J=" << nplot << std::endl;
596 for (
unsigned i=0;
i<nplot;
i++)
598 s[1]=-1.0+2.0*double(
i)/double(nplot-1);
599 for (
unsigned j=0;j<nplot;j++)
601 s[0]=-1.0+2.0*double(j)/double(nplot-1);
603 outfile << f[0] <<
" " << f[1] <<
" " << f[2] << std::endl;
virtual void assemble_macro_to_eulerian_jacobian(const unsigned &t, const Vector< double > &s, DenseMatrix< double > &jacobian)
the jacobian of the mapping from the macro coordinates to the global coordinates
virtual void output_macro_element_boundaries(std::ostream &outfile, const unsigned &nplot)=0
Output all macro element boundaries as tecplot zones.
Domain * Domain_pt
Pointer to domain.
void macro_map(const Vector< double > &s, Vector< double > &r)
The mapping from local to global coordinates at the current time : r(s)
virtual void assemble_macro_to_eulerian_jacobian2(const unsigned &t, const Vector< double > &s, DenseMatrix< double > &jacobian2)
Assembles the second derivative jacobian of the mapping from the macro coordinates to the global coor...
virtual void d2macro_element_boundary(const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
Vector representation of the i_macro-th macro element boundary second derivatives i_direct (e...
unsigned Macro_element_number
What is the number of the current macro element within its domain.
virtual void dmacro_element_boundary(const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)
Vector representation of the i_macro-th macro element boundary derivatives i_direct (e...
virtual void macro_element_boundary(const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)=0
Vector representation of the i_macro-th macro element boundary i_direct (e.g. N/S/W/E in 2D) at time ...