v_sim.Box¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
Boundary conditions |
||
r/w |
Expanion on all axis |
||
r/w |
hidding scheme used by the box. |
||
r/w |
Units of dimensions |
||
r/w |
Expanion is active or not |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Gets emitted when the box size is changed (because of box duplication for instance). |
|
Gets emitted when the units are changed. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
||
priv |
r |
Class Details¶
- class v_sim.Box(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Opaque structure to stores
v_sim.Boxobject.- classmethod new(geometry, bc)¶
- Parameters:
geometry ([
float]) – a cell definition.bc (
v_sim.BoxBoundaries) – a boundary condition.
- Returns:
create a new
v_sim.Boxobject.- Return type:
A
v_sim.Boxobject store the definition of a cell.New in version 3.7.
- classmethod new_full(full, bc)¶
- Parameters:
full ([
float]) – a cell definition (full matrix).bc (
v_sim.BoxBoundaries) – a boundary condition.
- Returns:
create a new
v_sim.Boxobject.- Return type:
A
v_sim.Boxobject stores the definition of a cell. This may fail, if full does not define a 3D basis set (the three vectors are not linearly independant). To check this, usev_sim.Box.getGeometry() to test if the first vector isGObject.G_MAXFLOAT.New in version 3.7.
- constrainInside(translat, xyz, withExt)¶
- Parameters:
- Returns:
Trueif translat is not (0;0;0).- Return type:
Given the box defintion self and the initial xyz cartesian coordinates, it returns the translation translat to be applied to xyz to move the node into the box.
New in version 3.7.
- convertFullToCell(full)¶
-
Convert given cartesian coordinates of a full matrix definition (see
v_sim.Box.setGeometryFull()) to cartesian coordinates in the cell definition used by V_Sim. It corresponds to two applied rotations.New in version 3.7.
- convertReducedToXYZ(red)¶
- Parameters:
red ([
float]) – floating point values that describes the cartesian coordinates.- Returns:
- x:
the x coordinate.
- y:
the y coordinate.
- z:
the z coordinate.
- Return type:
Use this method to transform box coordinates into cartesian.
New in version 3.7.
- convertXYZToReduced(xyz)¶
- Parameters:
xyz ([
float]) – floating point values that describes the cartesian coordinates.- Returns:
- u:
the x coordinate.
- v:
the y coordinate.
- w:
the z coordinate.
- Return type:
Use this method to transform cartesian into box coordinates.
New in version 3.7.
- getBoundary()¶
- Returns:
a
v_sim.BoxBoundariesflag.- Return type:
Get the boundary conditions defined for self.
New in version 3.7.
- getCellMatrixv()¶
- Returns:
- m11:
an area to store the matrix.
- m12:
an area to store the matrix.
- m13:
an area to store the matrix.
- m21:
an area to store the matrix.
- m22:
an area to store the matrix.
- m23:
an area to store the matrix.
- m31:
an area to store the matrix.
- m32:
an area to store the matrix.
- m33:
an area to store the matrix.
- Return type:
(m11:
float, m12:float, m13:float, m21:float, m22:float, m23:float, m31:float, m32:float, m33:float)
This method is a binding method for visu_box_getCellMatrix().
New in version 3.7.
- getCentre()¶
- Returns:
coordinates of the centre.
- Return type:
centre: [
float]
centre contains on output the cartesian coordinates of the centre of the bounding box.
New in version 3.7.
- getExtension()¶
- Returns:
an allocated array to store the values.
- Return type:
extension: [
float]
Using
v_sim.Box.setExtension(), it is possible to duplicate the primitive box in each directions. Use this method to know the current extension. Returned values are positive floating point values. An extension of 0. means that only the primitive box exists, while a value of one means a duplication of one box in each direction of the coordinate.New in version 3.7.
- getExtensionActive()¶
-
Retrieve if extensions are applied or not.
New in version 3.8.
- getGeometry(vector)¶
- Parameters:
vector (
v_sim.BoxVector) – an int corresponding to a vector of the box.- Returns:
the value of the required vector (always a positive value for vector = 0, 2 or 5 !), or
GObject.G_MAXFLOATif the box has not been initialised.- Return type:
Retrieve the value of a vector defining the bounding box. The vector is chosen with an int, see the
v_sim.BoxVectorenum for more details.New in version 3.7.
- getGlobalSize(withExt)¶
- Parameters:
withExt (
bool) – a boolean.- Returns:
GObject.G_MAXFLOATon failure, otherwise a length for the biggest diagonal distance of the box, with or without extension.- Return type:
The box has a whole size that contains it (including margin, see
v_sim.Box.setMargin()), this size can be retrieve taking into account the extension of the box, or not.New in version 3.7.
- getHiddingStatus()¶
- Returns:
the current masking status.
- Return type:
Retrieves the masking status of self.
New in version 3.8.
- getInside(vect, ratio)¶
- Parameters:
- Returns:
Trueif vect is actually changed.- vect:
some cartesian coordinates.
- Return type:
Update vect, taking into consideration the particular periodicity of self, for vect expressed in reduced coordinates to be within [-ratio;ratio].
New in version 3.8.
- getPeriodicArray(array, nEle)¶
-
Used for bindings.
New in version 3.7.
- getPeriodicVector(vect)¶
- Parameters:
vect ([
float]) – a vector.- Returns:
- x:
the new x part.
- y:
the new y part.
- z:
the new z part.
- Return type:
Equivalent of
v_sim.Box.getPeriodicVector() used for bindings.New in version 3.7.
- getPeriodicity()¶
- Returns:
a location to store three periodicties.
- Return type:
per: [
bool]
Get for each {x, y, z} directions if the self is periodic.
New in version 3.7.
- getUnit()¶
- Returns:
the
v_sim.Unitsof self orv_sim.Units.UNDEFINED.- Return type:
The lengths of self may be given in a certain unit using
v_sim.Box.setUnit().New in version 3.7.
- getVertices(withExtension)¶
- Parameters:
withExtension (
bool) – a boolean.- Returns:
the position of the eight vertices of the bounding box.
- Return type:
All nodes are rendered inside a bounding box, this method can be used to retrieve it. This box is not the drawn box but the box containing all the nodes, included possible extension. To get the box itself, use visu_box_getCellMatrix() instead. One can also get the vertices of the box itself using
Falseas withExtension argument.
- getVolume()¶
- Returns:
the box volume.
- Return type:
Compute the volume of the box.
New in version 3.8.
- setBoundary(bc)¶
- Parameters:
bc (
v_sim.BoxBoundaries) – a boundary condition.- Returns:
Trueif the boundary conditions of self are changed.- Return type:
Set up the boundary conditions of self.
New in version 3.7.
- setExtension(extension)¶
- Parameters:
extension ([
float]) – an allocated array to store the values.- Returns:
Trueif the extension of box is actually changed.- Return type:
Change the duplication of the box in the three directions.
New in version 3.7.
- setExtensionActive(status)¶
-
Change if extension values are used not not.
New in version 3.8.
- setGeometry(geometry)¶
- Parameters:
geometry ([
float]) – a 6 floating point array ;- Returns:
Trueif the geometry is indeed changed.- Return type:
This methods set the size of the box.
New in version 3.7.
- setGeometryFull(full)¶
- Parameters:
full (
float) – a matrix defining a basis-set.- Returns:
Trueif the geometry is valid and changed.- Return type:
As
v_sim.Box.setGeometry(), but using a full matrix.New in version 3.7.
- setHiddingStatus(status)¶
- Parameters:
status (
v_sim.BoxHiddingStatus) – a status.- Returns:
Trueif the status is actually changed.- Return type:
Changes the masking status of self for status.
New in version 3.8.
- setMargin(margin, emit)¶
- Parameters:
margin (
float) – a float value.emit (
bool) –Trueto emitv_sim.Box::SizeChangedsignal.
- Returns:
Trueif the margin is actually changed.- Return type:
This routine add some margin to defined the OpenGL rendering zone of self.
New in version 3.7.
- setOrigin(orig)¶
-
Change the origin of self.
New in version 3.8.
- setUnit(unit)¶
- Parameters:
unit (
v_sim.Units) – av_sim.Unitsflag.- Returns:
Trueif the unit has been changed.- Return type:
The lengths of self may be given in a certain unit by calling this routine. If the unit is different from the previously defined, the coordinate are scaled accordingly.
New in version 3.7.
Signal Details¶
- v_sim.Box.signals.SizeChanged(box, extens)¶
- Signal Name:
SizeChanged- Flags:
- Parameters:
Gets emitted when the box size is changed (because of box duplication for instance).
New in version 3.7.
Property Details¶
- v_sim.Box.props.boundary¶
-
Boundary conditions
- v_sim.Box.props.expansion¶
-
Expanion on all axis
- v_sim.Box.props.hidding_scheme¶
-
hidding scheme used by the box.
- v_sim.Box.props.units¶
-
Units of dimensions