oomph::TBubbleEnrichedElementShape< 3, 3 > Class Reference

Return local coordinates of node j. More...

#include <Telements.h>

Public Member Functions

unsigned n_enriched_nodes ()
 
void local_coordinate_of_node (const unsigned &j, Vector< double > &s) const
 
void shape (const Vector< double > &s, Shape &psi) const
 Shape function for specific TBubbleEnrichedElement<3,3> More...
 
void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 Derivatives of shape functions for specific TElement<3,3> More...
 
void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 

Detailed Description

Return local coordinates of node j.

/////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// Standard quadratic shape functions enriched by the addition of three cubic "face" bubbles and quartic "volume" bubble, which consists of adding a node at the centroid of each face and a single node at the centroid of the tetrahedron

Member Function Documentation

◆ d2shape_local()

void oomph::TBubbleEnrichedElementShape< 3, 3 >::d2shape_local ( const Vector< double > &  s,
Shape psi,
DShape dpsids,
DShape d2psids 
) const
inline

Second derivatives of shape functions for specific TElement<3,3>: d2psids(i,0) = \( \partial^2 \psi_j / \partial s_0^2 \) d2psids(i,1) = \( \partial^2 \psi_j / \partial s_1^2 \) d2psids(i,2) = \( \partial^2 \psi_j / \partial s_2^2 \) d2psids(i,3) = \( \partial^2 \psi_j / \partial s_0 \partial s_1 \) d2psids(i,4) = \( \partial^2 \psi_j / \partial s_0 \partial s_2 \) d2psids(i,5) = \( \partial^2 \psi_j / \partial s_1 \partial s_2 \)

2693  {
2694  // ALH: Don't know why object qualifier is needed
2695  this->dshape_local(s, psi, dpsids);
2696 
2697  // Define s3
2698  const double s3 = 1.0 - s[0] - s[1] - s[2];
2699 
2700  // Calculate second derivatives of the bubble functions
2701  //(.,3) for mixed derivative s[0]-s[1]
2702  //(.,4) for mixed derivative s[0]-s[2]
2703  //(.,5) for mixed derivative s[1]-s[2]
2704 
2705 
2706  const double d2_quartic_bubble_ds0 = -2.0 * s[1] * s[2];
2707  const double d2_quartic_bubble_ds1 = -2.0 * s[0] * s[2];
2708  const double d2_quartic_bubble_ds2 = -2.0 * s[0] * s[1];
2709  const double d2_quartic_bubble_ds3 =
2710  s[2] * (1.0 - 2.0 * s[0] - 2.0 * s[1] - s[2]);
2711  const double d2_quartic_bubble_ds4 =
2712  s[1] * (1.0 - 2.0 * s[0] - 2.0 * s[2] - s[1]);
2713  const double d2_quartic_bubble_ds5 =
2714  s[0] * (1.0 - 2.0 * s[1] - 2.0 * s[2] - s[0]);
2715 
2716  const double d2_cubic_bubble012_ds0 = 0.0;
2717  const double d2_cubic_bubble012_ds1 = 0.0;
2718  const double d2_cubic_bubble012_ds2 = 0.0;
2719  const double d2_cubic_bubble012_ds3 = s[2];
2720  const double d2_cubic_bubble012_ds4 = s[1];
2721  const double d2_cubic_bubble012_ds5 = s[0];
2722 
2723  const double d2_cubic_bubble013_ds0 = -2.0 * s[1];
2724  const double d2_cubic_bubble013_ds1 = -2.0 * s[0];
2725  const double d2_cubic_bubble013_ds2 = 0.0;
2726  const double d2_cubic_bubble013_ds3 = s3 - s[0] - s[1];
2727  const double d2_cubic_bubble013_ds4 = -s[1];
2728  const double d2_cubic_bubble013_ds5 = -s[0];
2729 
2730  const double d2_cubic_bubble023_ds0 = -2.0 * s[2];
2731  const double d2_cubic_bubble023_ds1 = 0.0;
2732  const double d2_cubic_bubble023_ds2 = -2.0 * s[0];
2733  const double d2_cubic_bubble023_ds3 = -s[2];
2734  const double d2_cubic_bubble023_ds4 = s3 - s[0] - s[2];
2735  const double d2_cubic_bubble023_ds5 = -s[0];
2736 
2737  const double d2_cubic_bubble123_ds0 = 0.0;
2738  const double d2_cubic_bubble123_ds1 = -2.0 * s[2];
2739  const double d2_cubic_bubble123_ds2 = -2.0 * s[1];
2740  const double d2_cubic_bubble123_ds3 = -s[2];
2741  const double d2_cubic_bubble123_ds4 = -s[1];
2742  const double d2_cubic_bubble123_ds5 = s3 - s[1] - s[2];
2743 
2744 
2745  d2psids(0, 0) = 4.0 +
2746  3.0 * (d2_cubic_bubble012_ds0 + d2_cubic_bubble013_ds0 +
2747  d2_cubic_bubble023_ds0) -
2748  4.0 * d2_quartic_bubble_ds0;
2749  d2psids(0, 1) = 0.0 +
2750  3.0 * (d2_cubic_bubble012_ds1 + d2_cubic_bubble013_ds1 +
2751  d2_cubic_bubble023_ds1) -
2752  4.0 * d2_quartic_bubble_ds1;
2753  d2psids(0, 2) = 0.0 +
2754  3.0 * (d2_cubic_bubble012_ds2 + d2_cubic_bubble013_ds2 +
2755  d2_cubic_bubble023_ds2) -
2756  4.0 * d2_quartic_bubble_ds2;
2757  d2psids(0, 3) = 0.0 +
2758  3.0 * (d2_cubic_bubble012_ds3 + d2_cubic_bubble013_ds3 +
2759  d2_cubic_bubble023_ds3) -
2760  4.0 * d2_quartic_bubble_ds3;
2761  d2psids(0, 4) = 0.0 +
2762  3.0 * (d2_cubic_bubble012_ds4 + d2_cubic_bubble013_ds4 +
2763  d2_cubic_bubble023_ds4) -
2764  4.0 * d2_quartic_bubble_ds4;
2765  d2psids(0, 5) = 0.0 +
2766  3.0 * (d2_cubic_bubble012_ds5 + d2_cubic_bubble013_ds5 +
2767  d2_cubic_bubble023_ds5) -
2768  4.0 * d2_quartic_bubble_ds5;
2769 
2770 
2771  d2psids(1, 0) = 0.0 +
2772  3.0 * (d2_cubic_bubble012_ds0 + d2_cubic_bubble013_ds0 +
2773  d2_cubic_bubble123_ds0) -
2774  4.0 * d2_quartic_bubble_ds0;
2775  d2psids(1, 1) = 4.0 +
2776  3.0 * (d2_cubic_bubble012_ds1 + d2_cubic_bubble013_ds1 +
2777  d2_cubic_bubble123_ds1) -
2778  4.0 * d2_quartic_bubble_ds1;
2779  d2psids(1, 2) = 0.0 +
2780  3.0 * (d2_cubic_bubble012_ds2 + d2_cubic_bubble013_ds2 +
2781  d2_cubic_bubble123_ds2) -
2782  4.0 * d2_quartic_bubble_ds2;
2783  d2psids(1, 3) = 0.0 +
2784  3.0 * (d2_cubic_bubble012_ds3 + d2_cubic_bubble013_ds3 +
2785  d2_cubic_bubble123_ds3) -
2786  4.0 * d2_quartic_bubble_ds3;
2787  d2psids(1, 4) = 0.0 +
2788  3.0 * (d2_cubic_bubble012_ds4 + d2_cubic_bubble013_ds4 +
2789  d2_cubic_bubble123_ds4) -
2790  4.0 * d2_quartic_bubble_ds4;
2791  d2psids(1, 5) = 0.0 +
2792  3.0 * (d2_cubic_bubble012_ds5 + d2_cubic_bubble013_ds5 +
2793  d2_cubic_bubble123_ds5) -
2794  4.0 * d2_quartic_bubble_ds5;
2795 
2796 
2797  d2psids(2, 0) = 0.0 +
2798  3.0 * (d2_cubic_bubble012_ds0 + d2_cubic_bubble023_ds0 +
2799  d2_cubic_bubble123_ds0) -
2800  4.0 * d2_quartic_bubble_ds0;
2801  d2psids(2, 1) = 0.0 +
2802  3.0 * (d2_cubic_bubble012_ds1 + d2_cubic_bubble023_ds1 +
2803  d2_cubic_bubble123_ds1) -
2804  4.0 * d2_quartic_bubble_ds1;
2805  d2psids(2, 2) = 4.0 +
2806  3.0 * (d2_cubic_bubble012_ds2 + d2_cubic_bubble023_ds2 +
2807  d2_cubic_bubble123_ds2) -
2808  4.0 * d2_quartic_bubble_ds2;
2809  d2psids(2, 3) = 0.0 +
2810  3.0 * (d2_cubic_bubble012_ds3 + d2_cubic_bubble023_ds3 +
2811  d2_cubic_bubble123_ds3) -
2812  4.0 * d2_quartic_bubble_ds3;
2813  d2psids(2, 4) = 0.0 +
2814  3.0 * (d2_cubic_bubble012_ds4 + d2_cubic_bubble023_ds4 +
2815  d2_cubic_bubble123_ds4) -
2816  4.0 * d2_quartic_bubble_ds4;
2817  d2psids(2, 5) = 0.0 +
2818  3.0 * (d2_cubic_bubble012_ds5 + d2_cubic_bubble023_ds5 +
2819  d2_cubic_bubble123_ds5) -
2820  4.0 * d2_quartic_bubble_ds5;
2821 
2822 
2823  d2psids(3, 0) = 4.0 +
2824  3.0 * (d2_cubic_bubble013_ds0 + d2_cubic_bubble023_ds0 +
2825  d2_cubic_bubble123_ds0) -
2826  4.0 * d2_quartic_bubble_ds0;
2827  d2psids(3, 1) = 4.0 +
2828  3.0 * (d2_cubic_bubble013_ds1 + d2_cubic_bubble023_ds1 +
2829  d2_cubic_bubble123_ds1) -
2830  4.0 * d2_quartic_bubble_ds1;
2831  d2psids(3, 2) = 4.0 +
2832  3.0 * (d2_cubic_bubble013_ds2 + d2_cubic_bubble023_ds2 +
2833  d2_cubic_bubble123_ds2) -
2834  4.0 * d2_quartic_bubble_ds2;
2835  d2psids(3, 3) = 4.0 +
2836  3.0 * (d2_cubic_bubble013_ds3 + d2_cubic_bubble023_ds3 +
2837  d2_cubic_bubble123_ds3) -
2838  4.0 * d2_quartic_bubble_ds3;
2839  d2psids(3, 4) = 4.0 +
2840  3.0 * (d2_cubic_bubble013_ds4 + d2_cubic_bubble023_ds4 +
2841  d2_cubic_bubble123_ds4) -
2842  4.0 * d2_quartic_bubble_ds4;
2843  d2psids(3, 5) = 4.0 +
2844  3.0 * (d2_cubic_bubble013_ds5 + d2_cubic_bubble023_ds5 +
2845  d2_cubic_bubble123_ds5) -
2846  4.0 * d2_quartic_bubble_ds5;
2847 
2848 
2849  d2psids(4, 0) = 0.0 -
2850  12.0 * (d2_cubic_bubble012_ds0 + d2_cubic_bubble013_ds0) +
2851  32.0 * d2_quartic_bubble_ds0;
2852  d2psids(4, 1) = 0.0 -
2853  12.0 * (d2_cubic_bubble012_ds1 + d2_cubic_bubble013_ds1) +
2854  32.0 * d2_quartic_bubble_ds1;
2855  d2psids(4, 2) = 0.0 -
2856  12.0 * (d2_cubic_bubble012_ds2 + d2_cubic_bubble013_ds2) +
2857  32.0 * d2_quartic_bubble_ds2;
2858  d2psids(4, 3) = 4.0 -
2859  12.0 * (d2_cubic_bubble012_ds3 + d2_cubic_bubble013_ds3) +
2860  32.0 * d2_quartic_bubble_ds3;
2861  d2psids(4, 4) = 0.0 -
2862  12.0 * (d2_cubic_bubble012_ds4 + d2_cubic_bubble013_ds4) +
2863  32.0 * d2_quartic_bubble_ds4;
2864  d2psids(4, 5) = 0.0 -
2865  12.0 * (d2_cubic_bubble012_ds5 + d2_cubic_bubble013_ds5) +
2866  32.0 * d2_quartic_bubble_ds5;
2867 
2868 
2869  d2psids(5, 0) = 0.0 -
2870  12.0 * (d2_cubic_bubble012_ds0 + d2_cubic_bubble023_ds0) +
2871  32.0 * d2_quartic_bubble_ds0;
2872  d2psids(5, 1) = 0.0 -
2873  12.0 * (d2_cubic_bubble012_ds1 + d2_cubic_bubble023_ds1) +
2874  32.0 * d2_quartic_bubble_ds1;
2875  d2psids(5, 2) = 0.0 -
2876  12.0 * (d2_cubic_bubble012_ds2 + d2_cubic_bubble023_ds2) +
2877  32.0 * d2_quartic_bubble_ds2;
2878  d2psids(5, 3) = 0.0 -
2879  12.0 * (d2_cubic_bubble012_ds3 + d2_cubic_bubble023_ds3) +
2880  32.0 * d2_quartic_bubble_ds3;
2881  d2psids(5, 4) = 4.0 -
2882  12.0 * (d2_cubic_bubble012_ds4 + d2_cubic_bubble023_ds4) +
2883  32.0 * d2_quartic_bubble_ds4;
2884  d2psids(5, 5) = 0.0 -
2885  12.0 * (d2_cubic_bubble012_ds5 + d2_cubic_bubble023_ds5) +
2886  32.0 * d2_quartic_bubble_ds5;
2887 
2888 
2889  d2psids(6, 0) = -8.0 -
2890  12.0 * (d2_cubic_bubble013_ds0 + d2_cubic_bubble023_ds0) +
2891  32.0 * d2_quartic_bubble_ds0;
2892  d2psids(6, 1) = 0.0 -
2893  12.0 * (d2_cubic_bubble013_ds1 + d2_cubic_bubble023_ds1) +
2894  32.0 * d2_quartic_bubble_ds1;
2895  d2psids(6, 2) = 0.0 -
2896  12.0 * (d2_cubic_bubble013_ds2 + d2_cubic_bubble023_ds2) +
2897  32.0 * d2_quartic_bubble_ds2;
2898  d2psids(6, 3) = -4.0 -
2899  12.0 * (d2_cubic_bubble013_ds3 + d2_cubic_bubble023_ds3) +
2900  32.0 * d2_quartic_bubble_ds3;
2901  d2psids(6, 4) = -4.0 -
2902  12.0 * (d2_cubic_bubble013_ds4 + d2_cubic_bubble023_ds4) +
2903  32.0 * d2_quartic_bubble_ds4;
2904  d2psids(6, 5) = 0.0 -
2905  12.0 * (d2_cubic_bubble013_ds5 + d2_cubic_bubble023_ds5) +
2906  32.0 * d2_quartic_bubble_ds5;
2907 
2908  d2psids(7, 0) = 0.0 -
2909  12.0 * (d2_cubic_bubble012_ds0 + d2_cubic_bubble123_ds0) +
2910  32.0 * d2_quartic_bubble_ds0;
2911  d2psids(7, 1) = 0.0 -
2912  12.0 * (d2_cubic_bubble012_ds1 + d2_cubic_bubble123_ds1) +
2913  32.0 * d2_quartic_bubble_ds1;
2914  d2psids(7, 2) = 0.0 -
2915  12.0 * (d2_cubic_bubble012_ds2 + d2_cubic_bubble123_ds2) +
2916  32.0 * d2_quartic_bubble_ds2;
2917  d2psids(7, 3) = 0.0 -
2918  12.0 * (d2_cubic_bubble012_ds3 + d2_cubic_bubble123_ds3) +
2919  32.0 * d2_quartic_bubble_ds3;
2920  d2psids(7, 4) = 0.0 -
2921  12.0 * (d2_cubic_bubble012_ds4 + d2_cubic_bubble123_ds4) +
2922  32.0 * d2_quartic_bubble_ds4;
2923  d2psids(7, 5) = 4.0 -
2924  12.0 * (d2_cubic_bubble012_ds5 + d2_cubic_bubble123_ds5) +
2925  32.0 * d2_quartic_bubble_ds5;
2926 
2927  d2psids(8, 0) = 0.0 -
2928  12.0 * (d2_cubic_bubble023_ds0 + d2_cubic_bubble123_ds0) +
2929  32.0 * d2_quartic_bubble_ds0;
2930  d2psids(8, 1) = 0.0 -
2931  12.0 * (d2_cubic_bubble023_ds1 + d2_cubic_bubble123_ds1) +
2932  32.0 * d2_quartic_bubble_ds1;
2933  d2psids(8, 2) = -8.0 -
2934  12.0 * (d2_cubic_bubble023_ds2 + d2_cubic_bubble123_ds2) +
2935  32.0 * d2_quartic_bubble_ds2;
2936  d2psids(8, 3) = 0.0 -
2937  12.0 * (d2_cubic_bubble023_ds3 + d2_cubic_bubble123_ds3) +
2938  32.0 * d2_quartic_bubble_ds3;
2939  d2psids(8, 4) = -4.0 -
2940  12.0 * (d2_cubic_bubble023_ds4 + d2_cubic_bubble123_ds4) +
2941  32.0 * d2_quartic_bubble_ds4;
2942  d2psids(8, 5) = -4.0 -
2943  12.0 * (d2_cubic_bubble023_ds5 + d2_cubic_bubble123_ds5) +
2944  32.0 * d2_quartic_bubble_ds5;
2945 
2946  d2psids(9, 0) = 0.0 -
2947  12.0 * (d2_cubic_bubble013_ds0 + d2_cubic_bubble123_ds0) +
2948  32.0 * d2_quartic_bubble_ds0;
2949  d2psids(9, 1) = -8.0 -
2950  12.0 * (d2_cubic_bubble013_ds1 + d2_cubic_bubble123_ds1) +
2951  32.0 * d2_quartic_bubble_ds1;
2952  d2psids(9, 2) = 0.0 -
2953  12.0 * (d2_cubic_bubble013_ds2 + d2_cubic_bubble123_ds2) +
2954  32.0 * d2_quartic_bubble_ds3;
2955  d2psids(9, 3) = -4.0 -
2956  12.0 * (d2_cubic_bubble013_ds3 + d2_cubic_bubble123_ds3) +
2957  32.0 * d2_quartic_bubble_ds3;
2958  d2psids(9, 4) = 0.0 -
2959  12.0 * (d2_cubic_bubble013_ds4 + d2_cubic_bubble123_ds4) +
2960  32.0 * d2_quartic_bubble_ds4;
2961  d2psids(9, 5) = -4.0 -
2962  12.0 * (d2_cubic_bubble013_ds5 + d2_cubic_bubble123_ds5) +
2963  32.0 * d2_quartic_bubble_ds5;
2964 
2965  // Add the bubble function on the face spanned by 0 1 3
2966  d2psids(10, 0) =
2967  27.0 * d2_cubic_bubble013_ds0 - 108.0 * d2_quartic_bubble_ds0;
2968  d2psids(10, 1) =
2969  27.0 * d2_cubic_bubble013_ds1 - 108.0 * d2_quartic_bubble_ds1;
2970  d2psids(10, 2) =
2971  27.0 * d2_cubic_bubble013_ds2 - 108.0 * d2_quartic_bubble_ds2;
2972  d2psids(10, 3) =
2973  27.0 * d2_cubic_bubble013_ds3 - 108.0 * d2_quartic_bubble_ds3;
2974  d2psids(10, 4) =
2975  27.0 * d2_cubic_bubble013_ds4 - 108.0 * d2_quartic_bubble_ds4;
2976  d2psids(10, 5) =
2977  27.0 * d2_cubic_bubble013_ds5 - 108.0 * d2_quartic_bubble_ds5;
2978 
2979  // Add the bubble function on the face spanned by 0 1 2
2980  d2psids(11, 0) =
2981  27.0 * d2_cubic_bubble012_ds0 - 108.0 * d2_quartic_bubble_ds0;
2982  d2psids(11, 1) =
2983  27.0 * d2_cubic_bubble012_ds1 - 108.0 * d2_quartic_bubble_ds1;
2984  d2psids(11, 2) =
2985  27.0 * d2_cubic_bubble012_ds2 - 108.0 * d2_quartic_bubble_ds2;
2986  d2psids(11, 3) =
2987  27.0 * d2_cubic_bubble012_ds3 - 108.0 * d2_quartic_bubble_ds3;
2988  d2psids(11, 4) =
2989  27.0 * d2_cubic_bubble012_ds4 - 108.0 * d2_quartic_bubble_ds4;
2990  d2psids(11, 5) =
2991  27.0 * d2_cubic_bubble012_ds5 - 108.0 * d2_quartic_bubble_ds5;
2992 
2993  // Add the bubble function on the face spanned by 0 2 3
2994  d2psids(12, 0) =
2995  27.0 * d2_cubic_bubble023_ds0 - 108.0 * d2_quartic_bubble_ds0;
2996  d2psids(12, 1) =
2997  27.0 * d2_cubic_bubble023_ds1 - 108.0 * d2_quartic_bubble_ds1;
2998  d2psids(12, 2) =
2999  27.0 * d2_cubic_bubble023_ds2 - 108.0 * d2_quartic_bubble_ds2;
3000  d2psids(12, 3) =
3001  27.0 * d2_cubic_bubble023_ds3 - 108.0 * d2_quartic_bubble_ds3;
3002  d2psids(12, 4) =
3003  27.0 * d2_cubic_bubble023_ds4 - 108.0 * d2_quartic_bubble_ds4;
3004  d2psids(12, 5) =
3005  27.0 * d2_cubic_bubble023_ds5 - 108.0 * d2_quartic_bubble_ds5;
3006 
3007  // Add the bubble function on the face spanned by 1 2 3
3008  d2psids(13, 0) =
3009  27.0 * d2_cubic_bubble123_ds0 - 108.0 * d2_quartic_bubble_ds0;
3010  d2psids(13, 1) =
3011  27.0 * d2_cubic_bubble123_ds1 - 108.0 * d2_quartic_bubble_ds1;
3012  d2psids(13, 2) =
3013  27.0 * d2_cubic_bubble123_ds2 - 108.0 * d2_quartic_bubble_ds2;
3014  d2psids(13, 3) =
3015  27.0 * d2_cubic_bubble123_ds3 - 108.0 * d2_quartic_bubble_ds3;
3016  d2psids(13, 4) =
3017  27.0 * d2_cubic_bubble123_ds4 - 108.0 * d2_quartic_bubble_ds4;
3018  d2psids(13, 5) =
3019  27.0 * d2_cubic_bubble123_ds5 - 108.0 * d2_quartic_bubble_ds5;
3020 
3021  // Add the volumetric bubble function derivatives
3022  d2psids(14, 0) = 256.0 * d2_quartic_bubble_ds0;
3023  d2psids(14, 1) = 256.0 * d2_quartic_bubble_ds1;
3024  d2psids(14, 2) = 256.0 * d2_quartic_bubble_ds2;
3025  d2psids(14, 3) = 256.0 * d2_quartic_bubble_ds3;
3026  d2psids(14, 4) = 256.0 * d2_quartic_bubble_ds4;
3027  d2psids(14, 5) = 256.0 * d2_quartic_bubble_ds5;
3028  }
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<3,3>
Definition: Telements.h:2494
RealScalar s
Definition: level1_cplx_impl.h:130

References s.

◆ dshape_local()

void oomph::TBubbleEnrichedElementShape< 3, 3 >::dshape_local ( const Vector< double > &  s,
Shape psi,
DShape dpsids 
) const
inline

Derivatives of shape functions for specific TElement<3,3>

2495  {
2496  // ALH: Don't know why object qualifier is needed
2497  this->shape(s, psi);
2498 
2499  // Define s3 the fourth volume coordinate
2500  const double s3 = 1.0 - s[0] - s[1] - s[2];
2501 
2502  // Calculate derivatives of the bubble function
2503  const double d_quartic_bubble_ds0 =
2504  s[1] * s[2] * (1.0 - s[1] - s[2] - 2.0 * s[0]);
2505  const double d_quartic_bubble_ds1 =
2506  s[0] * s[2] * (1.0 - s[0] - s[2] - 2.0 * s[1]);
2507  const double d_quartic_bubble_ds2 =
2508  s[0] * s[1] * (1.0 - s[0] - s[1] - 2.0 * s[2]);
2509 
2510  const double d_cubic_bubble012_ds0 = s[1] * s[2];
2511  const double d_cubic_bubble012_ds1 = s[0] * s[2];
2512  const double d_cubic_bubble012_ds2 = s[0] * s[1];
2513 
2514  const double d_cubic_bubble013_ds0 = s[1] * (s3 - s[0]);
2515  const double d_cubic_bubble013_ds1 = s[0] * (s3 - s[1]);
2516  const double d_cubic_bubble013_ds2 = -s[0] * s[1];
2517 
2518  const double d_cubic_bubble023_ds0 = s[2] * (s3 - s[0]);
2519  const double d_cubic_bubble023_ds1 = -s[0] * s[2];
2520  const double d_cubic_bubble023_ds2 = s[0] * (s3 - s[2]);
2521 
2522  const double d_cubic_bubble123_ds0 = -s[1] * s[2];
2523  const double d_cubic_bubble123_ds1 = s[2] * (s3 - s[1]);
2524  const double d_cubic_bubble123_ds2 = s[1] * (s3 - s[2]);
2525 
2526 
2527  // Add the appropriate dervatives of the bubble function to the
2528  // shape function derivatives
2529  dpsids(0, 0) = 4.0 * s[0] - 1.0 +
2530  3.0 * (d_cubic_bubble012_ds0 + d_cubic_bubble013_ds0 +
2531  d_cubic_bubble023_ds0) -
2532  4.0 * d_quartic_bubble_ds0;
2533  dpsids(0, 1) = 0.0 +
2534  3.0 * (d_cubic_bubble012_ds1 + d_cubic_bubble013_ds1 +
2535  d_cubic_bubble023_ds1) -
2536  4.0 * d_quartic_bubble_ds1;
2537  dpsids(0, 2) = 0.0 +
2538  3.0 * (d_cubic_bubble012_ds2 + d_cubic_bubble013_ds2 +
2539  d_cubic_bubble023_ds2) -
2540  4.0 * d_quartic_bubble_ds2;
2541 
2542  dpsids(1, 0) = 0.0 +
2543  3.0 * (d_cubic_bubble012_ds0 + d_cubic_bubble013_ds0 +
2544  d_cubic_bubble123_ds0) -
2545  4.0 * d_quartic_bubble_ds0;
2546  dpsids(1, 1) = 4.0 * s[1] - 1.0 +
2547  3.0 * (d_cubic_bubble012_ds1 + d_cubic_bubble013_ds1 +
2548  d_cubic_bubble123_ds1) -
2549  4.0 * d_quartic_bubble_ds1;
2550  dpsids(1, 2) = 0.0 +
2551  3.0 * (d_cubic_bubble012_ds2 + d_cubic_bubble013_ds2 +
2552  d_cubic_bubble123_ds2) -
2553  4.0 * d_quartic_bubble_ds2;
2554 
2555  dpsids(2, 0) = 0.0 +
2556  3.0 * (d_cubic_bubble012_ds0 + d_cubic_bubble023_ds0 +
2557  d_cubic_bubble123_ds0) -
2558  4.0 * d_quartic_bubble_ds0;
2559  dpsids(2, 1) = 0.0 +
2560  3.0 * (d_cubic_bubble012_ds1 + d_cubic_bubble023_ds1 +
2561  d_cubic_bubble123_ds1) -
2562  4.0 * d_quartic_bubble_ds1;
2563  dpsids(2, 2) = 4.0 * s[2] - 1.0 +
2564  3.0 * (d_cubic_bubble012_ds2 + d_cubic_bubble023_ds2 +
2565  d_cubic_bubble123_ds2) -
2566  4.0 * d_quartic_bubble_ds2;
2567 
2568  dpsids(3, 0) = -4.0 * s3 + 1.0 +
2569  3.0 * (d_cubic_bubble013_ds0 + d_cubic_bubble023_ds0 +
2570  d_cubic_bubble123_ds0) -
2571  4.0 * d_quartic_bubble_ds0;
2572  dpsids(3, 1) = -4.0 * s3 + 1.0 +
2573  3.0 * (d_cubic_bubble013_ds1 + d_cubic_bubble023_ds1 +
2574  d_cubic_bubble123_ds1) -
2575  4.0 * d_quartic_bubble_ds1;
2576  dpsids(3, 2) = -4.0 * s3 + 1.0 +
2577  3.0 * (d_cubic_bubble013_ds2 + d_cubic_bubble023_ds2 +
2578  d_cubic_bubble123_ds2) -
2579  4.0 * d_quartic_bubble_ds2;
2580 
2581  dpsids(4, 0) = 4.0 * s[1] -
2582  12.0 * (d_cubic_bubble012_ds0 + d_cubic_bubble013_ds0) +
2583  32.0 * d_quartic_bubble_ds0;
2584  dpsids(4, 1) = 4.0 * s[0] -
2585  12.0 * (d_cubic_bubble012_ds1 + d_cubic_bubble013_ds1) +
2586  32.0 * d_quartic_bubble_ds1;
2587  dpsids(4, 2) = 0.0 -
2588  12.0 * (d_cubic_bubble012_ds2 + d_cubic_bubble013_ds2) +
2589  32.0 * d_quartic_bubble_ds2;
2590 
2591  dpsids(5, 0) = 4.0 * s[2] -
2592  12.0 * (d_cubic_bubble012_ds0 + d_cubic_bubble023_ds0) +
2593  32.0 * d_quartic_bubble_ds0;
2594  dpsids(5, 1) = 0.0 -
2595  12.0 * (d_cubic_bubble012_ds1 + d_cubic_bubble023_ds1) +
2596  32.0 * d_quartic_bubble_ds1;
2597  dpsids(5, 2) = 4.0 * s[0] -
2598  12.0 * (d_cubic_bubble012_ds2 + d_cubic_bubble023_ds2) +
2599  32.0 * d_quartic_bubble_ds2;
2600 
2601  dpsids(6, 0) = 4.0 * (s3 - s[0]) -
2602  12.0 * (d_cubic_bubble013_ds0 + d_cubic_bubble023_ds0) +
2603  32.0 * d_quartic_bubble_ds0;
2604  dpsids(6, 1) = -4.0 * s[0] -
2605  12.0 * (d_cubic_bubble013_ds1 + d_cubic_bubble023_ds1) +
2606  32.0 * d_quartic_bubble_ds1;
2607  dpsids(6, 2) = -4.0 * s[0] -
2608  12.0 * (d_cubic_bubble013_ds2 + d_cubic_bubble023_ds2) +
2609  32.0 * d_quartic_bubble_ds2;
2610 
2611  dpsids(7, 0) = 0.0 -
2612  12.0 * (d_cubic_bubble012_ds0 + d_cubic_bubble123_ds0) +
2613  32.0 * d_quartic_bubble_ds0;
2614  dpsids(7, 1) = 4.0 * s[2] -
2615  12.0 * (d_cubic_bubble012_ds1 + d_cubic_bubble123_ds1) +
2616  32.0 * d_quartic_bubble_ds1;
2617  dpsids(7, 2) = 4.0 * s[1] -
2618  12.0 * (d_cubic_bubble012_ds2 + d_cubic_bubble123_ds2) +
2619  32.0 * d_quartic_bubble_ds2;
2620 
2621  dpsids(8, 0) = -4.0 * s[2] -
2622  12.0 * (d_cubic_bubble023_ds0 + d_cubic_bubble123_ds0) +
2623  32.0 * d_quartic_bubble_ds0;
2624  dpsids(8, 1) = -4.0 * s[2] -
2625  12.0 * (d_cubic_bubble023_ds1 + d_cubic_bubble123_ds1) +
2626  32.0 * d_quartic_bubble_ds1;
2627  dpsids(8, 2) = 4.0 * (s3 - s[2]) -
2628  12.0 * (d_cubic_bubble023_ds2 + d_cubic_bubble123_ds2) +
2629  32.0 * d_quartic_bubble_ds2;
2630 
2631  dpsids(9, 0) = -4.0 * s[1] -
2632  12.0 * (d_cubic_bubble013_ds0 + d_cubic_bubble123_ds0) +
2633  32.0 * d_quartic_bubble_ds0;
2634  dpsids(9, 1) = 4.0 * (s3 - s[1]) -
2635  12.0 * (d_cubic_bubble013_ds1 + d_cubic_bubble123_ds1) +
2636  32.0 * d_quartic_bubble_ds1;
2637  dpsids(9, 2) = -4.0 * s[1] -
2638  12.0 * (d_cubic_bubble013_ds2 + d_cubic_bubble123_ds2) +
2639  32.0 * d_quartic_bubble_ds2;
2640 
2641  // Add the bubble function on the face spanned by 0 1 3
2642  dpsids(10, 0) =
2643  27.0 * d_cubic_bubble013_ds0 - 108.0 * d_quartic_bubble_ds0;
2644  dpsids(10, 1) =
2645  27.0 * d_cubic_bubble013_ds1 - 108.0 * d_quartic_bubble_ds1;
2646  dpsids(10, 2) =
2647  27.0 * d_cubic_bubble013_ds2 - 108.0 * d_quartic_bubble_ds2;
2648 
2649  // Add the bubble function on the face spanned by 0 1 2
2650  dpsids(11, 0) =
2651  27.0 * d_cubic_bubble012_ds0 - 108.0 * d_quartic_bubble_ds0;
2652  dpsids(11, 1) =
2653  27.0 * d_cubic_bubble012_ds1 - 108.0 * d_quartic_bubble_ds1;
2654  dpsids(11, 2) =
2655  27.0 * d_cubic_bubble012_ds2 - 108.0 * d_quartic_bubble_ds2;
2656 
2657  // Add the bubble function on the face spanned by 0 2 3
2658  dpsids(12, 0) =
2659  27.0 * d_cubic_bubble023_ds0 - 108.0 * d_quartic_bubble_ds0;
2660  dpsids(12, 1) =
2661  27.0 * d_cubic_bubble023_ds1 - 108.0 * d_quartic_bubble_ds1;
2662  dpsids(12, 2) =
2663  27.0 * d_cubic_bubble023_ds2 - 108.0 * d_quartic_bubble_ds2;
2664 
2665  // Add the bubble function on the face spanned by 1 2 3
2666  dpsids(13, 0) =
2667  27.0 * d_cubic_bubble123_ds0 - 108.0 * d_quartic_bubble_ds0;
2668  dpsids(13, 1) =
2669  27.0 * d_cubic_bubble123_ds1 - 108.0 * d_quartic_bubble_ds1;
2670  dpsids(13, 2) =
2671  27.0 * d_cubic_bubble123_ds2 - 108.0 * d_quartic_bubble_ds2;
2672 
2673  // Add the volumetric bubble function derivatives
2674  dpsids(14, 0) = 256.0 * d_quartic_bubble_ds0;
2675  dpsids(14, 1) = 256.0 * d_quartic_bubble_ds1;
2676  dpsids(14, 2) = 256.0 * d_quartic_bubble_ds2;
2677  }
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TBubbleEnrichedElement<3,3>
Definition: Telements.h:2438

References s, and oomph::OneDimLagrange::shape().

◆ local_coordinate_of_node()

void oomph::TBubbleEnrichedElementShape< 3, 3 >::local_coordinate_of_node ( const unsigned j,
Vector< double > &  s 
) const
inline
2321  {
2322  s.resize(3);
2323 
2324  switch (j)
2325  {
2326  case 0:
2327  s[0] = 1.0;
2328  s[1] = 0.0;
2329  s[2] = 0.0;
2330  break;
2331 
2332  case 1:
2333  s[0] = 0.0;
2334  s[1] = 1.0;
2335  s[2] = 0.0;
2336  break;
2337 
2338  case 2:
2339  s[0] = 0.0;
2340  s[1] = 0.0;
2341  s[2] = 1.0;
2342  break;
2343 
2344  case 3:
2345  s[0] = 0.0;
2346  s[1] = 0.0;
2347  s[2] = 0.0;
2348  break;
2349 
2350  case 4:
2351  s[0] = 0.5;
2352  s[1] = 0.5;
2353  s[2] = 0.0;
2354  break;
2355 
2356  case 5:
2357  s[0] = 0.5;
2358  s[1] = 0.0;
2359  s[2] = 0.5;
2360  break;
2361 
2362  case 6:
2363  s[0] = 0.5;
2364  s[1] = 0.0;
2365  s[2] = 0.0;
2366  break;
2367 
2368  case 7:
2369  s[0] = 0.0;
2370  s[1] = 0.5;
2371  s[2] = 0.5;
2372  break;
2373 
2374  case 8:
2375  s[0] = 0.0;
2376  s[1] = 0.0;
2377  s[2] = 0.5;
2378  break;
2379 
2380  case 9:
2381  s[0] = 0.0;
2382  s[1] = 0.5;
2383  s[2] = 0.0;
2384  break;
2385 
2386  // Node at centroid of face spanned by nodes 0, 1, 3
2387  case 10:
2388  s[0] = 1.0 / 3.0;
2389  s[1] = 1.0 / 3.0;
2390  s[2] = 0.0;
2391  break;
2392 
2393  // Node at centroid of face spanned by nodes 0, 1, 2
2394  case 11:
2395  s[0] = 1.0 / 3.0;
2396  s[1] = 1.0 / 3.0;
2397  s[2] = 1.0 / 3.0;
2398  break;
2399 
2400  // Node at centroid of face spanned by nodes 0, 2, 3
2401  case 12:
2402  s[0] = 1.0 / 3.0;
2403  s[1] = 0.0;
2404  s[2] = 1.0 / 3.0;
2405  break;
2406 
2407  // Node at centroid of face spannd by nodes 1, 2, 3
2408  case 13:
2409  s[0] = 0.0;
2410  s[1] = 1.0 / 3.0;
2411  s[2] = 1.0 / 3.0;
2412  break;
2413 
2414  // Node at centroid of volume
2415  case 14:
2416  s[0] = 0.25;
2417  s[1] = 0.25;
2418  s[2] = 0.25;
2419  break;
2420 
2421 
2422  default:
2423  std::ostringstream error_message;
2424  error_message
2425  << "Element only has fifteen nodes; called with node number " << j
2426  << std::endl;
2427 
2428  throw OomphLibError(error_message.str(),
2431  }
2432  }
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References j, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ n_enriched_nodes()

unsigned oomph::TBubbleEnrichedElementShape< 3, 3 >::n_enriched_nodes ( )
inline
2316  {
2317  return 5;
2318  }

◆ shape()

void oomph::TBubbleEnrichedElementShape< 3, 3 >::shape ( const Vector< double > &  s,
Shape psi 
) const
inline

Shape function for specific TBubbleEnrichedElement<3,3>

2439  {
2440  // Constructe the fourth volume coordinate
2441  const double s3 = 1.0 - s[0] - s[1] - s[2];
2442  // calculate the enrichment functions
2443  const double quartic_bubble = s[0] * s[1] * s[2] * s3;
2444  const double cubic_bubble012 = s[0] * s[1] * s[2];
2445  const double cubic_bubble013 = s[0] * s[1] * s3;
2446  const double cubic_bubble023 = s[0] * s[2] * s3;
2447  const double cubic_bubble123 = s[1] * s[2] * s3;
2448 
2449  // The appropriate "amount" of cubic and quartic bubble functions are
2450  // added/subtracted
2451  // to each original quadratic shape function to ensure that the new
2452  // shape function is zero at the centroid (0.25,0.25,0.25)
2453  // and at the face centroids
2454  psi[0] = (2.0 * s[0] - 1.0) * s[0] +
2455  3.0 * (cubic_bubble012 + cubic_bubble013 + cubic_bubble023) -
2456  4.0 * quartic_bubble;
2457  psi[1] = (2.0 * s[1] - 1.0) * s[1] +
2458  3.0 * (cubic_bubble012 + cubic_bubble013 + cubic_bubble123) -
2459  4.0 * quartic_bubble;
2460  psi[2] = (2.0 * s[2] - 1.0) * s[2] +
2461  3.0 * (cubic_bubble012 + cubic_bubble023 + cubic_bubble123) -
2462  4.0 * quartic_bubble;
2463  psi[3] = (2.0 * s3 - 1.0) * s3 +
2464  3.0 * (cubic_bubble013 + cubic_bubble023 + cubic_bubble123) -
2465  4.0 * quartic_bubble;
2466  psi[4] = 4.0 * s[0] * s[1] - 12.0 * (cubic_bubble012 + cubic_bubble013) +
2467  32.0 * quartic_bubble;
2468  psi[5] = 4.0 * s[0] * s[2] - 12.0 * (cubic_bubble012 + cubic_bubble023) +
2469  32.0 * quartic_bubble;
2470  psi[6] = 4.0 * s[0] * s3 - 12.0 * (cubic_bubble013 + cubic_bubble023) +
2471  32.0 * quartic_bubble;
2472  psi[7] = 4.0 * s[1] * s[2] - 12.0 * (cubic_bubble012 + cubic_bubble123) +
2473  32.0 * quartic_bubble;
2474  psi[8] = 4.0 * s[2] * s3 - 12.0 * (cubic_bubble023 + cubic_bubble123) +
2475  32.0 * quartic_bubble;
2476  psi[9] = 4.0 * s[1] * s3 - 12.0 * (cubic_bubble013 + cubic_bubble123) +
2477  32.0 * quartic_bubble;
2478  // Add the bubble function on the face spanned by 0 1 3
2479  psi[10] = 27.0 * cubic_bubble013 - 108.0 * quartic_bubble;
2480  // Add the bubble function on the face spanned by 0 1 2
2481  psi[11] = 27.0 * cubic_bubble012 - 108.0 * quartic_bubble;
2482  // Add the bubble function on the face spanned by 0 2 3
2483  psi[12] = 27.0 * cubic_bubble023 - 108.0 * quartic_bubble;
2484  // Add the bubble function on the face spanned by 1 2 3
2485  psi[13] = 27.0 * cubic_bubble123 - 108.0 * quartic_bubble;
2486  // Add the volume bubble function, scaled to have value one
2487  psi[14] = 256.0 * quartic_bubble;
2488  }

References s.


The documentation for this class was generated from the following file: