2Module with the parent abstract class DataManagement. \n
6from abc
import ABC, abstractmethod
13 Abstract parent class for data management.
14 Using the associated MATLAB
class \n
16 for the postprocessing
in MATLAB, allowing
for simpler
and more reliable data management because the parameters
17 from the OpenSeesPy analysis are imported automatically.
22 Function that lists in the command window
and saves
in a opened file text
"f" the data
from the
"self" class that calls it.
23 Example: call this function after this line: \n
24 with open(FileName,
'w')
as f:
26 @param f (io.TextIOWrapper): Opened file to write into
28 @exception WrongDimension: The number of lists
in the list self.data needs to be 2
30 if len(self.data[0]) != 2:
raise WrongDimension()
32 delimiter =
"##############################"
34 for data_line
in self.data:
37 if type(col) == np.ndarray:
38 tmp_str = np.array_str(col, max_line_width = np.inf)
42 f.write(col_delimiter)
44 f.write(
'NEW INFO SECTION DELIMITER \t')
50 Abstract method that shows the data stored in the
class in the command window.
51 In some cases, it
's possible to plot some information (for example the curve of the material model).
58 Abstract method that computes the value of the parameters with respect of the arguments. \n
59 Use after changing the value of argument inside the
class (to update the values accordingly). \n
60 This function can be very useful
in combination
with the function
"deepcopy()" from the module
"copy". \n
61 Be careful that the parameter self.Initialized
is also copied, thus it
is safer to copy the
class before the method that calls the actual OpenSees commands (and initialise the object).
68 Abstract method used to define and update the self.data member variable. \n
69 This member variable (self.data)
is a list of lists
with 2 entries (info_name
and info_value)
70 and for each list
is stored a different member variable of the
class. \n
71 Useful to debug the model, export data, copy object.
Abstract parent class for data management.
def SaveData(self, f)
Function that lists in the command window and saves in a opened file text "f" the data from the "self...
def ShowInfo(self)
Abstract method that shows the data stored in the class in the command window.
def UpdateStoredData(self)
Abstract method used to define and update the self.data member variable.
def ReInit(self)
Abstract method that computes the value of the parameters with respect of the arguments.