changeset 974:1c334842bf23 feature/poroelastic

Extract tuning from alpha.
author Martin Almquist <malmquist@stanford.edu>
date Tue, 25 Dec 2018 16:39:06 +0100
parents f5a99cca4654
children b828e589d540
files +scheme/Elastic2dVariable.m
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
diff -r f5a99cca4654 -r 1c334842bf23 +scheme/Elastic2dVariable.m
--- a/+scheme/Elastic2dVariable.m	Tue Dec 25 16:26:20 2018 +0100
+++ b/+scheme/Elastic2dVariable.m	Tue Dec 25 16:39:06 2018 +0100
@@ -384,7 +384,7 @@
                 % Loop over components that Dirichlet penalties end up on
                 for i = 1:dim
                     C = transpose(T{k,i});
-                    A = -e*transpose(alpha{i,k});
+                    A = -tuning*e*transpose(alpha{i,k});
                     B = A + e*C;
                     closure = closure + E{i}*RHOi*Hi*B'*e*H_gamma*(e'*E{k}' );
                     penalty = penalty - E{i}*RHOi*Hi*B'*e*H_gamma;
@@ -438,8 +438,8 @@
             RHOi = obj.RHOi_kron;
 
             % Penalty strength operators
-            alpha_u = 1/4*obj.getBoundaryOperator('alpha_tot', boundary);
-            alpha_v = 1/4*neighbour_scheme.getBoundaryOperator('alpha_tot', neighbour_boundary);
+            alpha_u = 1/4*tuning*obj.getBoundaryOperator('alpha_tot', boundary);
+            alpha_v = 1/4*tuning*neighbour_scheme.getBoundaryOperator('alpha_tot', neighbour_boundary);
 
             closure = -RHOi*Hi*e*H_gamma*(alpha_u' + alpha_v'*e_v*e');
             penalty = RHOi*Hi*e*H_gamma*(alpha_u'*e*e_v' + alpha_v');
@@ -552,7 +552,6 @@
                         % alpha = alpha(i,j) is the penalty strength for displacement BC.
                         e = obj.getBoundaryOperator('e', boundary);
 
-                        tuning = 1.2;
                         LAMBDA = obj.LAMBDA;
                         MU = obj.MU;
 
@@ -569,9 +568,9 @@
                         db = @(i,j) 1-d(i,j); % Logical not of Kronecker delta
                         alpha = cell(obj.dim, obj.dim);
 
-                        alpha_func = @(i,j) tuning*( d(i,j)* a_lambda*LAMBDA ...
-                                              + d(i,j)* a_mu_i*MU ...
-                                              + db(i,j)*a_mu_ij*MU );
+                        alpha_func = @(i,j) d(i,j)* a_lambda*LAMBDA ...
+                                            + d(i,j)* a_mu_i*MU ...
+                                            + db(i,j)*a_mu_ij*MU;
                         for i = 1:obj.dim
                             for l = 1:obj.dim
                                 alpha{i,l} = d(i,l)*alpha_func(i,j)*e;