Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCDDS-core
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor 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
SPC
SCDDS
SCDDS-core
Commits
7bb0c7c1
Commit
7bb0c7c1
authored
5 years ago
by
Federico Felici
Browse files
Options
Downloads
Patches
Plain Diff
Add ordering of parameters for mdsserver - mdstree
parent
e5f5acc9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
code/classes/SCDclass_mdsobjcontainer.m
+31
-18
31 additions, 18 deletions
code/classes/SCDclass_mdsobjcontainer.m
code/classes/SCDclass_mdspar.m
+10
-1
10 additions, 1 deletion
code/classes/SCDclass_mdspar.m
with
41 additions
and
19 deletions
code/classes/SCDclass_mdsobjcontainer.m
+
31
−
18
View file @
7bb0c7c1
...
...
@@ -243,28 +243,42 @@ classdef SCDclass_mdsobjcontainer
end
function
printMARTe2parconfig
(
obj
,
shot
)
for
ii
=
1
:
obj
.
numparams
if
(
strcmp
(
obj
.
modeltogenerate
,
'all'
))
function
printMARTe2parconfig
(
obj
,
shot
)
switch
obj
.
modeltogenerate
case
'all'
iorder
=
getParamsServerTreeOrder
(
obj
);
% order entries following mdsserver, mdstree order
for
ii
=
1
:
obj
.
numparams
jj
=
iorder
(
ii
);
str
=
obj
.
mdsparams
(
jj
)
.
genMARTe2entry
(
shot
);
fprintf
(
" %s\n"
,
str
);
end
otherwise
for
ii
=
1
:
obj
.
numparams
if
(
strcmp
(
obj
.
modeltogenerate
,
obj
.
mdsparams
(
ii
)
.
getmodelname
))
str
=
obj
.
mdsparams
(
ii
)
.
genMARTe2entry
(
shot
);
fprintf
(
" %s\n"
,
str
);
else
if
(
strcmp
(
obj
.
modeltogenerate
,
obj
.
mdsparams
(
ii
)
.
getmodelname
))
str
=
obj
.
mdsparams
(
ii
)
.
genMARTe2entry
(
shot
);
fprintf
(
" %s\n"
,
str
);
end
end
end
end
end
end
end
function
printMARTe2wgconfig
(
obj
,
shot
)
for
ii
=
1
:
obj
.
numwavegens
if
(
strcmp
(
obj
.
modeltogenerate
,
'all'
))
str
=
obj
.
mdswavegens
(
ii
)
.
genMARTe2entry
(
shot
);
fprintf
(
" %s\n"
,
str
);
function
iorder
=
getParamsServerTreeOrder
(
obj
)
% find server-tree order of parameters
mdsservertree
=
cell
(
numel
(
obj
.
mdsparams
),
2
);
for
ii
=
1
:
numel
(
obj
.
mdsparams
)
mdsservertree
{
ii
,
1
}
=
obj
.
mdsparams
(
ii
)
.
getMDSserver
;
mdsservertree
{
ii
,
2
}
=
obj
.
mdsparams
(
ii
)
.
getMDStree
;
end
[
~
,
iorder
]
=
sortrows
(
mdsservertree
);
end
function
printMARTe2wgconfig
(
obj
,
shot
)
for
ii
=
1
:
obj
.
numwavegens
if
(
strcmp
(
obj
.
modeltogenerate
,
'all'
))
str
=
obj
.
mdswavegens
(
ii
)
.
genMARTe2entry
(
shot
);
fprintf
(
" %s\n"
,
str
);
else
if
(
strcmp
(
obj
.
modeltogenerate
,
obj
.
mdswavegens
(
ii
)
.
getmodelname
))
str
=
obj
.
mdswavegens
(
ii
)
.
genMARTe2entry
(
shot
);
...
...
@@ -277,4 +291,3 @@ classdef SCDclass_mdsobjcontainer
end
end
This diff is collapsed.
Click to expand it.
code/classes/SCDclass_mdspar.m
+
10
−
1
View file @
7bb0c7c1
...
...
@@ -149,6 +149,14 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
out
=
obj
.
modelparam
;
end
function
[
mdsserver
]
=
getMDSserver
(
obj
)
mdsserver
=
obj
.
mdsserver
;
end
function
[
mdstree
]
=
getMDStree
(
obj
)
mdstree
=
obj
.
mdstree
;
end
function
obj
=
setparamstructure
(
obj
,
structname
)
%obj.modelparam = [structname '.' obj.modelparam];
if
(
isempty
(
obj
.
modeltpstruct
))
...
...
@@ -175,7 +183,8 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
%[obj,~]=obj.getdata(shot);
obj
=
obj
.
actualizetdiexpr
(
shot
);
%entrystring = ['+' obj.modeltargetpar ' = { Class=' obj.classname ' Path=' obj.tdiexprused ' }'];
entrystring
=
[
'+'
obj
.
modeltargetpar
' = { Class='
obj
.
classname
' Path='
obj
.
tdiexprused
];
% entrystring = ['+' obj.modeltargetpar ' = { Class=' obj.classname ' Path=' obj.tdiexprused ' Server=' obj.mdsserver, ' Tree=' obj.mdstree];
entrystring
=
sprintf
(
'+%-25s = { Class=%-30s Path=%-35s Server=%-25s Tree=%-25s'
,
obj
.
modeltargetpar
,
obj
.
classname
,
obj
.
tdiexprused
,
obj
.
mdsserver
,
obj
.
mdstree
);
end
end
...
...
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