# esys.speckley Package

A domain meshed with uniform rectangles or quadrilaterals

## Classes

- `AbstractAssembler`

- `SpeckleyBrick`

- `SpeckleyDomain`

- `SpeckleyRectangle`

class esys.speckley.AbstractAssembler
  __init__()

    Raises an exception This class cannot be instantiated from Python

class esys.speckley.SpeckleyBrick
  __init__()

    Raises an exception This class cannot be instantiated from Python

class esys.speckley.SpeckleyDomain
  __init__()

    Raises an exception This class cannot be instantiated from Python

  MPIBarrier((SpeckleyDomain)arg1) → None :

    Wait until all processes have reached this point

  addToRHS((SpeckleyDomain)arg1, (Data)arg2, (list)rhs, (AbstractAssembler)data) → None :

    adds a PDE onto the stiffness matrix mat and a rhs, results depends on domain

    Parameters

      - rhs (`Data`) –

      - data (`list`) –

  addToSystem((SpeckleyDomain)arg1, (Operator)arg2, (Data)mat, (list)rhs, (AbstractAssembler)data) → None :

    adds a PDE to the system, results depend on domain

    Parameters

      - mat (`OperatorAdapter`) –

      - rhs (`Data`) –

      - data (`list`) –

  createAssembler((SpeckleyDomain)arg1, (str)typename, (list)options) → AbstractAssembler :

    request from the domain an assembler of the specified type, if supported, using the supplied options (if provided):param typename: :type typename: `string` :param options: :type options: `list`

  dump((SpeckleyDomain)arg1, (str)filename) → None :

    Dumps the mesh to a file with the given name.

  getDataShape((SpeckleyDomain)arg1, (object)functionSpaceCode) → object :
    Returns

      a pair (dps, ns) where dps is the number of data points per sample, and ns isthe number of samples

    Return type

      `tuple`

  getDescription((SpeckleyDomain)arg1) → str :
    Returns

      a description for this domain

    Return type

      `string`

  getDim((SpeckleyDomain)arg1) → int :
    Return type

      `int`

  getGridParameters((SpeckleyDomain)arg1) → tuple :

    Returns the tuple (origin, spacing, elements) where the entries are tuples: `origin` the coordinates of the domain’s global origin, `spacing` the element size (=node spacing) of the domain, `elements` the global number of elements in all dimensions

    Return type

      `tuple`

  getMPIRank((SpeckleyDomain)arg1) → int :
    Returns

      the rank of this process

    Return type

      `int`

  getMPISize((SpeckleyDomain)arg1) → int :
    Returns

      the number of processes used for this `Domain`

    Return type

      `int`

  getNormal((SpeckleyDomain)arg1) → Data :
    Returns

      boundary normals at the quadrature point on the face elements

    Return type

      `Data`

  getNumDataPointsGlobal((SpeckleyDomain)arg1) → int :
    Returns

      the number of data points summed across all MPI processes

    Return type

      `int`

  getOrder((SpeckleyDomain)arg1) → int :
    Returns

      the order of the domain

    Return type

      `int`

  getSize((SpeckleyDomain)arg1) → Data :
    Returns

      the element size

    Return type

      `Data`

  getSystemMatrixTypeId((SpeckleyDomain)arg1, (object)options) → int :
    Returns

      the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package, preconditioner, and symmetric matrix is used.

    Return type

      `int`

    Parameters

      - solver (`int`) –

      - preconditioner (`int`) –

      - package (`int`) –

      - symmetry (`int`) –

  getTag((SpeckleyDomain)arg1, (str)name) → int :
    Returns

      tag id for `name`

    Return type

      `string`

  getX((SpeckleyDomain)arg1) → Data :
    Returns

      locations in the FEM nodes

    Return type

      `Data`

  isValidTagName((SpeckleyDomain)arg1, (str)name) → bool :
    Returns

      True if `name` corresponds to a tag, otherwise False

    Return type

      `bool`

  newOperator((SpeckleyDomain)arg1, (object)row_blocksize, (FunctionSpace)row_functionspace, (object)column_blocksize, (FunctionSpace)column_functionspace, (object)type) → Operator :

    creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros

    Parameters

      - row_blocksize (`int`) –

      - row_functionspace (`FunctionSpace`) –

      - column_blocksize (`int`) –

      - column_functionspace (`FunctionSpace`) –

      - type (`int`) –

  onMasterProcessor((SpeckleyDomain)arg1) → bool :
    Returns

      True if this code is executing on the master process

    Return type

      `bool`

  print_mesh_info((SpeckleyDomain)arg1[, (object)full=False]) → None :

    Prints out a summary about the mesh. :param full: whether to output additional data :type full: `bool`

  setTagMap((SpeckleyDomain)arg1, (str)name, (object)tag) → None :

    Give a tag number a name.

    Parameters

      - name (`string`) – Name for the tag

      - tag (`int`) – numeric id

    Note

      Tag names must be unique within a domain

  showTagNames((SpeckleyDomain)arg1) → str :
    Returns

      A space separated list of tag names

    Return type

      `string`

  writeBinaryGrid((SpeckleyDomain)arg1, (Data)arg2, (str)arg3, (object)arg4, (object)arg5) → None

    writeBinaryGrid( (SpeckleyDomain)arg1, (Data)arg2, (str)arg3, (object)arg4, (object)arg5) -> None

class esys.speckley.SpeckleyRectangle
  __init__()

    Raises an exception This class cannot be instantiated from Python

## Functions

esys.speckley.Brick((object)order, (object)n0, (object)n1, (object)n2[, (object)l0=1.0[, (object)l1=1.0[, (object)l2=1.0[, (object)d0=-1[, (object)d1=-1[, (object)d2=-1[, (object)diracPoints=[][, (object)diracTags=[][, (SubWorld)escriptworld=None]]]]]]]]]) → Domain :

  Creates a hexagonal mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2].

  Parameters

    - order – the number of quadrature points to have in each dimension

    - n0 (`int`) – number of elements in direction 0

    - n1 (`int`) – number of elements in direction 1

    - n2 (`int`) – number of elements in direction 2

    - l0 (`float` or `tuple`) – length of side 0 or coordinate range of side 0

    - l1 (`float` or `tuple`) – length of side 1 or coordinate range of side 1

    - l2 (`float` or `tuple`) – length of side 2 or coordinate range of side 2

    - d0 (`int`) – number of subdivisions in direction 0

    - d1 (`int`) – number of subdivisions in direction 1

    - d2 (`int`) – number of subdivisions in direction 2

esys.speckley.Rectangle((object)order, (object)n0, (object)n1[, (object)l0=1.0[, (object)l1=1.0[, (object)d0=-1[, (object)d1=-1[, (object)diracPoints=[][, (object)diracTags=[][, (SubWorld)escriptworld=None]]]]]]]) → Domain :

  Creates a rectangular mesh with n0 x n1 elements over the rectangle [0,l0] x [0,l1].

  Parameters

    - n0 (`int`) – number of elements in direction 0

    - n1 (`int`) – number of elements in direction 1

    - l0 (`float` or `tuple`) – length of side 0 or coordinate range of side 0

    - l1 (`float` or `tuple`) – length of side 1 or coordinate range of side 1

    - d0 (`int`) – number of subdivisions in direction 0

    - d1 (`int`) – number of subdivisions in direction 1

esys.speckley.readBinaryGrid((str)filename, (FunctionSpace)functionspace, (object)shape, (object)fill=0.0, (object)byteOrder, (object)dataType, (object)first, (object)numValues, (object)multiplier, (object)reverse) → Data :

  Reads a binary Grid

## Others

- BYTEORDER_BIG_ENDIAN

- BYTEORDER_LITTLE_ENDIAN

- BYTEORDER_NATIVE

- DATATYPE_FLOAT32

- DATATYPE_FLOAT64

- DATATYPE_INT32

## Packages