esys.finley.finleycpp Package

Classes

class esys.finley.finleycpp.MeshAdapter

Bases: esys.escript.escriptcpp.ContinuousDomain

A concrete class representing a domain. For more details, please consult the c++ documentation.

MPIBarrier((MeshAdapter)arg1) → None :

Wait until all processes have reached this point

addPDEToLumpedSystem((MeshAdapter)arg1, (Data)arg2, (Data)arg3, (Data)mat, (Data)D, (bool)d) → None :

adds a PDE onto the lumped stiffness matrix

Parameters:
  • mat (Data) –
  • D (Data) –
  • d (Data) –
  • useHRZ (bool) –
addPDEToRHS((MeshAdapter)arg1, (Data)arg2, (Data)rhs, (Data)X, (Data)Y, (Data)y, (Data)y_contact) → None :

adds a PDE onto the stiffness matrix mat and a rhs

Parameters:
  • rhs (Data) –
  • X (Data) –
  • Y (Data) –
  • y (Data) –
  • y_contact (Data) –
addPDEToSystem((MeshAdapter)arg1, (Operator)arg2, (Data)arg3, (Data)mat, (Data)rhs, (Data)A, (Data)B, (Data)C, (Data)D, (Data)X, (Data)Y, (Data)d, (Data)y, (Data)d_contact, (Data)y_contact) → None :

adds a PDE onto the stiffness matrix mat and a rhs

Parameters:
  • mat (OperatorAdapter) –
  • rhs (Data) –
  • A (Data) –
  • B (Data) –
  • C (Data) –
  • D (Data) –
  • X (Data) –
  • Y (Data) –
  • d (Data) –
  • d_contact (Data) –
  • y_contact (Data) –
addPDEToTransportProblem((MeshAdapter)arg1, (TransportProblem)arg2, (Data)arg3, (Data)tp, (Data)source, (Data)M, (Data)A, (Data)B, (Data)C, (Data)D, (Data)X, (Data)Y, (Data)d, (Data)y, (Data)d_contact, (Data)y_contact) → None :
Parameters:
  • tp (TransportProblemAdapter) –
  • source (Data) –
  • M (Data) –
  • A (Data) –
  • B (Data) –
  • C (Data) –
  • D (Data) –
  • X (Data) –
  • Y (Data) –
  • d (Data) –
  • y (Data) –
  • d_contact (Data) –
  • y_contact (Data) –
dump((MeshAdapter)arg1, (str)fileName) → None :

dumps the mesh to a file with the given name.

getDataShape((MeshAdapter)arg1, (int)functionSpaceCode) → object :
Returns:a pair (dps, ns) where dps=the number of data points per sample, and ns=the number of samples
Return type:tuple
getDescription((MeshAdapter)arg1) → str :
Returns:a description for this domain
Return type:string
getDim((MeshAdapter)arg1) → int :
Return type:int
getMPIRank((MeshAdapter)arg1) → int :
Returns:the rank of this process
Return type:int
getMPISize((MeshAdapter)arg1) → int :
Returns:the number of processes used for this Domain
Return type:int
getNormal((MeshAdapter)arg1) → Data :
Returns:boundary normals at the quadrature point on the face elements
Return type:Data
getNumDataPointsGlobal((MeshAdapter)arg1) → int :
Returns:the number of data points summed across all MPI processes
Return type:int
getSize((MeshAdapter)arg1) → Data :
Returns:the element size
Return type:Data
getStatus((Domain)arg1) → int :

The status of a domain changes whenever the domain is modified

Return type:int
getSystemMatrixTypeId((MeshAdapter)arg1, (int)solver, (int)preconditioner, (int)package, (bool)symmetry) → 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((MeshAdapter)arg1, (str)name) → int :
Returns:tag id for name
Return type:string
getTransportTypeId((MeshAdapter)arg1, (int)solver, (int)preconditioner, (int)package, (bool)symmetry) → int :
Returns:

the identifier of the transport problem type to be used when a particular solver, preconditioner, package and symmetric matrix is used.

Return type:

int

Parameters:
  • solver (int) –
  • preconditioner (int) –
  • package (int) –
  • symmetry (int) –
getX((MeshAdapter)arg1) → Data :
Returns:locations in the FEM nodes
Return type:Data
isValidTagName((MeshAdapter)arg1, (str)name) → bool :
Returns:True is name corresponds to a tag
Return type:bool
newOperator((MeshAdapter)arg1, (int)row_blocksize, (FunctionSpace)row_functionspace, (int)column_blocksize, (FunctionSpace)column_functionspace, (int)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) –
newTransportProblem((MeshAdapter)theta, (int)blocksize, (FunctionSpace)functionspace, (int)type) → TransportProblem :

creates a TransportProblemAdapter

Parameters:
  • theta (float) –
  • blocksize (int) –
  • functionspace (FunctionSpace) –
  • type (int) –
onMasterProcessor((MeshAdapter)arg1) → bool :
Returns:True if this code is executing on the master process
Return type:bool
print_mesh_info((MeshAdapter)arg1[, (bool)full=False]) → None :
Parameters:full (bool) –
setTagMap((MeshAdapter)arg1, (str)name, (int)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

setX((MeshAdapter)arg1, (Data)arg) → None :

assigns new location to the domain

Parameters:arg (Data) –
showTagNames((MeshAdapter)arg1) → str :
Returns:A space separated list of tag names
Return type:string
supportsContactElements((Domain)arg1) → bool :

Does this domain support contact elements.

write((MeshAdapter)arg1, (str)filename) → None :

Write the current mesh to a file with the given name.

Functions

esys.finley.finleycpp.GlueFaces((list)meshList[, (float)safetyFactor=0.2[, (float)tolerance=1e-08[, (int)optimize=True]]]) → Domain :

Detects matching faces in the mesh, removes them from the mesh and joins the elements touched by the face elements.

esys.finley.finleycpp.JoinFaces((list)meshList[, (float)safetyFactor=0.2[, (float)tolerance=1e-08[, (int)optimize=True]]]) → Domain :

Detects matching faces in the mesh and replaces them by joint elements.

esys.finley.finleycpp.LoadMesh([(str)fileName='file.nc']) → Domain :
Return type:Domain
esys.finley.finleycpp.Merge((list)meshList) → Domain :

Merges a list of meshes into one mesh.

Return type:Domain
esys.finley.finleycpp.ReadGmsh((str)fileName='file.msh', (int)numDim[, (int)integrationOrder=-1[, (int)reducedIntegrationOrder=-1[, (int)optimize=True[, (int)useMacroElements=False]]]]) → Domain :

Read a gmsh mesh file

Return type:

Domain

Parameters:
  • fileName (string) –
  • integrationOrder (int) – order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.
  • reducedIntegrationOrder – order of the quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.
  • optimize (bool) – Enable optimisation of node labels
  • useMacroElements (bool) – Enable the usage of macro elements instead of second order elements.
esys.finley.finleycpp.ReadMesh([(str)fileName='file.fly'[, (int)integrationOrder=-1[, (int)reducedIntegrationOrder=-1[, (int)optimize=True]]]]) → Domain :

Read a mesh from a file. For MPI parallel runs fan out the mesh to multiple processes.

Return type:

Domain

Parameters:
  • fileName (string) –
  • integrationOrder (int) – order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.
  • reducedIntegrationOrder – order of the quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.
  • optimize (bool) – Enable optimisation of node labels
esys.finley.finleycpp.__Brick_driver((list)params) → Domain :

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

Parameters:
  • n0
  • n1
  • n2
  • order – =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.
  • l0 – length of side 0
  • l1
  • l2
  • integrationOrder – order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.
  • reducedIntegrationOrder – order of the quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.
  • useElementsOnFace (int:param periodic0: whether or not boundary conditions are periodic) – whether or not to use elements on face
  • periodic1
  • periodic2
  • useFullElementOrder
  • optimize (bool) –
  • optimize – Enable optimisation of node labels
esys.finley.finleycpp.__Rectangle_driver((list)args) → Domain :

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

Parameters:
  • n0
  • n1
  • order – =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.
  • l0 – length of side 0
  • l1
  • integrationOrder – order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.
  • reducedIntegrationOrder – order of the quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.
  • useElementsOnFace (int:param periodic0: whether or not boundary conditions are periodic) – whether or not to use elements on face
  • periodic1
  • useFullElementOrder
  • optimize (bool) –
  • optimize – Enable optimisation of node labels

Others

  • __doc__
  • __file__
  • __name__
  • __package__