MCPcopy Create free account
hub / github.com/KratosMultiphysics/Kratos / values

Method values

kratos/python_interface/python_registry.py:93–115  ·  view source on GitHub ↗
(self, Name)

Source from the content-addressed store, hash-verified

91 return py_keys, cpp_keys
92
93 def values(self, Name):
94 # Check if Name registry level is registered and if it is a value
95 if self.HasItem(Name):
96 if not self.HasItems(Name):
97 err_mgs = f"Asking for the values of '{Name}'. '{Name}' item has no subitems."
98 raise Exception(err_mgs)
99 else:
100 err_msg = f"Asking for the values of '{Name}' non-registered item."
101 raise Exception(err_msg)
102
103 # Get the c++ registry item values
104 cpp_values = None
105 if self.HasItems(Name, RegistryContext.CPP):
106 cpp_values = self.__GetCppItem(Name).values()
107 # Get the Python registry item values
108 # Note that this is a view object of the Python dictionary values
109 py_values = None
110 if self.HasItems(Name, RegistryContext.PYTHON):
111 py_values = self.__GetPythonItem(Name).values()
112
113 # Return the c++ and Python registry values in a tuple
114 # Note that we return None if the item was not present in one of the registries
115 return py_values, cpp_values
116
117 def items(self, Name):
118 # Check if Name registry level is registered and if it is a value

Callers 15

itemsMethod · 0.95
reportGradientMethod · 0.80
__init__Method · 0.80
InitializeDampingMethod · 0.80
__init__Method · 0.80
__analyzeShapeMethod · 0.80

Calls 4

HasItemMethod · 0.95
HasItemsMethod · 0.95
__GetCppItemMethod · 0.95
__GetPythonItemMethod · 0.95

Tested by 15

FinalizeSolutionStepMethod · 0.64
FinalizeMethod · 0.64
FinalizeMethod · 0.64
get_structural_stagesMethod · 0.64
test_cube_with_groupsMethod · 0.64
mp_check_fctMethod · 0.64
test_UpdateMethod · 0.64
test_nodal_massMethod · 0.64