Pythonic Virtual Machine
i1Dlin Class Reference

Detailed Description

i1dlin.png
schema

This is the circuit that calculates the interpolation of the provided 1D force field. The force field must be in the following format, but plese note that the interpolation circuit is capable of taking any number of components in.

x F1

The force field must also use a constant step size for each dimenson, although the force field can be in any order.

  • Initialisation parameters:.
    • Components = Number of components of force in the force field.
    • step = step size for the force field.
    • pushed True|False = push the output buffer immediately if True.
    • pbc True|False = perodic boundray conditions.
  • Initialisation commands:
    • SetData(array) = arrays must be the set of forces you wish to interpolate over.
  • Input channels:
    • x : this is x the coordiante to calculate the interpolation.
  • Output channels:
    • Fn: The interpolated forces where n is the component for example F1 would be first first component.

Example:

1 inter = machine.AddCircuit(type='i1Dlin',name='inter', comp=2, step=0.1, pbc=True, pushed=True)
2 forces = [[math.sin(2*math.pi*x/20),math.cos(2*2*math.pi*x/20)] for x in range(20)]
3 inter.SetData(forces)

Inherits Circuit.

Additional Inherited Members

- Public Attributes inherited from Circuit
 name
 Name of the circuit. More...
 
 enabled
 if it is working... More...
 
 machine
 Reference to the virtual machine to which this circuit belongs. More...
 
 pushed
 Push output buffer at the end of Update. More...
 
 I
 Dictionary of input channels.
 
 O
 Dictionary of output channels.
 
 cCoreID
 index of circuit in cCore
 

Documentation for pyVAFM
Generated on Wed Feb 8 2017 10:13:49 for pyVAFM by doxygen 1.8.9.1