Skip to content
Snippets Groups Projects
Commit a1e6ce00 authored by Klaus Böhnlein's avatar Klaus Böhnlein
Browse files

Add Option for absolute or relative Path

parent 2aa26626
Branches
No related tags found
No related merge requests found
No preview for this file type
......@@ -21,18 +21,31 @@ v = [v1; v2];
%should be sqrt(2) instead of 2
fprintf('Functions to be minimized')
fprintf('Functions to be minimized \n')
f_plus(v1,v2,q1,q2,q3,b1,b2,b3) = q1*v1^4 + q2*v2^4+2*q3*v1^2*v2^2-2*(q1*b1*v1^2+ q2*b2*v2^2+sqrt(2)*q3*b3*v1*v2);
f_minus(v1,v2,q1,q2,q3,b1,b2,b3) = q1*v1^4 + q2*v2^4+2*q3*v1^2*v2^2+2*(q1*b1*v1^2+ q2*b2*v2^2+sqrt(2)*q3*b3*v1*v2);
% ---- Fix parameters
absPath = "/home/klaus/Desktop/DUNE/dune-microstructure/outputs";
% 1. Import effective quantities from CellSolver-Code:
Qmat = spconvert(load('QMatrix.txt'));
Qmat = full(Qmat)
%read as sparse Matrix...
try %absolutePath
Qmat = spconvert(load(absPath + '' + "/QMatrix.txt"));
Bmat = spconvert(load(absPath + '' + "/BMatrix.txt"));
fprintf('Use absolute Path')
catch ME % use relativePath
Qmat = spconvert(load('../outputs/QMatrix.txt'));
Bmat = spconvert(load('../outputs/BMatrix.txt'));
fprintf('Use relative Path')
end
Qmat = spconvert(load('../outputs/QMatrix.txt'));
Bmat = spconvert(load('../outputs/BMatrix.txt'));
Bmat = spconvert(load('BMatrix.txt'));
%convert to full matrix...
Qmat = full(Qmat)
Bmat = full(Bmat)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment