Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-microstructure-backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Klaus Böhnlein
dune-microstructure-backup
Commits
a1e6ce00
Commit
a1e6ce00
authored
3 years ago
by
Klaus Böhnlein
Browse files
Options
Downloads
Patches
Plain Diff
Add Option for absolute or relative Path
parent
2aa26626
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Matlab-Programs/Minimization.mlx
+0
-0
0 additions, 0 deletions
Matlab-Programs/Minimization.mlx
Matlab-Programs/Minimization_Script.m
+17
-4
17 additions, 4 deletions
Matlab-Programs/Minimization_Script.m
with
17 additions
and
4 deletions
Matlab-Programs/Minimization.mlx
+
0
−
0
View file @
a1e6ce00
No preview for this file type
This diff is collapsed.
Click to expand it.
Matlab-Programs/Minimization_Script.m
+
17
−
4
View file @
a1e6ce00
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment