data

class czmtestkit.py_modules.data

Bases: object

Read and store a matrix written to Abaqus/CAE .msg files.

Attributes

data.type (str): Keyword in the first line to be excluded when reading the data between specified line numbers. Ideally, this should indicate the vairable name of the matrix/array printed to the .msg file.

data.start (int): Line number corresponding to the first line contating the matrix data in the .msg file.

data.stop (int): Line number corresponding to the last line contating the matrix data in the .msg file. self.start = self.stop if the matrix/array is printed on a single line.

data.shape (tuple): Shape of the matrix [optional].

shape[0] (int): number of rows.

shape[1] (int): number of columns.

data.value (list): Elements of the matrix read from the .msg file.

Methods Summary

findValue(fileName)

Method to find the matrix/array between specified line numbers in the filename.msg file. (See data class for an example.)

Methods Documentation

findValue(fileName)

Method to find the matrix/array between specified line numbers in the filename.msg file. (See data class for an example.)

Parameters

fileName (str): path to the .msg file including the file name and extension.

Note

Output from the function is unstructured and has to be reshaped based on the requirements or the data.shape attribute.

Warning

data attributes data.type, data.start, and data.stop must be defined to execute the data.findValue() method.