Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions FLWTFEM.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
profile on
clc; clear;
%--------------------------------------------------------------------------
% FLWTFEM MATLAB SOLVER for FINITE ELEMENT ANALYSIS OF MULTILAYER PLATES
Expand All @@ -11,13 +10,13 @@
disp('READING INPUTFILE...')

% Add Paths
addpath([pwd '\materialClasses\']); addpath([pwd '\modelClasses\']);
addpath([pwd '\utilityFunctions\']); addpath([pwd '\postAlgorithms\']);
addpath(fullfile(pwd, 'materialClasses')); addpath(fullfile(pwd, 'modelClasses'));
addpath(fullfile(pwd, 'utilityFunctions')); addpath(fullfile(pwd, 'postAlgorithms'));

% Read GiD INPUT FILE
DIR = uigetdir; [~,NAME] = fileparts(DIR);
source = [DIR, '\', NAME,'.dat']; copyfile(source,pwd,'f');
FILENAME = [NAME,'.dat']; INPUTFILE = fileread(FILENAME);
[FILENAME, DIR] = uigetfile('*.*'); [~,NAME] = fileparts(FILENAME);
source = fullfile(DIR, [NAME,'.dat']); copyfile(source,pwd,'f');
FILENAME = [NAME,'.dat']; INPUTFILE = fileread(FILENAME);
eval(INPUTFILE);
clear source INPUTFILE
tic
Expand Down Expand Up @@ -278,11 +277,11 @@

%% CLOSE ALL
close all
movefile([pwd,'\', NAME, '.post.msh'], DIR, 'f');
movefile([pwd,'\', NAME, '.post.res'], DIR, 'f');
movefile([pwd,'\', NAME, '.dat'], DIR, 'f');
movefile(fullfile(pwd, [NAME, '.post.msh']), DIR, 'f');
movefile(fullfile(pwd, [NAME, '.post.res']), DIR, 'f');
movefile(fullfile(pwd, [NAME, '.dat']), DIR, 'f');

rmpath([pwd '\materialClasses\']); rmpath([pwd '\modelClasses\']);
rmpath([pwd '\utilityFunctions\']); rmpath([pwd '\postAlgorithms\']);
rmpath(fullfile(pwd, 'materialClasses')); rmpath(fullfile(pwd, 'modelClasses'));
rmpath(fullfile(pwd, 'utilityFunctions')); rmpath(fullfile(pwd, 'postAlgorithms'));

clear name DIR FILENAME; toc
6 changes: 3 additions & 3 deletions postAlgorithms/make_post_res.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ function make_post_res(filename, POSTNODES, POSTELEMENTS, ANALYSISTYPE, RECORDS)
fprintf(fid,'ComponentNames "X", "Y", "Z" \n');

fprintf(fid,'Values \n');
for node = 1:length(POSTNODES)
fprintf(fid,'%6i %12.5f %12.5f %12.5f \n', node, POSTNODES(node).DispX, POSTNODES(node).DispY, POSTNODES(node).DispZ);
end

fprintf(fid,'%6i %12.5f %12.5f %12.5f \n', [[1:size(POSTNODES, 2)]; POSTNODES.DispX; POSTNODES.DispY; POSTNODES.DispZ]);

fprintf(fid,'End Values \n');


Expand Down