66 #define TRSUPG_ZERO_VOF 1.e-8 99 answer = {V_u, V_v, P_f};
200 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
206 for (
int i = 1; i <= 3; i++ ) {
207 for (
int j = 1; j <= 3; j++ ) {
208 val = rho * n.
at(i) * n.
at(j) * dV;
209 answer.
at(i * 2 - 1, j * 2 - 1) += val;
210 answer.
at(i * 2, j * 2) += val;
219 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
224 u1 = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
225 u2 = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
226 for (
int i = 1; i <= 3; i++ ) {
227 for (
int j = 1; j <= 3; j++ ) {
228 val = dV * rho *
t_supg * ( u1 *
b [ i - 1 ] + u2 *
c [ i - 1 ] ) * n.
at(j);
229 answer.
at(i * 2, j * 2) += val;
230 answer.
at(i * 2 - 1, j * 2 - 1) += val;
267 #ifdef TR1_2D_SUPG2_DEBUG 273 for ( i = 1; i <= 6; i++ ) {
274 for ( j = 1; j <= 6; j++ ) {
275 if ( fabs( ( answer.
at(i, j) - test.
at(i, j) ) / test.
at(i, j) ) >= 1.e-10 ) {
293 double dV, dudx, dudy, dvdx, dvdy, u1, u2;
298 dudx =
b [ 0 ] * u.
at(1) +
b [ 1 ] * u.
at(3) +
b [ 2 ] * u.
at(5);
299 dudy =
c [ 0 ] * u.
at(1) +
c [ 1 ] * u.
at(3) +
c [ 2 ] * u.
at(5);
300 dvdx =
b [ 0 ] * u.
at(2) +
b [ 1 ] * u.
at(4) +
b [ 2 ] * u.
at(6);
301 dvdy =
c [ 0 ] * u.
at(2) +
c [ 1 ] * u.
at(4) +
c [ 2 ] * u.
at(6);
304 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
310 u1 = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
311 u2 = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
312 for (
int i = 1; i <= 3; i++ ) {
313 answer.
at(i * 2 - 1) += rho * dV * n.
at(i) * ( u1 * dudx + u2 * dudy );
314 answer.
at(i * 2) += rho * dV * n.
at(i) * ( u1 * dvdx + u2 * dvdy );
320 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
326 u1 = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
327 u2 = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
328 for (
int i = 1; i <= 3; i++ ) {
329 answer.
at(i * 2 - 1) +=
t_supg * rho * dV * ( u1 *
b [ i - 1 ] + u2 *
c [ i - 1 ] ) * ( u1 * dudx + u2 * dudy );
330 answer.
at(i * 2) +=
t_supg * rho * dV * ( u1 *
b [ i - 1 ] + u2 *
c [ i - 1 ] ) * ( u1 * dvdx + u2 * dvdy );
341 for (
int i = 1; i <= 6; i++ ) {
342 if ( ( fabs( answer.
at(i) - _t.
at(i) ) >= 1.e-6 ) ) {
350 #ifdef TR1_2D_SUPG2_DEBUG 356 for (
int i = 1; i <= 6; i++ ) {
357 if ( fabs( ( answer.
at(i) - test.
at(i) ) / test.
at(i) ) >= 1.e-10 ) {
378 int w_dof_addr, u_dof_addr, dij;
382 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
388 u1 = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
389 u2 = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
390 for (
int i = 1; i <= 2; i++ ) {
391 for (
int k = 1; k <= 3; k++ ) {
392 for (
int j = 1; j <= 2; j++ ) {
393 for (
int m = 1; m <= 3; m++ ) {
394 w_dof_addr = ( k - 1 ) * 2 + i;
395 u_dof_addr = ( m - 1 ) * 2 + j;
397 answer.
at(w_dof_addr, u_dof_addr) += rho * dV * n.
at(k) * ( u1 * dij *
b [ m - 1 ] + u2 * dij *
c [ m - 1 ] );
406 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
412 u1 = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
413 u2 = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
414 for (
int i = 1; i <= 2; i++ ) {
415 for (
int k = 1; k <= 3; k++ ) {
416 for (
int j = 1; j <= 2; j++ ) {
417 for (
int m = 1; m <= 3; m++ ) {
418 w_dof_addr = ( k - 1 ) * 2 + i;
419 u_dof_addr = ( m - 1 ) * 2 + j;
421 answer.
at(w_dof_addr, u_dof_addr) +=
t_supg * rho * dV * ( u1 *
b [ k - 1 ] + u2 *
c [ k - 1 ] ) * ( u1 * dij *
b [ m - 1 ] + u2 * dij *
c [ m - 1 ] );
429 #ifdef TR1_2D_SUPG2_DEBUG 435 for (
int i = 1; i <= 6; i++ ) {
436 for (
int j = 1; j <= 6; j++ ) {
437 if ( fabs( ( answer.
at(i, j) - test.
at(i, j) ) / test.
at(i, j) ) >= 1.e-8 ) {
438 OOFEM_ERROR(
"test failure (err=%e)", ( answer.
at(i, j) - test.
at(i, j) ) / test.
at(i, j));
458 eps.at(1) = (
b [ 0 ] * u.
at(1) +
b [ 1 ] * u.
at(3) +
b [ 2 ] * u.
at(5) );
459 eps.at(2) = (
c [ 0 ] * u.
at(2) +
c [ 1 ] * u.
at(4) +
c [ 2 ] * u.
at(6) );
460 eps.at(3) = (
b [ 0 ] * u.
at(2) +
b [ 1 ] * u.
at(4) +
b [ 2 ] * u.
at(6) +
c [ 0 ] * u.
at(1) +
c [ 1 ] * u.
at(3) +
c [ 2 ] * u.
at(5) );
470 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
476 stress.
times(1. / Re);
479 for (
int i = 0; i < 3; i++ ) {
482 answer.
at( ( i ) * 2 + 1 ) += dV * ( stress.
at(1) *
b [ i ] + stress.
at(3) *
c [ i ] );
483 answer.
at( ( i + 1 ) * 2 ) += dV * ( stress.
at(3) *
b [ i ] + stress.
at(2) *
c [ i ] );
494 #ifdef TR1_2D_SUPG2_DEBUG 500 for (
int i = 1; i <= 6; i++ ) {
501 if ( fabs( ( answer.
at(i) - test.at(i) ) / test.at(i) ) >= 1.e-10 ) {
521 _b.
at(1, 1) =
b [ 0 ];
523 _b.
at(1, 3) =
b [ 1 ];
525 _b.
at(1, 5) =
b [ 2 ];
528 _b.
at(2, 2) =
c [ 0 ];
530 _b.
at(2, 4) =
c [ 1 ];
532 _b.
at(2, 6) =
c [ 2 ];
533 _b.
at(3, 1) =
c [ 0 ];
534 _b.
at(3, 2) =
b [ 0 ];
535 _b.
at(3, 3) =
c [ 1 ];
536 _b.
at(3, 4) =
b [ 1 ];
537 _b.
at(3, 5) =
c [ 2 ];
538 _b.
at(3, 6) =
b [ 2 ];
555 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
570 answer.
times(1. / Re);
572 #ifdef TR1_2D_SUPG2_DEBUG 578 for (
int i = 1; i <= 6; i++ ) {
579 for (
int j = 1; j <= 6; j++ ) {
580 if ( fabs( ( answer.
at(i, j) - test.
at(i, j) ) / test.
at(i, j) ) >= 1.e-8 ) {
581 OOFEM_ERROR(
"test failure (err=%e)", ( answer.
at(i, j) - test.
at(i, j) ) / test.
at(i, j));
598 double ar3 =
area / 3.0, coeff;
604 answer.
at(1, 1) = answer.
at(1, 2) = answer.
at(1, 3) = -
b [ 0 ] * ar3;
605 answer.
at(3, 1) = answer.
at(3, 2) = answer.
at(3, 3) = -
b [ 1 ] * ar3;
606 answer.
at(5, 1) = answer.
at(5, 2) = answer.
at(5, 3) = -
b [ 2 ] * ar3;
608 answer.
at(2, 1) = answer.
at(2, 2) = answer.
at(2, 3) = -
c [ 0 ] * ar3;
609 answer.
at(4, 1) = answer.
at(4, 2) = answer.
at(4, 3) = -
c [ 1 ] * ar3;
610 answer.
at(6, 1) = answer.
at(6, 2) = answer.
at(6, 3) = -
c [ 2 ] * ar3;
615 usum = un.
at(1) + un.
at(3) + un.
at(5);
616 vsum = un.
at(2) + un.
at(4) + un.
at(6);
619 answer.
at(1, 1) += coeff * ( usum *
b [ 0 ] *
b [ 0 ] + vsum *
c [ 0 ] *
b [ 0 ] );
620 answer.
at(1, 2) += coeff * ( usum *
b [ 0 ] *
b [ 1 ] + vsum *
c [ 0 ] *
b [ 1 ] );
621 answer.
at(1, 3) += coeff * ( usum *
b [ 0 ] *
b [ 2 ] + vsum *
c [ 0 ] *
b [ 2 ] );
623 answer.
at(3, 1) += coeff * ( usum *
b [ 1 ] *
b [ 0 ] + vsum *
c [ 1 ] *
b [ 0 ] );
624 answer.
at(3, 2) += coeff * ( usum *
b [ 1 ] *
b [ 1 ] + vsum *
c [ 1 ] *
b [ 1 ] );
625 answer.
at(3, 3) += coeff * ( usum *
b [ 1 ] *
b [ 2 ] + vsum *
c [ 1 ] *
b [ 2 ] );
627 answer.
at(5, 1) += coeff * ( usum *
b [ 2 ] *
b [ 0 ] + vsum *
c [ 2 ] *
b [ 0 ] );
628 answer.
at(5, 2) += coeff * ( usum *
b [ 2 ] *
b [ 1 ] + vsum *
c [ 2 ] *
b [ 1 ] );
629 answer.
at(5, 3) += coeff * ( usum *
b [ 2 ] *
b [ 2 ] + vsum *
c [ 2 ] *
b [ 2 ] );
631 answer.
at(2, 1) += coeff * ( usum *
b [ 0 ] *
c [ 0 ] + vsum *
c [ 0 ] *
c [ 0 ] );
632 answer.
at(2, 2) += coeff * ( usum *
b [ 0 ] *
c [ 1 ] + vsum *
c [ 0 ] *
c [ 1 ] );
633 answer.
at(2, 3) += coeff * ( usum *
b [ 0 ] *
c [ 2 ] + vsum *
c [ 0 ] *
c [ 2 ] );
635 answer.
at(4, 1) += coeff * ( usum *
b [ 1 ] *
c [ 0 ] + vsum *
c [ 1 ] *
c [ 0 ] );
636 answer.
at(4, 2) += coeff * ( usum *
b [ 1 ] *
c [ 1 ] + vsum *
c [ 1 ] *
c [ 1 ] );
637 answer.
at(4, 3) += coeff * ( usum *
b [ 1 ] *
c [ 2 ] + vsum *
c [ 1 ] *
c [ 2 ] );
639 answer.
at(6, 1) += coeff * ( usum *
b [ 2 ] *
c [ 0 ] + vsum *
c [ 2 ] *
c [ 0 ] );
640 answer.
at(6, 2) += coeff * ( usum *
b [ 2 ] *
c [ 1 ] + vsum *
c [ 2 ] *
c [ 1 ] );
641 answer.
at(6, 3) += coeff * ( usum *
b [ 2 ] *
c [ 2 ] + vsum *
c [ 2 ] *
c [ 2 ] );
653 b [ 0 ],
c [ 0 ],
b [ 1 ], c [ 1 ], b [ 2 ], c [ 2 ]
656 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
662 for (
int i = 1; i <= 6; i++ ) {
663 for (
int j = 1; j <= 6; j++ ) {
664 answer.
at(i, j) += dV *
t_lsic * rho * n [ i - 1 ] * n [ j - 1 ];
670 #ifdef TR1_2D_SUPG2_DEBUG 676 for (
int i = 1; i <= 6; i++ ) {
677 for (
int j = 1; j <= 6; j++ ) {
678 if ( fabs( ( answer.
at(i, j) - test.
at(i, j) ) / test.
at(i, j) ) >= 1.e-8 ) {
679 OOFEM_ERROR(
"test failure (err=%e)", ( answer.
at(i, j) - test.
at(i, j) ) / test.
at(i, j));
699 double dudx, dudy, dvdx, dvdy, usum, vsum;
705 dudx =
b [ 0 ] * u.
at(1) +
b [ 1 ] * u.
at(3) +
b [ 2 ] * u.
at(5);
706 dudy =
c [ 0 ] * u.
at(1) +
c [ 1 ] * u.
at(3) +
c [ 2 ] * u.
at(5);
707 dvdx =
b [ 0 ] * u.
at(2) +
b [ 1 ] * u.
at(4) +
b [ 2 ] * u.
at(6);
708 dvdy =
c [ 0 ] * u.
at(2) +
c [ 1 ] * u.
at(4) +
c [ 2 ] * u.
at(6);
710 usum = un.
at(1) + un.
at(3) + un.
at(5);
711 vsum = un.
at(2) + un.
at(4) + un.
at(6);
715 answer.
at(1) = coeff * (
b [ 0 ] * ( dudx * usum + dudy * vsum ) +
c [ 0 ] * ( dvdx * usum + dvdy * vsum ) );
716 answer.
at(2) = coeff * (
b [ 1 ] * ( dudx * usum + dudy * vsum ) +
c [ 1 ] * ( dvdx * usum + dvdy * vsum ) );
717 answer.
at(3) = coeff * (
b [ 2 ] * ( dudx * usum + dudy * vsum ) +
c [ 2 ] * ( dvdx * usum + dvdy * vsum ) );
726 int w_dof_addr, u_dof_addr, d1j, d2j, km1, mm1;
732 double dudx [ 2 ] [ 2 ], usum [ 2 ];
735 dudx [ 0 ] [ 0 ] =
b [ 0 ] * u.
at(1) +
b [ 1 ] * u.
at(3) +
b [ 2 ] * u.
at(5);
736 dudx [ 0 ] [ 1 ] =
c [ 0 ] * u.
at(1) +
c [ 1 ] * u.
at(3) +
c [ 2 ] * u.
at(5);
737 dudx [ 1 ] [ 0 ] =
b [ 0 ] * u.
at(2) +
b [ 1 ] * u.
at(4) +
b [ 2 ] * u.
at(6);
738 dudx [ 1 ] [ 1 ] =
c [ 0 ] * u.
at(2) +
c [ 1 ] * u.
at(4) +
c [ 2 ] * u.
at(6);
739 usum [ 0 ] = un.
at(1) + un.
at(3) + un.
at(5);
740 usum [ 1 ] = un.
at(2) + un.
at(4) + un.
at(6);
744 for (
int k = 1; k <= 3; k++ ) {
746 for (
int j = 1; j <= 2; j++ ) {
747 for (
int m = 1; m <= 3; m++ ) {
749 u_dof_addr = ( m - 1 ) * 2 + j;
753 answer.
at(w_dof_addr, u_dof_addr) = coeff * ( 0.0 * d1j *
b [ km1 ] * dudx [ 0 ] [ 0 ] + d1j *
b [ km1 ] *
b [ mm1 ] * usum [ 0 ] +
754 0.0 * d2j *
b [ km1 ] * dudx [ 0 ] [ 1 ] + d1j *
b [ km1 ] *
c [ mm1 ] * usum [ 1 ] +
755 0.0 * d1j *
c [ km1 ] * dudx [ 1 ] [ 0 ] + d2j *
c [ km1 ] *
b [ mm1 ] * usum [ 0 ] +
756 0.0 * d2j *
c [ km1 ] * dudx [ 1 ] [ 1 ] + d2j *
c [ km1 ] *
c [ mm1 ] * usum [ 1 ] );
776 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
782 for (
int i = 1; i <= 3; i++ ) {
783 for (
int j = 1; j <= 3; j++ ) {
784 answer.
at(i, j) +=
t_pspg * dV * (
b [ i - 1 ] *
b [ j - 1 ] +
c [ i - 1 ] *
c [ j - 1 ] ) / rho;
790 #ifdef TR1_2D_SUPG2_DEBUG 796 for (
int i = 1; i <= 3; i++ ) {
797 for (
int j = 1; j <= 3; j++ ) {
798 if ( fabs( ( answer.
at(i, j) - test.at(i, j) ) / test.at(i, j) ) >= 1.e-8 ) {
799 OOFEM_ERROR(
"test failure (err=%e)", ( answer.
at(i, j) - test.at(i, j) ) / test.at(i, j));
825 for (
int i = 1; i <= nLoads; i++ ) {
831 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
837 u1 = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
838 u2 = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
840 for ( i = 1; i <= 3; i++ ) {
841 answer.
at(i * 2 - 1) += rho * dV * gVector.
at(1) * ( n.
at(i) +
t_supg * ( u1 *
b [ i - 1 ] + u2 *
c [ i - 1 ] ) );
842 answer.
at(i * 2) += rho * dV * gVector.
at(2) * ( n.
at(i) +
t_supg * ( u1 *
b [ i - 1 ] + u2 *
c [ i - 1 ] ) );
853 double tx, ty, length;
859 for (
int i = 1; i <= nLoads; i++ ) {
866 n2 = ( n1 == 3 ? 1 : n1 + 1 );
870 length = sqrt(tx * tx + ty * ty);
880 answer.
at( ( n1 - 1 ) * 2 + 1 ) += t.
at(1) * length / 2.;
881 answer.
at(n1 * 2) += t.
at(2) * length / 2.;
883 answer.
at( ( n2 - 1 ) * 2 + 1 ) += t.
at(1) * length / 2.;
884 answer.
at(n2 * 2) += t.
at(2) * length / 2.;
892 #ifdef TR1_2D_SUPG2_DEBUG 898 for (
int i = 1; i <= 6; i++ ) {
899 if ( fabs( ( answer.
at(i) - test.
at(i) ) / test.
at(i) ) >= 1.e-10 ) {
919 int i, j, k, l, w_dof_addr, u_dof_addr, ip, ifluid;
920 double __g_norm, __gamma_norm, __gammav_norm, __beta_norm, __betav_norm, __c_norm, __e_norm, __k_norm, __Re;
921 double __t_p1, __t_p2, __t_p3, __t_pv1, __t_pv2, __t_pv3;
922 double nu, nu0, nu1, usum, vsum, rho, dV, u1, u2;
933 nu0 = this->
_giveMaterial(0)->giveCharacteristicValue(MRM_Viscosity, gp, tStep);
934 nu1 = this->
_giveMaterial(1)->giveCharacteristicValue(MRM_Viscosity, gp, tStep);
935 nu =
vof * nu0 + ( 1. -
vof ) * nu1;
942 usum = un.
at(1) + un.
at(3) + un.
at(5);
943 vsum = un.
at(2) + un.
at(4) + un.
at(6);
949 double ar3 =
area / 3.0;
951 __tmp.
at(1, 1) = __tmp.
at(1, 2) = __tmp.
at(1, 3) =
b [ 0 ] * ar3;
952 __tmp.
at(3, 1) = __tmp.
at(3, 2) = __tmp.
at(3, 3) =
b [ 1 ] * ar3;
953 __tmp.
at(5, 1) = __tmp.
at(5, 2) = __tmp.
at(5, 3) =
b [ 2 ] * ar3;
955 __tmp.
at(2, 1) = __tmp.
at(2, 2) = __tmp.
at(2, 3) =
c [ 0 ] * ar3;
956 __tmp.
at(4, 1) = __tmp.
at(4, 2) = __tmp.
at(4, 3) =
c [ 1 ] * ar3;
957 __tmp.
at(6, 1) = __tmp.
at(6, 2) = __tmp.
at(6, 3) =
c [ 2 ] * ar3;
963 for ( k = 1; k <= 3; k++ ) {
964 for ( l = 1; l <= 3; l++ ) {
965 __tmp.
at(k, l * 2 - 1) = ar3 *
b [ k - 1 ] * ( usum *
b [ l - 1 ] + vsum *
c [ l - 1 ] );
966 __tmp.
at(k, l * 2) = ar3 *
c [ k - 1 ] * ( usum *
b [ l - 1 ] + vsum *
c [ l - 1 ] );
976 __tmp.
at(1, 1) = __tmp.
at(1, 3) = __tmp.
at(1, 5) = ar3 *
b [ 0 ];
977 __tmp.
at(1, 2) = __tmp.
at(1, 4) = __tmp.
at(1, 6) = ar3 *
c [ 0 ];
978 __tmp.
at(2, 1) = __tmp.
at(2, 3) = __tmp.
at(2, 5) = ar3 * b [ 1 ];
979 __tmp.
at(2, 2) = __tmp.
at(2, 4) = __tmp.
at(2, 6) = ar3 * c [ 1 ];
980 __tmp.
at(3, 1) = __tmp.
at(3, 3) = __tmp.
at(3, 5) = ar3 * b [ 2 ];
981 __tmp.
at(3, 2) = __tmp.
at(3, 4) = __tmp.
at(3, 6) = ar3 * c [ 2 ];
989 for ( ifluid = 0; ifluid < 2; ifluid++ ) {
995 u1 = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
996 u2 = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
997 for ( i = 1; i <= 2; i++ ) {
998 for ( k = 1; k <= 3; k++ ) {
999 for ( l = 1; l <= 3; l++ ) {
1000 w_dof_addr = ( k - 1 ) * 2 + i;
1001 u_dof_addr = ( l - 1 ) * 2 + i;
1002 __tmp.
at(w_dof_addr, u_dof_addr) += rho * dV * n.
at(k) * ( u1 * b [ l - 1 ] + u2 * c [ l - 1 ] );
1014 b [ 0 ], c [ 0 ], b [ 1 ], c [ 1 ], b [ 2 ], c [ 2 ]
1016 for ( ifluid = 0; ifluid < 2; ifluid++ ) {
1021 for ( i = 1; i <= 6; i++ ) {
1022 for ( j = 1; j <= 6; j++ ) {
1023 __tmp.
at(i, j) += dV * rho * __n [ i - 1 ] * __n [ j - 1 ];
1034 for ( ifluid = 0; ifluid < 2; ifluid++ ) {
1040 u1 = n.
at(1) * un.
at(1) + n.
at(2) * un.
at(3) + n.
at(3) * un.
at(5);
1041 u2 = n.
at(1) * un.
at(2) + n.
at(2) * un.
at(4) + n.
at(3) * un.
at(6);
1042 for ( k = 1; k <= 3; k++ ) {
1043 for ( l = 1; l <= 3; l++ ) {
1044 __tmp.
at(k * 2 - 1, l * 2 - 1) += rho * dV * ( u1 * b [ k - 1 ] + u2 * c [ k - 1 ] ) * ( u1 * b [ l - 1 ] + u2 * c [ l - 1 ] );
1045 __tmp.
at(k * 2, l * 2) += rho * dV * ( u1 * b [ k - 1 ] + u2 * c [ k - 1 ] ) * ( u1 * b [ l - 1 ] + u2 * c [ l - 1 ] );
1052 double u_1, u_2, vnorm = 0.;
1054 for ( i = 1; i <= 3; i++ ) {
1056 u_1 = u.
at( ( im1 ) * 2 + 1 );
1057 u_2 = u.
at( ( im1 ) * 2 + 2 );
1058 vnorm =
max( vnorm, sqrt(u_1 * u_1 + u_2 * u_2) );
1061 if ( vnorm == 0.0 ) {
1065 this->
t_supg = 1. / sqrt( 1. / ( t_sugn2 * t_sugn2 ) );
1069 __Re = vnorm * vnorm * __c_norm / __k_norm / nu;
1071 __t_p1 = __g_norm / __gamma_norm;
1073 __t_p3 = __t_p1 * __Re;
1074 this->
t_pspg = 1. / sqrt( 1. / ( __t_p1 * __t_p1 ) + 1. / ( __t_p2 * __t_p2 ) + 1. / ( __t_p3 * __t_p3 ) );
1077 __t_pv2 = __t_pv1 * __gammav_norm / __betav_norm;
1078 __t_pv3 = __t_pv1 * __Re;
1079 this->
t_supg = 1. / sqrt( 1. / ( __t_pv1 * __t_pv1 ) + 1. / ( __t_pv2 * __t_pv2 ) + 1. / ( __t_pv3 * __t_pv3 ) );
1081 this->
t_lsic = __c_norm / __e_norm;
1086 double h_ugn, sum = 0.0, vnorm, t_sugn1, t_sugn2, t_sugn3, u_1, u_2, z, Re_ugn;
1087 double dscale, uscale, lscale, tscale, dt;
1099 double nu, nu0, nu1;
1111 nu =
vof * nu0 + ( 1. -
vof ) * nu1;
1116 for (
int i = 1; i <= 3; i++ ) {
1118 sum += fabs(u.
at( ( im1 ) * 2 + 1 ) * b [ im1 ] / lscale + u.
at(im1 * 2 + 2) * c [ im1 ] / lscale);
1127 for (
int i = 1; i <= 3; i++ ) {
1129 u_1 = u.
at( ( im1 ) * 2 + 1 );
1130 u_2 = u.
at( ( im1 ) * 2 + 2 );
1131 vnorm =
max( vnorm, sqrt(u_1 * u_1 + u_2 * u_2) );
1134 if ( ( vnorm == 0.0 ) || ( sum == 0.0 ) ) {
1138 this->
t_supg = 1. / sqrt( 1. / ( t_sugn2 * t_sugn2 ) );
1142 h_ugn = 2.0 * vnorm / sum;
1145 t_sugn3 = h_ugn * h_ugn / 4.0 / nu;
1147 this->
t_supg = 1. / sqrt( 1. / ( t_sugn1 * t_sugn1 ) + 1. / ( t_sugn2 * t_sugn2 ) + 1. / ( t_sugn3 * t_sugn3 ) );
1150 Re_ugn = vnorm * h_ugn / ( 2. * nu );
1151 z = ( Re_ugn <= 3. ) ? Re_ugn / 3. : 1.0;
1152 this->
t_lsic = h_ugn * vnorm * z / 2.0;
1160 this->
t_supg *= uscale / lscale;
1161 this->
t_pspg *= 1. / ( lscale * dscale );
1162 this->
t_lsic *= ( dscale * uscale ) / ( lscale * lscale );
1214 for (
int i = 1; i <= 3; i++ ) {
1261 if ( answer > 1.000000001 ) {
1262 OOFEM_WARNING(
"VOF fraction out of bounds, vof = %e\n", answer);
1281 for (
int i = 1; i <= 3; i++ ) {
1307 double nx = normal.
at(1), ny = normal.
at(2), x, y;
1313 for (
int i = 1; i <= 3; i++ ) {
1322 if ( ( nx * x + ny * y + p ) >= 0. ) {
1323 nodeIn [ i - 1 ] =
true;
1325 nodeIn [ i - 1 ] =
false;
1329 if ( nodeIn [ 0 ] && nodeIn [ 1 ] && nodeIn [ 2 ] ) {
1330 for (
int i = 1; i <= 3; i++ ) {
1344 }
else if ( !( nodeIn [ 0 ] || nodeIn [ 1 ] || nodeIn [ 2 ] ) ) {
1347 for (
int i = 1; i <= 3; i++ ) {
1348 next = i < 3 ? i + 1 : 1;
1349 if ( nodeIn [ i - 1 ] ) {
1355 this->
giveNode(i)->giveCoordinate(2) );
1361 if ( nodeIn [ next - 1 ] ^ nodeIn [ i - 1 ] ) {
1375 double s, sd = nx * tx + ny * ty;
1376 if ( fabs(sd) > 1.e-10 ) {
1377 s = ( -p - ( nx * x + ny * y ) ) / sd;
1382 if ( nodeIn [ i - 1 ] ) {
1420 double nx = normal.
at(1), ny = normal.
at(2), x, y;
1424 rfPoints = sfPoints = 0;
1425 referenceFluidPoly.
clear();
1426 secondFluidPoly.
clear();
1428 for (
int i = 1; i <= 3; i++ ) {
1432 if ( ( nx * x + ny * y + p ) >= 0. ) {
1433 nodeIn [ i - 1 ] =
true;
1435 nodeIn [ i - 1 ] =
false;
1439 if ( nodeIn [ 0 ] && nodeIn [ 1 ] && nodeIn [ 2 ] ) {
1440 for (
int i = 1; i <= 3; i++ ) {
1450 }
else if ( !( nodeIn [ 0 ] || nodeIn [ 1 ] || nodeIn [ 2 ] ) ) {
1451 for (
int i = 1; i <= 3; i++ ) {
1462 for (
int i = 1; i <= 3; i++ ) {
1463 next = i < 3 ? i + 1 : 1;
1464 if ( nodeIn [ i - 1 ] ) {
1466 this->
giveNode(i)->giveCoordinate(2) );
1472 this->
giveNode(i)->giveCoordinate(2) );
1478 if ( nodeIn [ next - 1 ] ^ nodeIn [ i - 1 ] ) {
1485 double s, sd = nx * tx + ny * ty;
1486 if ( fabs(sd) > 1.e-10 ) {
1487 s = ( -p - ( nx * x + ny * y ) ) / sd;
1495 if ( nodeIn [ i - 1 ] ) {
1525 g.
clip(clip, me, matvolpoly);
1527 EASValsSetColor(
gc [ 0 ].getActiveCrackColor() );
1533 return volume /
area;
1544 for (
int i = 1; i <= 3; i++ ) {
1562 double x1, x2, x3, y1, y2, y3;
1571 return 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 );
1585 for (
int i = 1; i <= 3; i++ ) {
1590 for (
int i = 1; i <= 3; i++ ) {
1596 center.
times(1. / 3.);
1621 for (
int i = 1; i <= dofId.
giveSize(); i++ ) {
1624 for (
int j = 1; j <= 3; j++ ) {
1625 sum += lc.
at(j) * elemvector.
at(es * ( j - 1 ) + indx);
1637 OOFEM_ERROR(
"target point not in receiver volume");
1657 for (
int i = 0; i < 2; i++ ) {
1662 for (
int i = 1; i <= 3; i++ ) {
1671 for (
int i = 1; i <= 3; i++ ) {
1692 for (
int i = 0; i < 2; i++ ) {
1693 if ( c [ i ] == 3 ) {
1695 approx = & triaApprox;
1696 }
else if ( c [ i ] == 4 ) {
1698 approx = & quadApprox;
1699 }
else if ( c [ i ] == 0 ) {
1702 OOFEM_ERROR(
"cannot set up integration domain for %d vertex polygon", c [ i ]);
1715 vcoords [ i ].reserve(c [ i ]);
1730 gp->setSubPatchCoordinates( gp->giveNaturalCoordinates() );
1731 gp->setNaturalCoordinates(lc);
1737 double dV, __area = 0.0;
1738 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
1746 double __err = fabs(__area -
area) /
area;
1747 if ( __err > 1.e-6 ) {
1748 OOFEM_ERROR(
"volume inconsistency (%5.2f)", __err * 100);
1751 for (
int ifluid = 0; ifluid < 2; ifluid++ ) {
1773 return det * weight;
1787 if ( type == IST_VOFFraction ) {
1863 fprintf(file,
"VOF %e, density %e\n\n", vof, rho0*vof + rho1*(1-vof));
1943 EASValsSetEdgeFlag(
true);
1955 go = CreateTriangle3D(p);
1956 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
1957 EGAttachObject(go, ( EObjectP )
this);
1958 EMAddGraphicsToModel(ESIModel(), go);
1963 int i, indx, result = 0;
2016 if ( result != 3 ) {
2022 s [ 0 ] = v1.
at(indx);
2023 s [ 1 ] = v2.
at(indx);
2024 s [ 2 ] = v3.
at(indx);
2027 for ( i = 0; i < 3; i++ ) {
2035 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
2036 EGWithMaskChangeAttributes(LAYER_MASK, tr);
2037 EMAddGraphicsToModel(ESIModel(), tr);
2041 for ( i = 0; i < 3; i++ ) {
2044 p [ i ].z = s [ i ] * landScale;
2050 EASValsSetFillStyle(FILL_SOLID);
2051 tr = CreateTriangle3D(p);
2052 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | FILL_MASK | LAYER_MASK, tr);
2055 EASValsSetFillStyle(FILL_SOLID);
2056 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
2057 EGWithMaskChangeAttributes(FILL_MASK | LAYER_MASK, tr);
2060 EMAddGraphicsToModel(ESIModel(), tr);
CrossSection * giveCrossSection()
virtual void giveElementCenter(LEPlic *mat_interface, FloatArray ¢er, bool updFlag)
Computes the receiver center (in updated Lagrangian configuration).
int testElementGraphicActivity(Element *)
Test if particular element passed fulfills various filtering criteria for its graphics output...
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
The element interface required by NodalAvergagingRecoveryModel.
virtual void computeAccelerationTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes acceleration terms (generalized mass matrix with stabilization terms) for momentum balance e...
virtual void computeDiffusionTerm_MB(FloatArray &answer, TimeStep *tStep)
Computes diffusion terms for momentum balance equations(s).
int number
Component number.
integrationDomain
Used by integrator class to supply integration points for proper domain to be integrated (Area...
The element interface required by ZZNodalRecoveryModel.
contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores context of receiver into given stream.
void giveUpdatedCoordinate(FloatArray &answer, int num)
Returns updated nodal positions.
EPixel getStandardSparseProfileColor()
virtual void computeAdvectionTerm_MB(FloatArray &answer, TimeStep *tStep)
Computes nonlinear advection terms for momentum balance equations(s).
IntArray * giveBoundaryLoadArray()
Returns array containing load numbers of boundary loads acting on element.
Element interface for LEPlic class representing Lagrangian-Eulerian (moving) material interface...
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
ScalarAlgorithmType getScalarAlgo()
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void computeDiffusionDerivativeTerm_MB(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep)
Computes the derivative of diffusion terms for momentum balance equations(s) with respect to nodal ve...
virtual void computeBCRhsTerm_MC(FloatArray &answer, TimeStep *tStep)
Computes Rhs terms due to boundary conditions.
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
virtual void computeLinearAdvectionTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes the linear advection term for mass conservation equation.
Abstract base class for all fluid materials.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Wrapper around cell with vertex coordinates stored in FloatArray**.
double computeVolume() const
The element interface required by ZZNodalRecoveryModel.
Abstract class representing field of primary variables (those, which are unknown and are typically as...
const FloatArray & giveSubPatchCoordinates()
Returns local sub-patch coordinates of the receiver.
Material * _giveMaterial(int indx)
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
#define _IFT_Tr1SUPG_pvof
virtual void computeLSICStabilizationTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes SLIC stabilization term for momentum balance equation(s).
bcGeomType
Type representing the geometric character of loading.
double & at(int i)
Coefficient access function.
int max(int i, int j)
Returns bigger value form two given decimals.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
virtual Interface * giveInterface(InterfaceType)
Interface requesting service.
virtual double computeLEPLICVolumeFraction(const FloatArray &n, const double p, LEPlic *matInterface, bool updFlag)
Computes corresponding volume fraction to given interface position.
#define OOFEG_RAW_GEOMETRY_LAYER
void setPermanentVolumeFraction(double v)
Base class for fluid problems.
EPixel getElementEdgeColor()
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
double giveUpdatedYCoordinate(int num)
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
Returns dofmanager dof mask for node.
virtual void computeComponentArrayAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
Computes boundary condition value - its components values at given time.
virtual double giveCoordinate(int i)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void computePressureTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes pressure terms for mass conservation equation.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual void drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
int mat[2]
mat[0] reference fluid.
const FloatArray * getCoords() const
double giveTimeIncrement()
Returns solution step associated time increment.
EPixel getDeformedElementColor()
void updateIntegrationRules()
void updateYourself(TimeStep *tStep)
Class representing a general abstraction for finite element interpolation class.
virtual void computeVectorOfPressures(ValueModeType mode, TimeStep *tStep, FloatArray &pressures)
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
InternalStateType giveIntVarType()
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to stream, for given time step.
Class representing a 2d triangular linear interpolation based on area coordinates.
virtual void computeBCRhsTerm_MB(FloatArray &answer, TimeStep *tStep)
Computes Rhs terms due to boundary conditions.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to stream, for given time step.
virtual void computeDeviatoricStressVector(FloatArray &stress_dev, double &epsp_vol, GaussPoint *gp, const FloatArray &eps, double pressure, TimeStep *tStep)
Computes the deviatoric stress vector and volumetric strain rate from given deviatoric strain and pre...
Abstract base class representing a boundary load (force, momentum, ...) that acts directly on a bound...
virtual void computeDiffusionTerm_MB(FloatArray &answer, TimeStep *tStep)
Computes diffusion terms for momentum balance equations(s).
virtual void computeVectorOfVelocities(ValueModeType mode, TimeStep *tStep, FloatArray &velocities)
virtual void computeAccelerationTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes acceleration terms for mass conservation equation.
virtual double giveVariableScale(VarScaleType varId)
Returns the scale factor for given variable type.
virtual void computeLinearAdvectionTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes the linear advection term for mass conservation equation.
virtual void initGeometry()
int material
Number of associated material.
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
#define OOFEG_RAW_GEOMETRY_WIDTH
virtual double giveWeight()
Returns integration weight of receiver.
TR1_2D_SUPG2(int n, Domain *d)
void clip(Polygon &result, const Polygon &a, const Polygon &b)
void times(double f)
Multiplies receiver by factor f.
double t_supg
Stabilization coefficients, updated for each solution step in updateStabilizationCoeffs() ...
Wrapper around element definition to provide FEICellGeometry interface.
virtual void formMyVolumePoly(Polygon &myPoly, LEPlic *mat_interface, bool updFlag)
Assembles receiver volume.
virtual double computeMyVolume(LEPlic *matInterface, bool updFlag)
Computes the volume of receiver.
IntArray * giveBodyLoadArray()
Returns array containing load numbers of loads acting on element.
virtual void computeAdvectionDerivativeTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes the derivative of advection terms for momentum balance equations(s) with respect to nodal ve...
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep)
Returns internal state variable (like stress,strain) at node of element in Reduced form...
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
IntArray bodyLoadArray
Array containing indexes of loads (body loads and boundary loads are kept separately), that apply on receiver.
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
Class representing the special graph constructed from two polygons that is used to perform boolean op...
virtual int global2local(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Default implementation using Newton's method to find the local coordinates.
virtual void giveElementDofIDMask(IntArray &answer) const
Returns element dof mask for node.
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
virtual void computeAdvectionDerivativeTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes the derivative of advection terms for mass conservation equation with respect to nodal veloc...
virtual void computeAccelerationTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes acceleration terms (generalized mass matrix with stabilization terms) for momentum balance e...
virtual void formVolumeInterfacePoly(Polygon &matvolpoly, LEPlic *matInterface, const FloatArray &normal, const double p, bool updFlag)
Assembles receiver material polygon based solely on given interface line.
virtual void computeAccelerationTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes acceleration terms for mass conservation equation.
virtual void computeBCRhsTerm_MC(FloatArray &answer, TimeStep *tStep)
Computes Rhs terms due to boundary conditions.
double computeVolumeAroundID(GaussPoint *gp, integrationDomain id, const std::vector< FloatArray > &idpoly)
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
InternalStateMode giveIntVarMode()
Abstract base class representing Lagrangian-Eulerian (moving) material interfaces.
virtual void formMaterialVolumePoly(Polygon &matvolpoly, LEPlic *matInterface, const FloatArray &normal, const double p, bool updFlag)
Assembles the true element material polygon (takes receiver vof into accout).
Class representing vector of real numbers.
virtual void computeDeviatoricStrain(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
Class representing 2D polygon.
virtual void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *)
Implementation of matrix containing floating point numbers.
double giveTempVolumeFraction()
double computeFrobeniusNorm() const
Computes the Frobenius norm of the receiver.
virtual void computeAdvectionDerivativeTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes the derivative of advection terms for momentum balance equations(s) with respect to nodal ve...
IRResultType
Type defining the return values of InputRecord reading operations.
#define _IFT_Tr1SUPG2_mat0
void setCoords(double x, double y)
virtual void computePressureTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes pressure terms for mass conservation equation.
virtual double truncateMatVolume(const Polygon &matvolpoly, double &volume)
Truncates given material polygon to receiver.
double giveVolumeFraction()
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
virtual SPRPatchType SPRNodalRecoveryMI_givePatchType()
#define _IFT_Tr1SUPG2_mat1
double computeNorm() const
Computes the norm (or length) of the vector.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
double giveUpdatedXCoordinate(int num)
void zero()
Zeroes all coefficients of receiver.
virtual bcGeomType giveBCGeoType() const
Returns geometry character of boundary condition.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Polygon myPoly[2]
myPoly[0] occupied by reference fluid.
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
void times(double s)
Multiplies receiver with scalar.
The spatial localizer element interface associated to spatial localizer.
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
Computes the element local coordinates from given global coordinates.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
virtual void computePressureTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes pressure terms for momentum balance equations(s).
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores context of receiver from given stream.
Class representing vertex.
std::vector< FloatArray > vcoords[2]
double vof
Volume fraction of reference fluid in element.
virtual int EIPrimaryFieldI_evaluateFieldVectorAt(FloatArray &answer, PrimaryField &pf, const FloatArray &coords, IntArray &dofId, ValueModeType mode, TimeStep *tStep)
Evaluates the value of field at given point of interest (should be located inside receiver's volume) ...
void zero()
Zeroes all coefficient of receiver.
virtual void computeDiffusionDerivativeTerm_MB(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep)
Computes the derivative of diffusion terms for momentum balance equations(s) with respect to nodal ve...
InterfaceType
Enumerative type, used to identify interface type.
virtual void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
Computes the element value in given node.
void updateFringeTableMinMax(double *s, int size)
Class representing 2d linear triangular element for solving incompressible fluid with SUPG solver...
virtual void computeLSICStabilizationTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes SLIC stabilization term for momentum balance equation(s).
#define OOFEG_DEBUG_LAYER
Load is base abstract class for all loads.
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
double p
Line constant of line segment representing interface.
virtual void postInitialize()
Performs post initialization steps.
Class representing a 2d isoparametric linear interpolation based on natural coordinates for quadrilat...
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
GraphicObj * draw(oofegGraphicContext &, bool filled, int layer=OOFEG_DEBUG_LAYER)
std::unique_ptr< IntegrationRule > defaultIRule
default integration rule over element volume.
int giveSize() const
Returns the size of receiver.
virtual int SPRNodalRecoveryMI_giveNumberOfIP()
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual bcValType giveBCValType() const
Returns receiver load type.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual void SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap)
virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)
Computes components values of load at given point - global coordinates (coordinates given)...
virtual void computeBCRhsTerm_MB(FloatArray &answer, TimeStep *tStep)
Computes Rhs terms due to boundary conditions.
void computeNVector(FloatArray &answer, GaussPoint *gp)
Load * giveLoad(int n)
Service for accessing particular domain load.
void symmetrized()
Initializes the lower half of the receiver according to the upper half.
#define OOFEG_VARPLOT_PATTERN_LAYER
virtual void updateStabilizationCoeffs(TimeStep *tStep)
Updates the stabilization coefficients used for CBS and SUPG algorithms.
Class representing integration point in finite element program.
#define OOFEM_WARNING(...)
IntArray boundaryLoadArray
FloatArray normal
Interface segment normal.
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep)
Returns internal state variable (like stress,strain) at node of element in Reduced form...
Class representing solution step.
int numberOfDofMans
Number of dofmanagers.
InternalStateMode
Determines the mode of internal variable.
void add(const FloatArray &src)
Adds array src to receiver.
virtual int computeNumberOfDofs()
Computes or simply returns total number of element's local DOFs.
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates global coordinates from given local ones.
virtual double computeCriticalTimeStep(TimeStep *tStep)
Computes the critical time increment.
int findFirstIndexOf(int value) const
Finds index of first occurrence of given value in array.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
virtual void computeAdvectionTerm_MC(FloatArray &answer, TimeStep *tStep)
Computes advection terms for mass conservation equation.
Class representing Gaussian-quadrature integration rule.
virtual void SPRNodalRecoveryMI_giveSPRAssemblyPoints(IntArray &pap)
virtual void updateVolumePolygons(Polygon &referenceFluidPoly, Polygon &secondFluidPoly, int &rfPoints, int &sfPoints, const FloatArray &normal, const double p, bool updFlag)
virtual void computeAdvectionTerm_MB(FloatArray &answer, TimeStep *tStep)
Computes nonlinear advection terms for momentum balance equations(s).
void resize(int s)
Resizes receiver towards requested size.
virtual void giveDeviatoricStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)=0
Computes the deviatoric stiffness; .