Bases: object
Creates a new Clone. A clone is copy of a module. The clone can be rotated and shifted with respect to its original module.
Parameters: |
---|
Description of the clone.
Index of the module from which the clone is created. The index must be greater or equal to 1.
Rotation of the clone. The rotation is defined by a Rotation. If the attribute is deleted, no rotation is performed.
Shift/translation of the clone. The shift is defined by a Shift. If the attribute is deleted, no shift is performed.
Returns the lines of this class to create a GEO file.
Returns a XML representation of this class.
Bases: penelopetools.api.input.penelope.option.Option
Creates a new Geometry. The geometry stores all options to create a geometry file (.GEO) readable by PENEGEOM as well as the input line for the IN file.
Parameters: |
---|
Filename of the geometry.
Creates a Geometry from lines of a IN file.
Parameters: | lines – lines |
---|
Title of the geometry. The title must have less than 61 charaters.
Returns the lines of this option to create a GEO file.
Returns a HTML representation of this option.
Returns the lines of this option to create a IN file.
Returns a XML representation of this option.
Bases: object
Creates a new Module. A module is a regroupment of surfaces and modules creating a region in space with the same material.
Parameters: |
|
---|
Description of the module.
Creates a Module from a XML element.
Parameters: | element – XML element |
---|
Id of the material associated with the module. The id must be greater or equal to zero.
List of indexes forming the boundaries of the module. If the attribute is deleted, the list of module indexes is emptied.
Rotation of the surface. The rotation is defined by a Rotation. If the attribute is deleted, no rotation is performed.
Shift/translation of the surface. The shift is defined by a Shift. If the attribute is deleted, no shift is performed.
List of SurfacePointer forming the boundaries of the module. If the attribute is deleted, the list of surface pointers is emptied.
Returns the lines of this class to create a GEO file.
Returns a XML representation of this class.
Validates the module. Checks that a surface has only one surface pointer and that a module is only present once in the module indexes.
Bases: dict
Store the modules/clones of a geometry. Clones are considered as modules
A unique index is created for every module. The first index is equal to 1. The index corresponds to the identifier of modules in PENGEOM.
Adds a new module or clone. If index is not given, a new index is generated automatically. If a index of an existing module/clone is given, the later is overwritten.
Returns: | return the index of the newly created module |
---|---|
Return type: | int |
Creates a Modules from a XML element.
Parameters: | element – XML element |
---|
Returns the lines of this class to create a GEO file.
Returns a XML representation of this class.
Bases: object
Creates a new Rotation. This class is used to specify the rotation of Surface and Module.
Parameters: |
|
---|
Creates a Rotation from a XML element.
Parameters: | element – XML element |
---|
Rotation around the z-axis (deg). The value must be between 0 and 360 deg. The value is stored in a magnitude.Magnitude.
Rotation around the new z-axis (deg). The new z-axis refer to the axis after the omega and theta rotation were applied on the original coordinate system. The value must be between 0 and 360 deg. The value is stored in a magnitude.Magnitude.
Returns the lines of this class to create a GEO file.
Returns a HTML representation of this option.
Returns a XML representation of this class.
Bases: object
Creates a new Scale. This class is used to specify the scaling of a Surface.
Parameters: |
|
---|
Returns the lines of this class to create a GEO file.
Returns a HTML representation of this option.
Returns a XML representation of this class.
Scaling along the x direction (cm). The value cannot be 0. The value is stored in a magnitude.Magnitude.
Scaling along the y direction (cm). The value cannot be 0. The value is stored in a magnitude.Magnitude.
Scaling along the z direction (cm). The value cannot be 0. The value is stored in a magnitude.Magnitude.
Bases: object
Creates a new Shift. This class is used to specify the translation in space of Surface and Module.
Parameters: |
|
---|
Returns the lines of this class to create a GEO file.
Returns a HTML representation of this option.
Returns a XML representation of this class.
Translation along the x direction (cm). The value is stored in a magnitude.Magnitude.
Translation along the y direction (cm). The value is stored in a magnitude.Magnitude.
Translation along the z direction (cm). The value is stored in a magnitude.Magnitude.
Bases: object
Creates a new Surface.
Parameters: |
|
---|
Coefficients for the implicit form of the quadratic equation. The coefficients will only be used if the indices are all equal to zero. The coefficients are defined by a dictionary, a list or a tuple. See examples below. If the attribute is deleted, the coefficients are all set to zero.
Examples:
>>> s = Surface()
>>> s.coefficients = {'xx': 0.0, 'xy': 0.0, 'xz': 0.0, 'yy': 0.0, 'yz': 0.0, 'zz': 0.0, 'x': 0.0, 'y': 0.0, 'z': 0.0, '0': 0.0}
>>> s.coefficients = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
>>> s.coefficients = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
>>> s.coefficients = {'xx': 1.0, 'xy': 1.0}
Description of the surface.
Creates a Surface from a XML element.
Parameters: | element – XML element |
---|
Indices for the explicit form of the quadratic equation. The indices are defined by a tuple containing 5 indices (-1, 0 or 1). If the attribute is deleted, all the indices are set to 0.
Return whether the implicit form of the quadratic equation is used. The implicit form implies that all the indices are equal to 0.
Rotation of the surface. The rotation is defined by a Rotation. If the attribute is deleted, no rotation is performed.
Scaling of the surface. The scaling is defined by a Scale. If the attribute is deleted, no scaling is performed.
Shift/translation of the surface. The shift is defined by a Shift. If the attribute is deleted, no shift is performed.
Returns the lines of this class to create a GEO file.
Returns a XML representation of this class.
Bases: object
Creates a new SurfacePointer to be used in Module
Parameters: |
|
---|
Creates a SurfacePointer from a XML element.
Parameters: | element – XML element |
---|
Side pointer indicates if the positive or negative side of the surface is taken to create the module. The value can either be SIDEPOINTER_POSITIVE or SIDEPOINTER_NEGATIVE.
Index of the surface. The index must be greater or equal to zero.
Returns the lines of this class to create a GEO file.
Returns a XML representation of this class.
Bases: dict
Stores the surfaces of a geometry.
A unique index is created for every surface. The index corresponds to the identifier of surfaces in PENGEOM.
Adds a new Surface to the list. If index is not given, a new index is generated automatically. If a index of an existing surface is given, the later is overwritten.
Returns: | return the index of the newly created surface |
---|---|
Return type: | int |
Creates a Surfaces from a XML element.
Parameters: | element – XML element |
---|
Not implemted.
Returns the lines of this class to create a GEO file.
Returns a XML representation of this class.
Not implemted.
Returns a surface for a cylinder along axis with radius
Parameters: |
|
---|---|
Return type: |
Returns a surface for a sphere or radius
Parameters: | radius – radius of the cylinder (in cm) |
---|---|
Return type: | Surface |
Returns a surface for a plane X=x
Parameters: | z – intercept on the x-axis (in cm) |
---|---|
Return type: | Surface |