Changeset 6ee942 in git
- Timestamp:
- Jul 1, 2009, 2:38:06 PM (14 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- 609e27bbde0bf01bf5570326dc8bfcd73aaa4dba
- Parents:
- c4c127743ed450cab07372ff8921b84b9a15e6db
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/findiff.lib
rc4c127 r6ee942 2 2 // 3 3 ////////////////////////////////////////////////////////////////////////////// 4 version="$Id: findiff.lib,v 1. 1 2009-07-01 12:35:07Singular Exp $";4 version="$Id: findiff.lib,v 1.2 2009-07-01 12:38:06 Singular Exp $"; 5 5 category="Teaching"; 6 6 info=" … … 851 851 example 852 852 { 853 killall(); 854 "EXAMPLE:"echo=2; 855 list D="Ut","Ux","Uy","U"; 856 list V="t","x","y"; 857 list P="a","b"; 858 setinitials(V,D,P); 859 list Mat=unitmat(2),unitmat(2); 860 list Apr=forward(Ut,U,t),forward(Ux,U,x); 861 matrixsystem(Mat,Apr); 862 timestep(_); 853 "EXAMPLE:"echo=2; 854 list D="Ut","Ux","Uy","U"; 855 list V="t","x","y"; 856 list P="a","b"; 857 setinitials(V,D,P); 858 list Mat=unitmat(2),unitmat(2); 859 list Apr=forward(Ut,U,t),forward(Ux,U,x); 860 matrixsystem(Mat,Apr); 861 timestep(_); 863 862 } 864 863 ////////////////////////////////// … … 921 920 example 922 921 { 923 killall(); 924 "EXAMPLE:"; echo = 2; 925 list D="Ut","Ux","Uy","U"; 926 list V="t","x","y"; 927 list P="a","b"; 928 setinitials(V,D,P); 929 matrix M[2][2]=0,-a,-a,0; 930 list Mat=unitmat(2),M; 931 list Appr=forward(Ut,U,t),trapezoid(Ux,U,x); 932 def s=fouriersystem(Mat,Appr);s; 922 "EXAMPLE:"; echo = 2; 923 list D="Ut","Ux","Uy","U"; 924 list V="t","x","y"; 925 list P="a","b"; 926 setinitials(V,D,P); 927 matrix M[2][2]=0,-a,-a,0; 928 list Mat=unitmat(2),M; 929 list Appr=forward(Ut,U,t),trapezoid(Ux,U,x); 930 def s=fouriersystem(Mat,Appr);s; 933 931 } 934 932 ////////////////////////////////// … … 959 957 example 960 958 { 961 killall(); 962 "EXAMPLE:"; echo = 2; 963 list D="Ut","Ux","Uy","U"; 964 list V="t","x","y"; 965 list P="a","b"; 966 setinitials(V,D,P);////does not show the ring, since there is no output 967 basering;///does show the ring 968 poly f=t**3*cx**2-cy**2*dt+i**3*sx; 969 PartitionVar(f,1); ////i is the first variable 959 "EXAMPLE:"; echo = 2; 960 list D="Ut","Ux","Uy","U"; 961 list V="t","x","y"; 962 list P="a","b"; 963 setinitials(V,D,P);////does not show the ring, since there is no output 964 basering;///does show the ring 965 poly f=t**3*cx**2-cy**2*dt+i**3*sx; 966 PartitionVar(f,1); ////i is the first variable 970 967 } 971 968 ////////////////////////////////// … … 985 982 example 986 983 { 987 killall(); 988 "EXAMPLE:"; echo = 2; 989 list D="Ut","Ux","Uy","U"; 990 list V="t","x","y"; 991 list P="a","b"; 992 setinitials(V,D,P);////does not show the ring, as there is no output 993 basering;///does show the ring 994 poly f=t**3*cx**2-cy**2*dt+i**3*sx; 995 f; 996 VarToPar(f); 984 "EXAMPLE:"; echo = 2; 985 list D="Ut","Ux","Uy","U"; 986 list V="t","x","y"; 987 list P="a","b"; 988 setinitials(V,D,P);////does not show the ring, as there is no output 989 basering;///does show the ring 990 poly f=t**3*cx**2-cy**2*dt+i**3*sx; 991 f; 992 VarToPar(f); 997 993 } 998 994 ////////////////////////////////// … … 1014 1010 example 1015 1011 { 1016 killall(); 1017 "EXAMPLE:"; echo = 2; 1018 list D="Ut","Ux","Uy","U"; 1019 list V="t","x","y"; 1020 list P="a","b"; 1021 setinitials(V,D,P);////does not show the ring, as there is no output 1022 basering;///does show the ring 1023 poly f=t**3*cx**2-cy**2*dt+i**3*sx; 1024 f; 1025 VarToPar(f); 1012 "EXAMPLE:"; echo = 2; 1013 list D="Ut","Ux","Uy","U"; 1014 list V="t","x","y"; 1015 list P="a","b"; 1016 setinitials(V,D,P);////does not show the ring, as there is no output 1017 basering;///does show the ring 1018 poly f=t**3*cx**2-cy**2*dt+i**3*sx; 1019 f; 1020 VarToPar(f); 1026 1021 } 1027 1022 ///////////////////////////////////// … … 1046 1041 example 1047 1042 { 1048 killall(); 1049 " 1050 EXAMPLE:"; echo = 2; 1043 "EXAMPLE:"; echo = 2; 1051 1044 list D="Ut","Ux","Uy","U"; 1052 1045 list V="t","x","y"; … … 1129 1122 example 1130 1123 { 1131 killall(); 1132 "EXAMPLE:"; echo = 2; 1133 list D="Ux","Ut","U"; 1134 list P="a"; 1135 list V="t","x"; 1136 setinitials(V,D,P); 1137 def s1=scheme(u(Ut)+a*u(Ux),laxfrX(Ux,U,x),laxfrT(Ut,U,x)); 1138 s1; 1139 def s2=errormap(s1); 1140 s2; 1141 def s3=ComplexValue(s2);s3; 1142 qepcad(s3); 1124 "EXAMPLE:"; echo = 2; 1125 list D="Ux","Ut","U"; 1126 list P="a"; 1127 list V="t","x"; 1128 setinitials(V,D,P); 1129 def s1=scheme(u(Ut)+a*u(Ux),laxfrX(Ux,U,x),laxfrT(Ut,U,x)); 1130 s1; 1131 def s2=errormap(s1); 1132 s2; 1133 def s3=ComplexValue(s2);s3; 1134 qepcad(s3); 1143 1135 } 1144 1136 /////////////////////////////////////////// … … 1230 1222 example 1231 1223 { 1232 killall(); 1233 "EXAMPLE:"; echo = 2; 1234 list D="Ut","Ux","Uy","U"; 1235 list V="t","x","y"; 1236 list P="a","b"; 1237 setinitials(V,D,P); 1238 matrix M[2][2]=0,-a,-a,0; 1239 list Mat=unitmat(2),M; 1240 list Appr=forward(Ut,U,t),forward(Ux,U,x); 1241 //matrixsystem(Mat,Appr); 1242 //timestep(_); 1243 fouriersystem(Mat,Appr); 1244 qepcadsystem(_[2]); 1245 } 1246 /////////////////////////////////////////// 1224 "EXAMPLE:"; echo = 2; 1225 list D="Ut","Ux","Uy","U"; 1226 list V="t","x","y"; 1227 list P="a","b"; 1228 setinitials(V,D,P); 1229 matrix M[2][2]=0,-a,-a,0; 1230 list Mat=unitmat(2),M; 1231 list Appr=forward(Ut,U,t),forward(Ux,U,x); 1232 //matrixsystem(Mat,Appr); 1233 //timestep(_); 1234 fouriersystem(Mat,Appr); 1235 qepcadsystem(_[2]); 1236 } 1247 1237 /////////////////////////////////////////// 1248 1238 static proc substbracketstar(string s) … … 1596 1586 } 1597 1587 ////////////////////////////////////////////////// 1598 static proc cutoffrel(string str) 1588 static proc cutoffrel(string str) 1599 1589 /////////cut off the relations "/=,<= etc." from output-string 1600 1590 {
Note: See TracChangeset
for help on using the changeset viewer.