amep.base.BaseField#
- class amep.base.BaseField(reader: BaseReader, index: int)#
Bases:
object
Continuum field data at one time step (one frame).
- __init__(reader: BaseReader, index: int)#
Methods
__init__
(reader, index)data
(*args[, returnkeys])The field values at each gridpoint, as a array of the values at each point.
Attributes
Box boundaries of the simulation.
Center of the simulation box.
Spatial dimension of the simnulation.
Coordinates of the grid points.
Returns a list of all available data keys.
Time step of the frame.
The physical time of the frame.
Returns the volume (for self.__dim=3) / area (for self.__dim=2) of the simulation box.
- property box: ndarray#
Box boundaries of the simulation. :returns: boxe – Box boundaries [[<lower bounds>],[<upper bounds>]] :rtype: np.ndarray
- property center: ndarray#
Center of the simulation box.
- Returns:
x – Center of the simulation box.
- Return type:
np.ndarray
- data(*args, returnkeys=False)#
The field values at each gridpoint, as a array of the values at each point.
- Parameters:
*args (str) – Keys of the data to be returned.
returnkeys (bool, optional) – If True, the keys are returned. The default is False.
- Returns:
The field values at each grid point
- Return type:
np.ndarray
- property dim: int#
Spatial dimension of the simnulation.
- Returns:
x – Spatial dimension.
- Return type:
int
- property grid#
Coordinates of the grid points.
- Parameters:
None. –
- Returns:
Meshgrid of positions of grid points.
- Return type:
np.ndarray
- property keys#
Returns a list of all available data keys.
- Returns:
datakeys – List of str containing all available data keys.
- Return type:
list
- property step: int#
Time step of the frame.
- Returns:
Time step of the frames.
- Return type:
float
- property time: float#
The physical time of the frame.
- property volume: float#
Returns the volume (for self.__dim=3) / area (for self.__dim=2) of the simulation box.
- Returns:
res – Volume or Area of the simulation.
- Return type:
float