esys.dudley Package¶
A domain meshed with triangles or tetrahedra only. Imports submodules into its namespace
Classes¶
-
esys.dudley.GMSHDesign¶ alias of
Design
-
class
esys.dudley.MeshAdapter¶ Bases:
esys.escriptcore.escriptcpp.ContinuousDomainA concrete class representing a domain. For more details, please consult the c++ documentation.
-
__init__((object)arg1[, (object)arg2]) → None¶ __init__( (object)arg1, (MeshAdapter)arg2) -> None
-
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) –
- mat (
-
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) –
- rhs (
-
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) –
- mat (
-
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) –
- tp (
-
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 DomainReturn 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, (object)options) → int :¶ Returns: the identifier of the matrix type to be used for the global stiffness matrix when particular solver options are used. Return type: intParameters: options ( SolverBuddy) –
-
getTag((MeshAdapter)arg1, (str)name) → int :¶ Returns: tag id for nameReturn 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: intParameters: - solver (
int) – - preconditioner (
int) – - package (
int) – - symmetry (
int) –
- solver (
-
getX((MeshAdapter)arg1) → Data :¶ Returns: locations in the FEM nodes Return type: Data
-
isValidTagName((MeshAdapter)arg1, (str)name) → bool :¶ Returns: True is namecorresponds to a tagReturn 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) –
- row_blocksize (
-
newTransportProblem((MeshAdapter)theta, (int)blocksize, (FunctionSpace)functionspace, (int)type) → TransportProblem :¶ creates a TransportProblemAdapter
Parameters: - theta (
float) – - blocksize (
int) – - functionspace (
FunctionSpace) – - type (
int) –
- theta (
-
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
- name (
-
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.dudley.Brick(n0=1, n1=1, n2=1, order=1, l0=1.0, l1=1.0, l2=1.0, periodic0=0, periodic1=0, periodic2=0, integrationOrder=-1, reducedIntegrationOrder=-1, useElementsOnFace=0, useFullElementOrder=0, optimize=0, **kwargs)¶ - __Brick_driver( (list)args) -> Domain :
- Creates a tetrahedral mesh by subdividing n0 x n1 x n2 rectangular elements over the brick [0,l0] x [0,l1] x [0,l2].We accept floating point values for n0, n1 only to ease transition of scripts to python3 when the time comes.
-
esys.dudley.LoadMesh([(str)fileName='file.nc']) → Domain :¶ Return type: Domain
-
esys.dudley.MakeDomain(design, integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True, useMacroElements=False)¶ Creates a Dudley
Domainfrom aesys.pycad.design.Designobject. Currently only gmsh is supported.Parameters: - design (
esys.pycad.design.Design) – the geometry - integrationOrder (
int) – integration order. If -1 the default is used. - reducedIntegrationOrder (
int) – reduced integration order. If -1 the default is used. - optimizeLabeling (
bool) – if set the labeling of the mesh nodes is optimized - useMacroElements (
bool) – uses macro elements.
Returns: the Finley domain defined by the design
Return type: Domain- design (
-
esys.dudley.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: DomainParameters: - 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.
- fileName (
-
esys.dudley.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: DomainParameters: - 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
- fileName (
-
esys.dudley.Rectangle(n0=1, n1=1, order=1, l0=1.0, l1=1.0, periodic0=False, periodic1=False, integrationOrder=-1, reducedIntegrationOrder=-1, useElementsOnFace=0, useFullElementOrder=0, optimize=0, **kwargs)¶ - __Rectangle_driver( (list)args) -> Domain :
Creates a triangular mesh by subdividing n0 x n1 rectangular elements over the brick [0,l0] x [0,l1].We accept floating point values for n0, n1 only to ease transition of scripts to python3 when the time comes.
param n0: type n0: param n1: type n1: param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used. param l0: length of side 0 param l1: param integrationOrder: order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently. param reducedIntegrationOrder: order of the quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently. param useElementsOnFace: whether or not to use elements on face type useElementsOnFace: int:param periodic0: whether or not boundary conditions are periodicparam periodic1: param useFullElementOrder: Not used: boolparam useMacroElements: Enable the usage of first order macro elements. type useMacroElements: boolparam optimize: Enable optimisation of node labels type optimize: bool
Others¶
- __builtins__
- __copyright__
- __doc__
- __file__
- __license__
- __name__
- __nodocorecursion
- __package__
- __path__
- __url__
- division
- print_function