Changeset 3466


Ignore:
Timestamp:
04/08/10 10:27:37 (15 years ago)
Author:
seroussi
Message:

minor: added gauss points for Segments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/shared/Numerics/GaussPoints.cpp

    r3332 r3466  
    20412041               
    20422042        }
     2043        else if (num_gauss==4){
     2044                //order=3, num_gauss=4. Can integrate polynomials of degree 0 to 5
     2045
     2046                gauss_weights=(double*)xmalloc(num_gauss*sizeof(double));
     2047                gauss_weights[0]=0.347854845137454;
     2048                gauss_weights[1]=0.652145154862546;
     2049                gauss_weights[2]=0.652145154862546;
     2050                gauss_weights[3]=0.347854845137454;
     2051               
     2052                segment_coord=(double*)xmalloc(num_gauss*sizeof(double));
     2053                segment_coord[0]=-0.861136311594053;
     2054                segment_coord[1]=-0.339981043584856;
     2055                segment_coord[2]=0.339981043584856;
     2056                segment_coord[3]=0.861136311594053;
     2057               
     2058        }
     2059        else if (num_gauss==5){
     2060                //order=3, num_gauss=4. Can integrate polynomials of degree 0 to 5
     2061
     2062                gauss_weights=(double*)xmalloc(num_gauss*sizeof(double));
     2063                gauss_weights[0]=0.236926885056189;
     2064                gauss_weights[1]=0.478628670499366;
     2065                gauss_weights[2]=0.568888888888889;
     2066                gauss_weights[3]=0.478628670499366;
     2067                gauss_weights[4]=0.236926885056189;
     2068               
     2069                segment_coord=(double*)xmalloc(num_gauss*sizeof(double));
     2070                segment_coord[0]=-0.906179845938664;
     2071                segment_coord[1]=-0.538469310105683;
     2072                segment_coord[2]=0.0;
     2073                segment_coord[3]=0.538469310105683;
     2074                segment_coord[4]=0.906179845938664;
     2075               
     2076        }
    20432077        else{
    20442078                _printf_("GaussSegment error message: order not supported yet");
Note: See TracChangeset for help on using the changeset viewer.