In order to be able to use this module import it like this:
import mpacts.io.vtu_read #or assign it to a shorter name import mpacts.io.vtu_read as vtu
State object to access the contents of a DEMeter .vtu file(s). Can be used as an iterator (iterating over all saved time-steps) and with direct access ‘’ operator to access a specific time/time-step.
The ‘get’ member is used to return a specific array from the .vtu file.
VtuState(name, parent, **kwargs)¶
get(pcName, arrayName, array=None, nrp=None)¶
returns the saved array with specified arrayName in particle container pcName as a numpy-array. Params:pcName particle container name - if you want a contained pc, specify the ‘.’ here! arrayName name of array to get array numpy array to be over-written with the contents of the array we’re about to get (ad lib) nrp number of particles in the container we want to get (ad lib)
sets the step of current state - used by self.next and self.__getitem__... Params:step an integer for the wanted saved step