Top | ![]() |
![]() |
![]() |
![]() |
GObject ╰── ToolDbgObj ╰── VisuNodeValues ╰── VisuNodeValuesFarray ╰── VisuNodeValuesVector ╰── VisuVibration
Define a way to store vibration or phonons to a VisuData
object. One can store several phonons in one object, each phonon is
them represented by its id. The phonons can be animated on screen,
using a user defined frequency (visu_vibration_setUserFrequency)
and amplitue (visu_vibration_setAmplitude), by calling
visu_vibration_play()
.
Phonons are set with visu_vibration_setCharacteristic()
and
VisuNode displacements are set with visu_vibration_setDisplacements()
.
VisuVibration * visu_vibration_new (VisuData *data
,const gchar *label
,guint n
);
Creates a VisuVibration object to store n
vibration modes for data
.
Since: 3.8
gboolean visu_vibration_setDisplacements (VisuVibration *vib
,guint iph
,const GArray *vibes
,gboolean complex
);
visu_vibration_init() must have been call before. This routine is
used to define a set of displacement vectors, corresponding to one
phonon. The displacement vectors can be complex
, in that case
vibes
contains 6 values for each VisuNode.
vib |
a VisuVibration object. |
|
iph |
a phonon id. |
|
vibes |
a set of displacement vectors. |
[element-type float] |
complex |
a flag. |
Since: 3.5
gboolean visu_vibration_setCurrentMode (VisuVibration *vib
,guint iph
,GError **error
);
Set all node displacements to zero and setup the displacement
vector (u+iv) for each VisuNode. After this call,
visu_vibration_play()
will move the nodes according to their vibration.
Since: 3.5
gboolean visu_vibration_setCharacteristic (VisuVibration *vib
,guint iph
,const float q[3]
,float en
,float omega
);
This routine is used to define the characteristics of a given phonon.
vib |
a VisuVibration object. |
|
iph |
a phonon id. |
|
q |
a reciprocal vector. |
|
en |
the phonon energy. |
|
omega |
the phonon frequency. |
Since: 3.5
gboolean visu_vibration_getCharacteristic (const VisuVibration *vib
,guint iph
,float q[3]
,float *en
,float *omega
);
This routine is used to get the characteristics of a given
phonon, see visu_vibration_setCharacteristic()
to set them.
vib |
a VisuVibration object. |
|
iph |
a phonon id. |
|
q |
a location for the reciprocal vector. |
|
en |
a locattion for the phonon energy. |
|
omega |
a location for the phonon frequency. |
Since: 3.5
gboolean visu_vibration_setUserFrequency (VisuVibration *vib
,float freq
);
Change the frequency at which phonons are played with visu_vibration_play()
.
Since: 3.5
gboolean visu_vibration_setAmplitude (VisuVibration *vib
,float ampl
);
Change the amplitude at which phonon are displayed on screen when
using visu_vibration_play()
.
Since: 3.5
gboolean visu_vibration_setTime (VisuVibration *vib
,gfloat at
);
Defines the current time offset used to displace nodes according to phonon distortions.
Since: 3.8
void
visu_vibration_resetPosition (VisuVibration *vib
);
Reset the node position of the given VisuData.
Since: 3.5
void
visu_vibration_setZeroTime (VisuVibration *vib
);
Reset the position of phonons to use position at time equals zero (so applying just the q vector displacement).
Since: 3.5
guint
visu_vibration_getNPhonons (VisuVibration *vib
);
Retrieves the number of phonons in vib
.
Since: 3.5
void
visu_vibration_animate (VisuVibration *vib
);
Starts animating phonons.
Since: 3.8
VisuVibration * visu_data_getVibration (VisuData *dataObj
,guint nModes
);
Retrieves the VisuNodeValuesVector object used to store the
vibration data. If this object is not existing already, it is
created with nModes
modes.
Since: 3.8
struct VisuVibrationClass { VisuNodeValuesVectorClass parent; };
Common name to refer to a _VisuVibrationClass.
“amplitude”
property“amplitude” gfloat
oscilation amplitude.
Flags: Read / Write
Allowed values: >= 0
Default value: 1
“frequency”
property“frequency” gfloat
oscilation frequency.
Flags: Read / Write
Allowed values: [0,50]
Default value: 5
“n-modes”
property“n-modes” guint
number of modes.
Flags: Read / Write / Construct Only
Allowed values: [1,G_MAXINT]
Default value: 1
“reduced-time”
property“reduced-time” gfloat
time during an animation.
Flags: Read / Write
Allowed values: >= 0
Default value: 0