pmgbergen / porepy

Python Simulation Tool for Fractured and Deformable Porous Media

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get solution values function

IngridKJ opened this issue · comments

Getting variable values is easily done by using the method pp.get_variable_values(). If one wants to gather values that are not tied to a variable, the data dictionary needs to be approached "directly". I.e., something along the lines of:

data["parameter name"][pp.TIME_STEP_SOLUTION/pp.ITERATE_SOLUTION][index value]

needs to be written.

This issue is for making a get_solution_values function, analogous to the set_solution_values function, such that fetching values for non-variable quantities is easier. All instances of directly accessing the data dictionary for fetching values should be updated accordingly.

Where do you plan to implement such a method? I think nobody will miss writing the direct call into the data dictionary.

As of now it is put at the bottom of equation_system.py together with the set_solution_values function, but I am not sure if that is the best location for it. I discussed only briefly with @IvarStefansson that such a method could be created, not too deeply exactly where to put it. Suggestions?