Mercurial > repos > public > sbplib
changeset 1058:84933722ec0e feature/poroelastic
Remove superfluous method get_boundary_number in Elastic2dVariable
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Fri, 25 Jan 2019 16:35:53 -0800 |
parents | ff274c7404cc |
children | d8ab528f10f6 |
files | +scheme/Elastic2dVariable.m |
diffstat | 1 files changed, 2 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/+scheme/Elastic2dVariable.m Fri Jan 25 15:52:21 2019 -0800 +++ b/+scheme/Elastic2dVariable.m Fri Jan 25 16:35:53 2019 -0800 @@ -360,8 +360,6 @@ comp = obj.getComponent(comp, boundary); end - % j is the coordinate direction of the boundary - j = obj.get_boundary_number(boundary); e = obj.getBoundaryOperator('e', boundary); T = obj.getBoundaryOperator('T', boundary); tau = obj.getBoundaryOperator('tau', boundary); @@ -377,8 +375,9 @@ m_tot = obj.grid.N(); % Preallocate + [~, col] = size(tau{comp}); closure = sparse(dim*m_tot, dim*m_tot); - penalty = sparse(dim*m_tot, m_tot/obj.m(j)); + penalty = sparse(dim*m_tot, col); k = comp; switch type @@ -467,26 +466,6 @@ error('Non-conforming interfaces not implemented yet.'); end - % Returns the coordinate number and outward normal component for the boundary specified by the string boundary. - function [j, nj] = get_boundary_number(obj, boundary) - - switch boundary - case {'w','W','west','West', 'e', 'E', 'east', 'East'} - j = 1; - case {'s','S','south','South', 'n', 'N', 'north', 'North'} - j = 2; - otherwise - error('No such boundary: boundary = %s',boundary); - end - - switch boundary - case {'w','W','west','West','s','S','south','South'} - nj = -1; - case {'e', 'E', 'east', 'East','n', 'N', 'north', 'North'} - nj = 1; - end - end - % Returns the component number that is the tangential/normal component % at the specified boundary function comp = getComponent(obj, comp_str, boundary)