@@ -945,21 +945,21 @@ def available_display_types(self, report_category=None):
945
945
946
946
@pyaedt_function_handler ()
947
947
def available_quantities_categories (
948
- self , report_category = None , display_type = None , solution = None , context = "" , is_siwave_dc = False
948
+ self , report_category = None , display_type = None , solution = None , context = None , is_siwave_dc = False
949
949
):
950
950
"""Compute the list of all available report categories.
951
951
952
952
Parameters
953
953
----------
954
954
report_category : str, optional
955
- Report Category. Default is `None` which will take first default category.
955
+ Report Category. Default is `` None` ` which will take first default category.
956
956
display_type : str, optional
957
957
Report Display Type.
958
958
Default is `None` which will take first default type which is in most of the case "Rectangular Plot".
959
959
solution : str, optional
960
- Report Setup. Default is `None` which will take first nominal_adaptive solution.
961
- context : str, optional
962
- Report Category. Default is `"" ` which will take first default context.
960
+ Report Setup. Default is `` None` ` which will take first nominal_adaptive solution.
961
+ context : str, dict, optional
962
+ Report Category. Default is ``None` ` which will take first default context.
963
963
is_siwave_dc : bool, optional
964
964
Whether if the setup is Siwave DCIR or not. Default is ``False``.
965
965
@@ -994,7 +994,14 @@ def available_quantities_categories(
994
994
"SimValueContext:=" ,
995
995
[37010 , 0 , 2 , 0 , False , False , - 1 , 1 , 0 , 1 , 1 , "" , 0 , 0 , "DCIRID" , False , id_ , "IDIID" , False , "1" ],
996
996
]
997
-
997
+ elif self ._app .design_type == "Maxwell 2D" and self ._app .solution_type == "EddyCurrent" :
998
+ if isinstance (context , dict ):
999
+ for k , v in context .items ():
1000
+ context = ["Context:=" , k , "Matrix:=" , v ]
1001
+ elif context and isinstance (context , str ):
1002
+ context = ["Context:=" , context ]
1003
+ elif not context :
1004
+ context = ""
998
1005
elif not context : # pragma: no cover
999
1006
context = ""
1000
1007
@@ -1009,7 +1016,7 @@ def available_report_quantities(
1009
1016
display_type = None ,
1010
1017
solution = None ,
1011
1018
quantities_category = None ,
1012
- context = "" ,
1019
+ context = None ,
1013
1020
is_siwave_dc = False ,
1014
1021
):
1015
1022
"""Compute the list of all available report quantities of a given report quantity category.
@@ -1026,8 +1033,10 @@ def available_report_quantities(
1026
1033
quantities_category : str, optional
1027
1034
The category to which quantities belong. It has to be one of ``available_quantities_categories`` method.
1028
1035
Default is ``None`` which will take first default quantity.".
1029
- context : str, optional
1030
- Report Context. Default is ``""`` which will take first default context.
1036
+ context : str, dict, optional
1037
+ Report Context. Default is ``None`` which will take first default context.
1038
+ For Maxwell 2D Eddy Current solution types this can be provided as a dictionary
1039
+ where the key is the matrix name and value the reduced matrix.
1031
1040
is_siwave_dc : bool, optional
1032
1041
Whether if the setup is Siwave DCIR or not. Default is ``False``.
1033
1042
@@ -1062,7 +1071,14 @@ def available_report_quantities(
1062
1071
"SimValueContext:=" ,
1063
1072
[37010 , 0 , 2 , 0 , False , False , - 1 , 1 , 0 , 1 , 1 , "" , 0 , 0 , "DCIRID" , False , id , "IDIID" , False , "1" ],
1064
1073
]
1065
-
1074
+ elif self ._app .design_type == "Maxwell 2D" and self ._app .solution_type == "EddyCurrent" :
1075
+ if isinstance (context , dict ):
1076
+ for k , v in context .items ():
1077
+ context = ["Context:=" , k , "Matrix:=" , v ]
1078
+ elif context and isinstance (context , str ):
1079
+ context = ["Context:=" , context ]
1080
+ elif not context :
1081
+ context = ""
1066
1082
elif not context :
1067
1083
context = ""
1068
1084
if not quantities_category :
0 commit comments