GaussTria

PURPOSE ^

GAUSSTRIA - get Gauss point for triangle elements

SYNOPSIS ^

function [num_gauss,first_gauss_area_coord,second_gauss_area_coord,third_gauss_area_coord,gauss_weights]=GaussTria(order)

DESCRIPTION ^

GAUSSTRIA - get Gauss point for triangle elements

   This routine computes gaussian points on a reference triangle, in terms of their area coordinates. 
   The number of gaussian points returned depends on the order of integration ('order'). The order of 
   integration can be computed from the polynomial degree p that needs to be integrated. The formula is: 
   order = (p+1) /2 
   order=1, num_gauss=1. Can integrate polynomials of degree 0 to 1

   Usage:
      [num_gauss,first_gauss_area_coord,second_gauss_area_coord,third_gauss_area_coord,gauss_weights]=GaussTria(order)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [num_gauss,first_gauss_area_coord,second_gauss_area_coord,third_gauss_area_coord,gauss_weights]=GaussTria(order)
0002 %GAUSSTRIA - get Gauss point for triangle elements
0003 %
0004 %   This routine computes gaussian points on a reference triangle, in terms of their area coordinates.
0005 %   The number of gaussian points returned depends on the order of integration ('order'). The order of
0006 %   integration can be computed from the polynomial degree p that needs to be integrated. The formula is:
0007 %   order = (p+1) /2
0008 %   order=1, num_gauss=1. Can integrate polynomials of degree 0 to 1
0009 %
0010 %   Usage:
0011 %      [num_gauss,first_gauss_area_coord,second_gauss_area_coord,third_gauss_area_coord,gauss_weights]=GaussTria(order)
0012 
0013 if order==1,
0014     num_gauss=1;
0015     gauss_weights=1.732050807568877;
0016     first_gauss_area_coord= 0.333333333333333;
0017     second_gauss_area_coord= 0.333333333333333;
0018     third_gauss_area_coord= 0.333333333333333;
0019 
0020 %order=2, num_gauss=3. Can integrate polynomials of degree 0 to 3
0021 elseif order==2,
0022     
0023     num_gauss=3;
0024     gauss_weights=[ 0.577350269189625, 0.577350269189625, 0.577350269189625];
0025     first_gauss_area_coord=[ 0.666666666666667, 0.166666666666667, 0.166666666666667];
0026     second_gauss_area_coord=[ 0.166666666666667, 0.666666666666667, 0.166666666666667];
0027     third_gauss_area_coord=[ 0.166666666666667, 0.166666666666667, 0.666666666666667];
0028 
0029 %order=3, num_gauss=4. Can integrate polynomials of degree 0 to 5
0030 elseif order==3,
0031     num_gauss=4;
0032     gauss_weights=[ -0.974278579257493, 0.902109795608790, 0.902109795608790, 0.902109795608790];
0033     first_gauss_area_coord=[ 0.333333333333333, 0.600000000000000, 0.200000000000000, 0.200000000000000];
0034     second_gauss_area_coord=[ 0.333333333333333, 0.200000000000000, 0.600000000000000, 0.200000000000000];
0035     third_gauss_area_coord=[ 0.333333333333333, 0.200000000000000, 0.200000000000000, 0.600000000000000];
0036 
0037 %order=4, num_gauss=6. Can integrate polynomials of degree 0 to 7
0038 elseif order==4,
0039     num_gauss=6;
0040     gauss_weights=[ 0.386908262797819, 0.386908262797819, 0.386908262797819, 0.190442006391807, 0.190442006391807, 0.190442006391807];
0041     first_gauss_area_coord=[ 0.108103018168070, 0.445948490915965, 0.445948490915965, 0.816847572980459, 0.091576213509771, 0.091576213509771];
0042     second_gauss_area_coord=[ 0.445948490915965, 0.108103018168070, 0.445948490915965, 0.091576213509771, 0.816847572980459, 0.091576213509771];
0043     third_gauss_area_coord=[ 0.445948490915965, 0.445948490915965, 0.108103018168070, 0.091576213509771, 0.091576213509771, 0.816847572980459];
0044 
0045 %order=5, num_gauss=7. Can integrate polynomials of degree 0 to 9
0046 elseif order==5,
0047     num_gauss=7;
0048     
0049     gauss_weights=[ 0.389711431702997, 0.229313399254729, 0.229313399254729, 0.229313399254729, 0.218133059367230, 0.218133059367230, 0.218133059367230];
0050     first_gauss_area_coord=[ 0.333333333333333, 0.059715871789770, 0.470142064105115, 0.470142064105115, 0.797426985353087, 0.101286507323456, 0.101286507323456];
0051     second_gauss_area_coord=[ 0.333333333333333, 0.470142064105115, 0.059715871789770, 0.470142064105115, 0.101286507323456, 0.797426985353087, 0.101286507323456];
0052     third_gauss_area_coord=[ 0.333333333333333, 0.470142064105115, 0.470142064105115, 0.059715871789770, 0.101286507323456, 0.101286507323456, 0.797426985353087];
0053 
0054 %order=6, num_gauss=12. Can integrate polynomials of degree 0 to 11
0055 elseif order==6,
0056     num_gauss=12;
0057     gauss_weights=[ 0.202279763184836, 0.202279763184836, 0.202279763184836, 0.088065961139281, 0.088065961139281, 0.088065961139281, ...
0058          0.143502272432755, 0.143502272432755, 0.143502272432755, 0.143502272432755, 0.143502272432755, 0.143502272432755];
0059     first_gauss_area_coord=[ 0.501426509658179, 0.249286745170910, 0.249286745170910, 0.873821971016996, 0.063089014491502, 0.063089014491502,  ...
0060          0.053145049844817, 0.053145049844817, 0.310352451033784, 0.636502499121399, 0.310352451033784, 0.636502499121399];
0061     second_gauss_area_coord=[ 0.249286745170910, 0.501426509658179, 0.249286745170910, 0.063089014491502, 0.873821971016996, 0.063089014491502,  ...
0062          0.310352451033784, 0.636502499121399, 0.053145049844817, 0.053145049844817, 0.636502499121399, 0.310352451033784];
0063     third_gauss_area_coord=[ 0.249286745170910, 0.249286745170910, 0.501426509658179, 0.063089014491502, 0.063089014491502, 0.873821971016996,  ...
0064          0.636502499121399, 0.310352451033784, 0.636502499121399, 0.310352451033784, 0.053145049844817, 0.053145049844817];
0065 else
0066     error('GaussTria error message: order not supported yet');
0067 end

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003