@@ -945,21 +945,21 @@ def available_display_types(self, report_category=None):
945945
946946 @pyaedt_function_handler ()
947947 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
949949 ):
950950 """Compute the list of all available report categories.
951951
952952 Parameters
953953 ----------
954954 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.
956956 display_type : str, optional
957957 Report Display Type.
958958 Default is `None` which will take first default type which is in most of the case "Rectangular Plot".
959959 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.
963963 is_siwave_dc : bool, optional
964964 Whether if the setup is Siwave DCIR or not. Default is ``False``.
965965
@@ -994,7 +994,14 @@ def available_quantities_categories(
994994 "SimValueContext:=" ,
995995 [37010 , 0 , 2 , 0 , False , False , - 1 , 1 , 0 , 1 , 1 , "" , 0 , 0 , "DCIRID" , False , id_ , "IDIID" , False , "1" ],
996996 ]
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 = ""
9981005 elif not context : # pragma: no cover
9991006 context = ""
10001007
@@ -1009,7 +1016,7 @@ def available_report_quantities(
10091016 display_type = None ,
10101017 solution = None ,
10111018 quantities_category = None ,
1012- context = "" ,
1019+ context = None ,
10131020 is_siwave_dc = False ,
10141021 ):
10151022 """Compute the list of all available report quantities of a given report quantity category.
@@ -1026,8 +1033,10 @@ def available_report_quantities(
10261033 quantities_category : str, optional
10271034 The category to which quantities belong. It has to be one of ``available_quantities_categories`` method.
10281035 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.
10311040 is_siwave_dc : bool, optional
10321041 Whether if the setup is Siwave DCIR or not. Default is ``False``.
10331042
@@ -1062,7 +1071,14 @@ def available_report_quantities(
10621071 "SimValueContext:=" ,
10631072 [37010 , 0 , 2 , 0 , False , False , - 1 , 1 , 0 , 1 , 1 , "" , 0 , 0 , "DCIRID" , False , id , "IDIID" , False , "1" ],
10641073 ]
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 = ""
10661082 elif not context :
10671083 context = ""
10681084 if not quantities_category :
0 commit comments