Commit 73bc0dff authored by Turnhout, M.C. van's avatar Turnhout, M.C. van
Browse files

move fortran check up & add centre option for FEMR

parent 8751a564
......@@ -4,6 +4,8 @@ labdef = TF_labconfig;
if nargin == 1, films = 1:labdef.nfilm; end
if nargin <= 2, frame = 0; end
TF_checkfortran;
for film = films
jobname = sprintf('%s_film%i', param.expname, film);
......@@ -190,7 +192,5 @@ for film = films
end
TF_checkfortran;
% part of TFlab: http://mategit.wfw.wtb.tue.nl/STEM/TFlab
end
function [R, l, ndist] = TF_getFEMR(param, film, frame)
function [R, l, ndist] = TF_getFEMR(param, film, frame, centre)
if nargin <= 2
jobname = sprintf('%s_film%i', param.expname, film);
else
jobname = sprintf('%s_film%i_frame%i', param.expname, film, frame);
end
if nargin == 4, cent = centre; else cent = 0; end
% get clean coordinates & and left/right edge node sets
if strcmpi(param.FEMbuild, 'matlab')
......@@ -36,6 +37,12 @@ end
% deformed coordinates
def = coord + disp;
if cent
% average coordinates, estimate film centre (twice) instead of edges
def(lebn, :) = (def(lebn, :) + def(rebn, :))/2;
def(rebn, :) = def(lebn, :);
end
% average projected (deformed) length of the two edges
l = mean([ max(def(lebn, 2)) max(def(rebn, 2)) ]);
......
......@@ -4,6 +4,8 @@ labdef = TF_labconfig;
if nargin == 1, films = 1:labdef.nfilm; end
if nargin <= 2, frame = 0; end
TF_checkfortran;
for film = films
jobname = sprintf('%s_film%i', param.expname, film);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment