Point Set Object

class pylagrit.PSet(name, parent)

Pset class

delete()
dump(filerootname, zonetype='zone')

Dump zone file of pset nodes :arg filerootname: rootname of files to create, pset name will be added to name :type filerootname: string :arg zonetype: Type of zone file to dump, ‘zone’ or ‘zonn’ :tpye zonetype: string

eltset(membership='inclusive', name=None)

Create eltset from pset

Parameters:
  • membership (str) – type of element membership, one of [inclusive,exclusive,face]
  • name (str) – Name of element set to be used within LaGriT
Returns:

PyLaGriT EltSet object

expand(membership='inclusive')

Add points surrounding pset to pset

Parameters:membership (str) – type of element membership, one of [inclusive,exclusive,face]
interpolate(method, attsink, cmosrc, attsrc, interp_function=None)

Interpolate values from attribute attsrc from mesh object cmosrc to current mesh object

interpolate_continuous(attsink, cmosrc, attsrc, interp_function=None, nearest=None)
interpolate_default(attsink, cmosrc, attsrc, tie_option='tiemax', flag_option='plus1', keep_option='delatt', interp_function=None)
interpolate_map(attsink, cmosrc, attsrc, tie_option='tiemax', flag_option='plus1', keep_option='delatt', interp_function=None)
interpolate_voronoi(attsink, cmosrc, attsrc, interp_function=None)
list(attname=None, stride=[1, 0, 0])
minmax(attname=None, stride=[1, 0, 0])
minmax_xyz(stride=[1, 0, 0], verbose=True)
perturb(xfactor, yfactor, zfactor)

This command moves node coordinates in the following manner.

Three pairs of random numbers between 0 and 1 are generated. These pairs refer to the x, y and z coordinates of the nodes respectively. The first random number of each pair is multiplied by the factor given in the command. The second random number is used to determine if the calculated offset is to be added or subtracted from the coordinate.

pset_attribute(attribute, value, comparison='eq', name=None)

Define PSet from another PSet by attribute

Parameters:
  • attribute (str) – Nodes defined by attribute ID.
  • value (integer) – attribute ID value.
  • comparison (can use default without specifiy anything, or list[lt|le|gt|ge|eq|ne]) – attribute comparison, default is eq.
  • name (str) – The name to be assigned to the PSet created.

Returns: PSet object

Usage: newpset = oldpset.pset_attribute(‘attribute’,’value’,’comparison’)

refine(refine_type='element', refine_option='constant', interpolation=' ', prange=[-1, 0, 0], field=' ', inclusive_flag='exclusive', prd_choice=None)
scale(scale_type='relative', scale_geom='xyz', scale_factor=[1, 1, 1], scale_center=[0, 0, 0])

Scale pset nodes by a relative or absolute amount :arg scale_type: Scaling type may be ‘relative’ or ‘absolute’ :type scale_type: string :arg scale_geom: May be one of the geometry types ‘xyz’ (Cartesian), ‘rtz’ (cylindrical), or ‘rtp’ (spherical) :type scale_geom: string :arg scale_factor: If scale_factor is relative, scaling factors are unitless multipliers. If absolute, scaling factors are constants added to existing coordinates. :type scale_factor: list :arg scale_center: Geometric center to scale from :type scale_center: list

setatt(attname, value)
smooth(*args, **kwargs)
trans(xold, xnew)

Translate points within a pset by the linear translation from (xold, yold, zold) to (xnew, ynew, znew)

Parameters:
  • xold (tuple) – Tuple containing point (xold, yold, zold) to translate from
  • xnew (tuple) – Tuple containing point (xnew, ynew, znew) to translate to
xlength
xmax
xmin
ylength
ymax
ymin
zlength
zmax
zmin