Mercurial > repos > public > sbplib
comparison +scheme/Hypsyst3d.m @ 350:5d5652fe826a feature/hypsyst
A commit before I try resolving the performance issues
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Wed, 02 Nov 2016 00:02:01 +0100 |
parents | cd6a29ab3746 |
children | 9b3d7fc61a36 |
comparison
equal
deleted
inserted
replaced
349:cd6a29ab3746 | 350:5d5652fe826a |
---|---|
8 Yx, Zx, Xy, Zy, Xz, Yz %Grid values for boundary surfaces | 8 Yx, Zx, Xy, Zy, Xz, Yz %Grid values for boundary surfaces |
9 order % Order accuracy for the approximation | 9 order % Order accuracy for the approximation |
10 | 10 |
11 D % non-stabalized scheme operator | 11 D % non-stabalized scheme operator |
12 A, B, C, E | 12 A, B, C, E |
13 Aevaluated,Bevaluated,Cevaluated, Eevaluated | |
13 | 14 |
14 H % Discrete norm | 15 H % Discrete norm |
15 % Norms in the x, y and z directions | 16 % Norms in the x, y and z directions |
16 Hxi,Hyi, Hzi % Kroneckerd norms. 1'*Hx*v corresponds to integration in the x dir. | 17 Hxi,Hyi, Hzi % Kroneckerd norms. 1'*Hx*v corresponds to integration in the x dir. |
17 I_x,I_y, I_z, I_N | 18 I_x,I_y, I_z, I_N |
59 obj.Zy=kr(ones(m_x,1),obj.z); | 60 obj.Zy=kr(ones(m_x,1),obj.z); |
60 | 61 |
61 obj.Xz=kr(obj.x,ones(m_y,1)); | 62 obj.Xz=kr(obj.x,ones(m_y,1)); |
62 obj.Yz=kr(ones(m_z,1),obj.y); | 63 obj.Yz=kr(ones(m_z,1),obj.y); |
63 | 64 |
64 Aevaluated = obj.evaluateCoefficientMatrix(A, obj.X, obj.Y,obj.Z); | 65 obj.Aevaluated = obj.evaluateCoefficientMatrix(A, obj.X, obj.Y,obj.Z); |
65 Bevaluated = obj.evaluateCoefficientMatrix(B, obj.X, obj.Y,obj.Z); | 66 obj.Bevaluated = obj.evaluateCoefficientMatrix(B, obj.X, obj.Y,obj.Z); |
66 Cevaluated = obj.evaluateCoefficientMatrix(C, obj.X, obj.Y,obj.Z); | 67 obj.Cevaluated = obj.evaluateCoefficientMatrix(C, obj.X, obj.Y,obj.Z); |
67 Eevaluated = obj.evaluateCoefficientMatrix(E, obj.X, obj.Y,obj.Z); | 68 obj.Eevaluated = obj.evaluateCoefficientMatrix(E, obj.X, obj.Y,obj.Z); |
68 | 69 |
69 obj.n = length(A(obj.params,0,0,0)); | 70 obj.n = length(A(obj.params,0,0,0)); |
70 | 71 |
71 I_n = eye(obj.n); | 72 I_n = eye(obj.n); |
72 I_x = speye(m_x); | 73 I_x = speye(m_x); |
80 D1_x = kr(I_n, ops_x.D1, I_y,I_z); | 81 D1_x = kr(I_n, ops_x.D1, I_y,I_z); |
81 obj.Hxi = kr(I_n, ops_x.HI, I_y,I_z); | 82 obj.Hxi = kr(I_n, ops_x.HI, I_y,I_z); |
82 D1_y = kr(I_n, I_x, ops_y.D1,I_z); | 83 D1_y = kr(I_n, I_x, ops_y.D1,I_z); |
83 obj.Hyi = kr(I_n, I_x, ops_y.HI,I_z); | 84 obj.Hyi = kr(I_n, I_x, ops_y.HI,I_z); |
84 D1_z = kr(I_n, I_x, I_y,ops_z.D1); | 85 D1_z = kr(I_n, I_x, I_y,ops_z.D1); |
85 obj.Hzi = kr(I_n, I_x,I_y, ops_y.HI); | 86 obj.Hzi = kr(I_n, I_x,I_y, ops_z.HI); |
86 | 87 |
87 obj.e_w = kr(I_n, ops_x.e_l, I_y,I_z); | 88 obj.e_w = kr(I_n, ops_x.e_l, I_y,I_z); |
88 obj.e_e = kr(I_n, ops_x.e_r, I_y,I_z); | 89 obj.e_e = kr(I_n, ops_x.e_r, I_y,I_z); |
89 obj.e_s = kr(I_n, I_x, ops_y.e_l,I_z); | 90 obj.e_s = kr(I_n, I_x, ops_y.e_l,I_z); |
90 obj.e_n = kr(I_n, I_x, ops_y.e_r,I_z); | 91 obj.e_n = kr(I_n, I_x, ops_y.e_r,I_z); |
93 | 94 |
94 obj.m=m; | 95 obj.m=m; |
95 obj.h=[ops_x.h ops_y.h ops_x.h]; | 96 obj.h=[ops_x.h ops_y.h ops_x.h]; |
96 obj.order=order; | 97 obj.order=order; |
97 | 98 |
98 obj.D=-Aevaluated*D1_x-Bevaluated*D1_y-Cevaluated*D1_z-Eevaluated; | 99 obj.D=-obj.Aevaluated*D1_x-obj.Bevaluated*D1_y-obj.Cevaluated*D1_z-obj.Eevaluated; |
99 end | 100 end |
100 | 101 |
101 % Closure functions return the opertors applied to the own doamin to close the boundary | 102 % Closure functions return the opertors applied to the own doamin to close the boundary |
102 % Penalty functions return the opertors to force the solution. In the case of an interface it returns the operator applied to the other doamin. | 103 % Penalty functions return the opertors to force the solution. In the case of an interface it returns the operator applied to the other doamin. |
103 % boundary is a string specifying the boundary e.g. 'l','r' or 'e','w','n','s'. | 104 % boundary is a string specifying the boundary e.g. 'l','r' or 'e','w','n','s'. |