30 June 2014 10:15:53 AM TRIANGLE_SYMQ_RULE_PRB C++ version Test the TRIANGLE_SYMQ_RULE library. TEST01 Map points from one triangle to another. R = reference triangle S = simplex T = user-defined triangle. REF_TO_TRIANGLE: R => T SIMPLEX_TO_TRIANGLE: S => T TRIANGLE_TO_REF: T => R TRIANGLE_TO_SIMPLEX: T => S SP1: 0.781582 0.0436824 TP1: 3.30106 3.25737 RP1: 0.606846 -0.50169 TP2: 3.30106 3.25737 SP2: 0.781582 0.0436824 SP1: 0.170491 0.438305 TP1: 1.07317 1.99688 RP1: -0.220714 0.181815 TP2: 1.07317 1.99688 SP2: 0.170491 0.438305 SP1: 0.415307 0.0661187 TP1: 2.1798 1.85958 RP1: -0.103267 -0.462829 TP2: 2.1798 1.85958 SP2: 0.415307 0.0661187 SP1: 0.257578 0.109957 TP1: 1.66278 1.36018 RP1: -0.374888 -0.3869 TP2: 1.66278 1.36018 SP2: 0.257578 0.109957 SP1: 0.043829 0.633966 TP1: 0.497521 2.07721 RP1: -0.278376 0.520711 TP2: 0.497521 2.07721 SP2: 0.043829 0.633966 Region is user-defined triangle. Triangle: 1 0 4 4 0 3 TEST02 Symmetric quadrature rule for a triangle. Polynomial exactness degree DEGREE = 8 NUMNODES = 16 J W X Y 0 0.670913 1.34114 1.19399 1 0.670913 2.80601 3.14715 2 0.670913 0.852847 2.65886 3 0.618096 2.29646 2.08141 4 0.618096 1.91859 3.21505 5 0.618096 0.784952 1.70354 6 0.938051 1.66667 2.33333 7 0.21098 1.10109 0.353831 8 0.21098 3.64617 3.74726 9 0.21098 0.252736 2.89891 10 0.176997 1.78094 1.07764 11 0.176997 2.92236 3.70331 12 0.176997 0.296692 2.21906 13 0.176997 3.17708 2.93915 14 0.176997 1.06085 3.23793 15 0.176997 0.762072 0.822918 Sum 6.5 Area 6.5 TEST03 TRIASYMQ_GNUPLOT creates gnuplot graphics files. Polynomial exactness degree DEGREE = 8 Number of nodes = 16 Created triangle file 'user08_triangle.txt' Created node file 'user08_nodes.txt' Created command file 'user08_commands.txt' TEST04 Get a quadrature rule for a triangle. Then write it to a file. Polynomial exactness degree DEGREE = 8 Quadrature rule written to file 'user08.txt' TEST05 Compute a quadrature rule for a triangle. Check it by integrating orthonormal polynomials. Polynomial exactness degree DEGREE = 8 RMS integration error = 2.75098e-16 Region is standard equilateral triangle. Triangle: -1 -0.57735 1 -0.57735 0 1.1547 TEST02 Symmetric quadrature rule for a triangle. Polynomial exactness degree DEGREE = 8 NUMNODES = 16 J W X Y 0 0.178778 -0.488292 -0.281916 1 0.178778 0.488292 -0.281916 2 0.178778 4.44089e-16 0.563831 3 0.164704 0 -0.436336 4 0.164704 0.377878 0.218168 5 0.164704 -0.377878 0.218168 6 0.249962 0 2.22045e-16 7 0.0562198 -0.848358 -0.4898 8 0.0562198 0.848358 -0.4898 9 0.0562198 6.66134e-16 0.9796 10 0.0471643 -0.46538 -0.56281 11 0.0471643 0.720098 -0.121625 12 0.0471643 -0.254718 0.684436 13 0.0471643 0.46538 -0.56281 14 0.0471643 0.254718 0.684436 15 0.0471643 -0.720098 -0.121625 Sum 1.73205 Area 1.73205 TEST03 TRIASYMQ_GNUPLOT creates gnuplot graphics files. Polynomial exactness degree DEGREE = 8 Number of nodes = 16 Created triangle file 'equi08_triangle.txt' Created node file 'equi08_nodes.txt' Created command file 'equi08_commands.txt' TEST04 Get a quadrature rule for a triangle. Then write it to a file. Polynomial exactness degree DEGREE = 8 Quadrature rule written to file 'equi08.txt' TEST05 Compute a quadrature rule for a triangle. Check it by integrating orthonormal polynomials. Polynomial exactness degree DEGREE = 8 RMS integration error = 1.39354e-16 Region is the simplex (0,0),(1,0),(0,1). Triangle: 0 0 1 0 0 1 TEST02 Symmetric quadrature rule for a triangle. Polynomial exactness degree DEGREE = 8 NUMNODES = 16 J W X Y 0 0.0516087 0.170569 0.170569 1 0.0516087 0.658861 0.170569 2 0.0516087 0.170569 0.658861 3 0.0475458 0.459293 0.0814148 4 0.0475458 0.459293 0.459293 5 0.0475458 0.0814148 0.459293 6 0.0721578 0.333333 0.333333 7 0.0162292 0.0505472 0.0505472 8 0.0162292 0.898906 0.0505472 9 0.0162292 0.0505472 0.898906 10 0.0136152 0.263113 0.00839478 11 0.0136152 0.728492 0.263113 12 0.0136152 0.00839478 0.728492 13 0.0136152 0.728492 0.00839478 14 0.0136152 0.263113 0.728492 15 0.0136152 0.00839478 0.263113 Sum 0.5 Area 0.5 TEST03 TRIASYMQ_GNUPLOT creates gnuplot graphics files. Polynomial exactness degree DEGREE = 8 Number of nodes = 16 Created triangle file 'simp08_triangle.txt' Created node file 'simp08_nodes.txt' Created command file 'simp08_commands.txt' TEST04 Get a quadrature rule for a triangle. Then write it to a file. Polynomial exactness degree DEGREE = 8 Quadrature rule written to file 'simp08.txt' TEST05 Compute a quadrature rule for a triangle. Check it by integrating orthonormal polynomials. Polynomial exactness degree DEGREE = 8 RMS integration error = 6.97147e-17 TRIANGLE_SYMQ_RULE_PRB Normal end of execution. 30 June 2014 10:15:53 AM