function normE = load_opticsfem_normE(outFileDir)
%LOAD_OPTICSFEM_NORME  Read OutFile/normE (one scalar per vertex).
pathNorm = fullfile(outFileDir, 'normE');
assert(isfile(pathNorm), 'Missing file: %s', pathNorm);

lines = string(splitlines(fileread(pathNorm)));
lines = strip(lines);
lines = lines(strlength(lines) > 0);

normE = zeros(numel(lines), 1);
for k = 1:numel(lines)
    tok = lines(k);
    if startsWith(tok, "//")
        tok = extractAfter(tok, 2);
        tok = strip(tok);
    end
    normE(k) = sscanf(char(tok), '%f', 1);
end
end
