PyNucleus_fem package
- class PyNucleus_fem.P0_DoFMap(meshBase mesh, tag=None, INDEX_t skipCellsAfter=-1)
Bases:
DoFMap
Degree of freedom mapping for a piecewise constant finite element space.
- __init__(*args, **kwargs)
- interpolateFE(self, mesh, P0_DoFMap dm, REAL_t[::1] u)
- class PyNucleus_fem.P1_DoFMap(meshBase mesh, tag=None, INDEX_t skipCellsAfter=-1)
Bases:
DoFMap
Degree of freedom mapping for a continuous piecewise linear finite element space.
- __init__(*args, **kwargs)
- getValuesAtVertices(self, REAL_t[::1] u)
- class PyNucleus_fem.P2_DoFMap(meshBase mesh, tag=None, INDEX_t skipCellsAfter=-1)
Bases:
DoFMap
Degree of freedom mapping for a continuous piecewise quadratic finite element space.
- __init__(*args, **kwargs)
- class PyNucleus_fem.P3_DoFMap(meshBase mesh, tag=None, INDEX_t skipCellsAfter=-1)
Bases:
DoFMap
Degree of freedom mapping for a continuous piecewise cubic finite element space.
- __init__(*args, **kwargs)
- PyNucleus_fem.str2DoFMap(element)
- PyNucleus_fem.str2DoFMapOrder(element)
- PyNucleus_fem.getAvailableDoFMaps()
PyNucleus_fem.DoFMaps module
- class PyNucleus_fem.DoFMaps.DoFMap(meshBase mesh, INDEX_t dofs_per_vertex, INDEX_t dofs_per_edge, INDEX_t dofs_per_face, INDEX_t dofs_per_cell, tag=None, INDEX_t skipCellsAfter=-1)
Bases:
object
A class to store the mapping from mesh elements to degrees of freedom (DoFs).
Degrees of freedom are split into two types. The interior DoFs that are used to support the finite element space and boundary DoFs that correspond to essential boundary conditions.
- static HDF5read(node)
Read the DoF mapping from an HDF5 file node.
- HDF5write(self, node)
Write the DoF mapping to an HDF5 file node.
- __init__(*args, **kwargs)
- applyPeriodicity(self, vectorFunction coordinateMapping, REAL_t eps=1e-8)
coordinateMapping(x) -> coordinate modulo periodicity
- assembleDrift(self, vectorFunction coeff, LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1, INDEX_t[::1] cellIndices=None)
Assemble
\[\int_D (\texttt{coeff}(x) \cdot \nabla u(x)) v(x) dx\]- Parameters:
coeff – the vector-valued advection term
- assembleElasticity(self, lam=1., mu=1., DoFMap dm2=None)
Assemble
\[ \begin{align}\begin{aligned}\int_D \sigma[u](x) : \epsilon[v](x) dx\\\epsilon[u] = (\nabla u + (\nabla u)^T) / 2\\\sigma[u] = \lambda \nabla \cdot u I + 2\mu \epsilon[u]\end{aligned}\end{align} \]
- assembleMass(self, vector_t boundary_data=None, vector_t rhs_contribution=None, LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1, BOOL_t sss_format=False, BOOL_t reorder=False, INDEX_t[::1] cellIndices=None, DoFMap dm2=None, coefficient=None)
Assemble the mass matrix
\[\int_D u(x) \texttt{coefficient}(x) v(x) dx\]- Parameters:
sss_format – sss_format is a Boolean parameter that specifies whether the assembled mass matrix should be in the Symmetric Sparse Skyline (SSS) format. If sss_format is True, the matrix will be stored in the SSS format, which is a memory-efficient way of storing symmetric matrices. Defaults to False (optional).
reorder – The reorder parameter is a boolean value that determines whether or not to reorder the degrees of freedom (DoFs) before assembling the mass matrix. Reordering can improve the efficiency of the matrix assembly and subsequent computations by reducing the number of non-zero entries in the matrix and improving cache locality, defaults to False (optional).
coefficient – Weighting of the mass matrix. If not provided it is assumed to be one.
- assembleNonlinearity(self, fun, multi_fe_vector U)
- assembleNonlocal(self, kernel, str matrixFormat='DENSE', DoFMap dm2=None, BOOL_t returnNearField=False, **kwargs)
Assemble a nonlocal operator.
For finite horizon kernels
\[\iint_{D \times D} (u(x)-u(y)) (v(x) \gamma(x, y) - v(y) \gamma(y, x)) dy dx\]and for infinite horizon kernels
\[\iint_{D \times D} (u(x)-u(y)) (v(x) \gamma(x, y) - v(y) \gamma(y, x)) dy dx + 2\int_{D} u(x) v(x) \int_{D^c} \gamma(x, y) dy dx\]- Parameters:
kernel – The kernel function \(\gamma\)
matrixFormat – The matrix format for the assembly. Valid values are dense, diagonal, sparsified, sparse, H2 and H2corrected. H2 assembles into a hierarchical matrix format. H2corrected also assembles a hierarchical matrix for an infinite horizon kernel and a correction term. diagonal returns the matrix diagonal. Both sparsified and sparse return a sparse matrix, but the assembly routines are different.
- assembleRHS(self, fun, simplexQuadratureRule qr=None)
Assemble the right-hand side vector
\[\int_D \texttt{fun}(x) v(x) dx\]- Parameters:
fun – the right-hand side function
qr – the quadrature rule for the integration. If not specified a sensible default is used.
- assembleRHSgrad(self, fun, vectorFunction coeff, simplexQuadratureRule qr=None)
Assemble the right-hand side vector
\[\int_D \texttt{fun}(x) (\texttt{coeff}(x) \cdot \nabla v(x)) dx\]- Parameters:
fun – the right-hand side function
coeff – a vector function
qr – the quadrature rule for the integration. If not specified a sensible default is used.
- assembleStiffness(self, vector_t boundary_data=None, vector_t rhs_contribution=None, LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1, BOOL_t sss_format=False, BOOL_t reorder=False, diffusivity=None, INDEX_t[::1] cellIndices=None, DoFMap dm2=None, simplexQuadratureRule qr=None)
This function assembles the stiffness matrix for a given diffusivity function:
\[\int_D \nabla u(x) \cdot \texttt{diffusivity}(x) \nabla v(x) dx\]- Parameters:
sss_format – sss_format is a Boolean parameter that specifies whether the assembled stiffness matrix should be in the Symmetric Sparse Skyline (SSS) format. If sss_format is True, the matrix will be stored in the SSS format, which is a memory-efficient way of storing symmetric matrices. Defaults to False (optional).
reorder – The reorder parameter is a boolean value that determines whether or not to reorder the degrees of freedom (DoFs) before assembling the stiffness matrix. Reordering can improve the efficiency of the matrix assembly and subsequent computations by reducing the number of non-zero entries in the matrix and improving cache locality, defaults to False (optional)
diffusivity – Diffusivity is a property of a material that describes how easily it allows particles or heat to move through it. Assumed to be one if not specified.
- augmentWithBoundaryData(self, x, boundaryData)
Augment the finite element function with boundary data.
- augmentWithZero(self, const REAL_t[::1] x)
Augment the finite element function with zeros on the boundary.
- buildNonSymmetricSparsityPattern(self, cells_t cells, DoFMap dmOther, INDEX_t start_idx=-1, INDEX_t end_idx=-1)
Build a non-symmetric sparsity pattern.
- buildSparsityPattern(self, cells_t cells, INDEX_t start_idx=-1, INDEX_t end_idx=-1, BOOL_t symmetric=False, BOOL_t reorder=False)
Build a sparsity pattern for the given mesh cells.
- cell2dof_py(self, INDEX_t cellNo, INDEX_t perCellNo)
Return the global DoF index corresponding to the cell number and the local DoF index.
- combine(self, DoFMap other)
- complex_inner
complex_inner: PyNucleus_base.ip_norm.complexipBase
- complex_norm
complex_norm: PyNucleus_base.ip_norm.complexNormBase
- dim
- dof_dual
dof_dual: ‘REAL_t[:, ::1]’
- dofs
dofs: ‘INDEX_t[:, ::1]’
- dofs_per_cell
dofs_per_cell: ‘INDEX_t’
- dofs_per_edge
dofs_per_edge: ‘INDEX_t’
- dofs_per_element
dofs_per_element: ‘INDEX_t’
- dofs_per_face
dofs_per_face: ‘INDEX_t’
- dofs_per_vertex
dofs_per_vertex: ‘INDEX_t’
- empty(self, INDEX_t numVecs=1, BOOL_t collection=False, dtype=REAL)
Return an uninitialized finite element coefficient vector.
- evalFun(self, const REAL_t[::1] u, INDEX_t cellNo, REAL_t[::1] x)
- fromArray(self, data)
Build a finite element coefficient vector from a numpy array.
- full(self, REAL_t fill_value, INDEX_t numVecs=1, BOOL_t collection=False, dtype=REAL)
Return a finite element coefficient vector filled with fill_value.
- getBoundaryData(self, function boundaryFunction)
- getCellLookup(self)
- getComplementDoFMap(self)
Return the complement DoFMap which has DoFs and natural boundary conditions swapped.
- getCoordinateBlocks(self, INDEX_t[::1] idxDims, delta=1e-5)
- getDoFCoordinates(self)
Get the coordinate vector of the DoFs.
- getFullDoFMap(self, DoFMap complement_dm)
- getGlobalShapeFunction(self, INDEX_t dof)
- getNodalCoordinates_py(self, REAL_t[:, ::1] cell)
- getPatchLookup(self)
- getReducedMeshDoFMap(self, INDEX_t[::1] selectedCells=None)
- getVertexDoFs(self, INDEX_t[:, ::1] v2d) void
- inner
inner: PyNucleus_base.ip_norm.ipBase
- interpolate(self, fun)
Interpolate a function into the finite element space.
- linearPart(self, x)
Return the linear part of the finite element function.
- localShapeFunctions
- mesh
mesh: PyNucleus_fem.meshCy.meshBase
- nodes
nodes: ‘REAL_t[:, ::1]’
- norm
norm: PyNucleus_base.ip_norm.normBase
- num_boundary_dofs
num_boundary_dofs: ‘INDEX_t’
- num_dofs
num_dofs: ‘INDEX_t’
- ones(self, INDEX_t numVecs=1, BOOL_t collection=False, dtype=REAL)
Return the finite element coefficient vector corresponding to the constant function.
- plot(self, *args, **kwargs)
Plot the DoF mapping.
- polynomialOrder
polynomialOrder: ‘INDEX_t’
- project(self, function, DoFMap=None, simplexQuadratureRule qr=None)
Project a function into the finite element space.
- reorder(self, const INDEX_t[::1] perm) void
Reorder the DoFs according to the given permutation.
- resetUsingFEVector(self, REAL_t[::1] ind) void
- resetUsingIndicator(self, function indicator) void
- set_complex_ip_norm(self, complexipBase inner, complexNormBase norm)
Set the inner product and norm that complex-valued finite element functions derived from this DoFMap will use.
- set_ip_norm(self, ipBase inner, normBase norm)
Set the inner product and norm that finite element functions derived from this DoFMap will use.
- sort(self)
- tag
tag: list
- tagFunction
tagFunction: PyNucleus_fem.functions.function
- zeros(self, INDEX_t numVecs=1, BOOL_t collection=False, dtype=REAL)
Return a zero finite element coefficient vector.
- PyNucleus_fem.DoFMaps.DoFMap2str(dm)
- class PyNucleus_fem.DoFMaps.N1e_DoFMap(meshBase mesh, tag=None, INDEX_t skipCellsAfter=-1)
Bases:
DoFMap
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.P0_DoFMap(meshBase mesh, tag=None, INDEX_t skipCellsAfter=-1)
Bases:
DoFMap
Degree of freedom mapping for a piecewise constant finite element space.
- __init__(*args, **kwargs)
- interpolateFE(self, mesh, P0_DoFMap dm, REAL_t[::1] u)
- class PyNucleus_fem.DoFMaps.P1_DoFMap(meshBase mesh, tag=None, INDEX_t skipCellsAfter=-1)
Bases:
DoFMap
Degree of freedom mapping for a continuous piecewise linear finite element space.
- __init__(*args, **kwargs)
- getValuesAtVertices(self, REAL_t[::1] u)
- class PyNucleus_fem.DoFMaps.P2_DoFMap(meshBase mesh, tag=None, INDEX_t skipCellsAfter=-1)
Bases:
DoFMap
Degree of freedom mapping for a continuous piecewise quadratic finite element space.
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.P3_DoFMap(meshBase mesh, tag=None, INDEX_t skipCellsAfter=-1)
Bases:
DoFMap
Degree of freedom mapping for a continuous piecewise cubic finite element space.
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.Product_DoFMap(DoFMap dm, INDEX_t numComponents)
Bases:
DoFMap
- __init__(*args, **kwargs)
- getComplementDoFMap(self)
- getRestrictionProlongation(self, INDEX_t component)
- getVertexDoFs(self, INDEX_t[:, ::1] v2d) void
- linearPart(self, fe_vector x)
- numComponents
numComponents: ‘INDEX_t’
- scalarDM
scalarDM: PyNucleus_fem.DoFMaps.DoFMap
- class PyNucleus_fem.DoFMaps.complex_fe_vector(double complex[::1] data, DoFMap dm)
Bases:
object
- __init__(*args, **kwargs)
- assign(self, other)
- astype(self, dtype)
- augmentWithBoundaryData(self, complex_fe_vector boundaryData)
- copy(self)
- dm
dm: PyNucleus_fem.DoFMaps.DoFMap
- dtype
- exportVTK(self, filename, label)
- getComponent(self, INDEX_t component)
- getComponents(self)
- imag
- inner(self, other, BOOL_t accSelf=False, BOOL_t accOther=False, BOOL_t asynchronous=False) double complex
- linearPart(self)
- ndim
- norm(self, BOOL_t acc=False, BOOL_t asynchronous=False) REAL_t
- plot(self, **kwargs)
- real
- shape
- toarray(self, copy=False)
- class PyNucleus_fem.DoFMaps.complex_multi_fe_vector(double complex[:, ::1] data, DoFMap dm)
Bases:
object
- __init__(*args, **kwargs)
- assign(self, other)
- astype(self, dtype)
- copy(self)
- dm
dm: PyNucleus_fem.DoFMaps.DoFMap
- dtype
- imag
- linearPart(self)
- ndim
- numVectors
- plot(self, **kwargs)
- real
- scale(self, double complex[::1] other)
- scaledUpdate(self, double complex[::1] other, double complex[::1] scaling)
- shape
- toarray(self, copy=False)
- class PyNucleus_fem.DoFMaps.elementSizeFunction(meshBase mesh, cellFinder2 cF=None)
Bases:
function
- __init__(*args, **kwargs)
- cellFinder
cellFinder: PyNucleus_fem.meshCy.cellFinder2
- class PyNucleus_fem.DoFMaps.fe_vector(REAL_t[::1] data, DoFMap dm)
Bases:
object
- __init__(*args, **kwargs)
- assign(self, other)
- astype(self, dtype)
- augmentWithBoundaryData(self, fe_vector boundaryData)
- copy(self)
- dm
dm: PyNucleus_fem.DoFMaps.DoFMap
- dtype
- exportVTK(self, filename, label)
- getComponent(self, INDEX_t component)
- getComponents(self)
- imag
- inner(self, other, BOOL_t accSelf=False, BOOL_t accOther=False, BOOL_t asynchronous=False) REAL_t
- linearPart(self)
- ndim
- norm(self, BOOL_t acc=False, BOOL_t asynchronous=False) REAL_t
- plot(self, **kwargs)
- real
- shape
- toarray(self, copy=False)
- PyNucleus_fem.DoFMaps.generateLocalMassMatrix(DoFMap dm, DoFMap dm2=None)
- PyNucleus_fem.DoFMaps.getAvailableDoFMaps()
- PyNucleus_fem.DoFMaps.getSubMap(DoFMap dm, indicator)
- PyNucleus_fem.DoFMaps.getSubMapRestrictionProlongation(DoFMap dm, DoFMap dmSub, indicator=None)
- PyNucleus_fem.DoFMaps.getSubMapRestrictionProlongation2(meshBase mesh, DoFMap dm, DoFMap dmSub, INDEX_t[::1] newCellIndices)
- class PyNucleus_fem.DoFMaps.globalShapeFunction(DoFMap dm, INDEX_t dof)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.multi_fe_vector(REAL_t[:, ::1] data, DoFMap dm)
Bases:
object
- __init__(*args, **kwargs)
- assign(self, other)
- astype(self, dtype)
- copy(self)
- dm
dm: PyNucleus_fem.DoFMaps.DoFMap
- dtype
- imag
- linearPart(self)
- ndim
- numVectors
- plot(self, **kwargs)
- real
- scale(self, REAL_t[::1] other)
- scaledUpdate(self, REAL_t[::1] other, REAL_t[::1] scaling)
- shape
- toarray(self, copy=False)
- class PyNucleus_fem.DoFMaps.productSpaceShapeFunction(shapeFunction phi, INDEX_t K, INDEX_t k, INDEX_t dim)
Bases:
shapeFunction
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.shapeFunction(INDEX_t dim, INDEX_t valueSize=1, BOOL_t needsGradients=False)
Bases:
object
A class to represent a finite element shape function.
- __call__(*args, **kwargs)
Call self as a function.
- __init__(*args, **kwargs)
- dim
- evalGlobalPy(self, REAL_t[:, ::1] simplex, REAL_t[::1] x)
- evalGradPy(self, lam, gradLam)
- needsGradients
- setCell(self, INDEX_t[::1] cell) void
- valueSize
- class PyNucleus_fem.DoFMaps.shapeFunctionN1e(INDEX_t dim, INDEX_t localVertexNo1, INDEX_t localVertexNo2)
Bases:
shapeFunction
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.shapeFunctionP0(INDEX_t dim)
Bases:
shapeFunction
A class to represent the shape functions of a discontinuous piecewise constant finite element space.
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.shapeFunctionP1(INDEX_t dim, INDEX_t vertexNo)
Bases:
shapeFunction
A class to represent the shape functions of a continuuous piecewise linear finite element space.
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.shapeFunctionP2_edge(INDEX_t dim, INDEX_t vertexNo1, INDEX_t vertexNo2)
Bases:
shapeFunction
A class to represent the edge shape functions of a continuuous piecewise quadratic finite element space.
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.shapeFunctionP2_vertex(INDEX_t dim, INDEX_t vertexNo)
Bases:
shapeFunction
A class to represent the vertex shape functions of a continuuous piecewise quadratic finite element space.
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.shapeFunctionP3_edge(INDEX_t dim, INDEX_t vertexNo1, INDEX_t vertexNo2)
Bases:
shapeFunction
A class to represent the edge shape functions of a continuuous piecewise cubic finite element space.
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.shapeFunctionP3_face(INDEX_t dim, INDEX_t vertexNo1, INDEX_t vertexNo2, INDEX_t vertexNo3)
Bases:
shapeFunction
A class to represent the face shape functions of a continuuous piecewise cubic finite element space.
- __init__(*args, **kwargs)
- class PyNucleus_fem.DoFMaps.shapeFunctionP3_vertex(INDEX_t dim, INDEX_t vertexNo)
Bases:
shapeFunction
A class to represent the vertex shape functions of a continuuous piecewise cubic finite element space.
- __init__(*args, **kwargs)
- PyNucleus_fem.DoFMaps.str2DoFMap(element)
- PyNucleus_fem.DoFMaps.str2DoFMapOrder(element)
PyNucleus_fem.algebraicOverlaps module
- class PyNucleus_fem.algebraicOverlaps.algebraicOverlap(INDEX_t num_subdomain_dofs, INDEX_t[::1] shared_dofs, INDEX_t mySubdomainNo, INDEX_t otherSubdomainNo, comm, INDEX_t numSharedVecs=1)
Bases:
object
- static HDF5read(node, comm)
- HDF5write(self, node)
- __init__(*args, **kwargs)
- flushMemory(self, INDEX_t vecNo=0, REAL_t value=0.)
- memOffset
memOffset: ‘INDEX_t’
- memOffsetOther
memOffsetOther: ‘INDEX_t[::1]’
- memOffsetTemp
memOffsetTemp: ‘INDEX_t[::1]’
- mySubdomainNo
mySubdomainNo: ‘INDEX_t’
numSharedVecs: ‘INDEX_t’
num_shared_dofs: ‘INDEX_t’
- num_subdomain_dofs
num_subdomain_dofs: ‘INDEX_t’
- otherSubdomainNo
otherSubdomainNo: ‘INDEX_t’
- setComplex(self)
- setMemory(self, REAL_t[:, ::1] exchangeIn, REAL_t[:, ::1] exchangeOut, INDEX_t memOffset, INDEX_t totalMemSize)
shared_dofs: ‘INDEX_t[::1]’
- totalMemSize
totalMemSize: ‘INDEX_t’
- class PyNucleus_fem.algebraicOverlaps.algebraicOverlapBlocking(INDEX_t num_subdomain_dofs, INDEX_t[::1] shared_dofs, INDEX_t mySubdomainNo, INDEX_t otherSubdomainNo, comm, INDEX_t numSharedVecs=1)
Bases:
algebraicOverlap
- __init__(*args, **kwargs)
- setMemory(self, REAL_t[:, ::1] exchangeIn, REAL_t[:, ::1] exchangeOut)
- class PyNucleus_fem.algebraicOverlaps.algebraicOverlapManager(numSubdomains, num_subdomain_dofs, comm)
Bases:
object
- Didx
Didx: ‘INDEX_t[::1]’
- DidxNonOverlapping
DidxNonOverlapping: ‘INDEX_t[::1]’
- Dval
Dval: ‘REAL_t[::1]’
- DvalNonOverlapping
DvalNonOverlapping: ‘REAL_t[::1]’
- static HDF5read(node, comm)
- HDF5write(self, node)
- __init__(*args, **kwargs)
- accumulate(self, REAL_t[::1] vec, REAL_t[::1] return_vec=None, BOOL_t asynchronous=False, INDEX_t vecNo=0, INDEX_t level=0) void
Exchange information in the overlap.
- accumulate_py(self, vec, return_vec=None, asynchronous=False, vecNo=0)
- check(self, mesh=None, DoFMap dm=None, interfaces=None, label='Algebraic overlap')
- cleanup(self)
- comm
comm: mpi4py.MPI.Comm
- countDoFs(self)
- distribute(self, REAL_t[::1] vec, REAL_t[::1] vec2=None, BOOL_t nonOverlapping=False, INDEX_t level=0) void
Distribute an accumulated vector.
- distribute_py(self, vec, vec2=None, nonOverlapping=False)
- exchangeIn
exchangeIn: ‘REAL_t[:, ::1]’
- exchangeOut
exchangeOut: ‘REAL_t[:, ::1]’
- findMinPerOverlap(self, REAL_t[::1] indicator)
- flushMemory(self, INDEX_t vecNo=0, REAL_t value=0.)
- getAccumulateOperator(self)
- getDistributeAsDiagonalOperator(self, BOOL_t nonOverlapping=False)
- getDistributeOperator(self, BOOL_t nonOverlapping=False)
- getGlobalIndices(self)
- getProtoPartition(self, REAL_t[::1] x, DoFMap dm, vertexLayers, INDEX_t depth)
- getProtoPartitionNonOverlapping(self, REAL_t[::1] x, DoFMap dm, vertexLayers, INDEX_t depth)
- get_max_cross(self)
- property max_cross
algebraicOverlapManager.get_max_cross(self)
- mySubdomainNo
mySubdomainNo: ‘INDEX_t’
- numSubdomains
numSubdomains: ‘INDEX_t’
algebraicOverlapManager.get_num_shared_dofs(self, unique=False)
- num_subdomain_dofs
num_subdomain_dofs: ‘INDEX_t’
- overlaps
overlaps: dict
- prepareDistribute(self)
- prepareDistributeMeshOverlap(self, mesh, INDEX_t nc, DoFMap DoFMap, INDEX_t depth, meshOverlaps)
- prepareDistributeRepartition(self, DoFMap dm, BOOL_t doSend=True)
- prepareDistributeRepartitionSend(self, DoFMap dm)
- receive_py(self, return_vec, asynchronous=False, vecNo=0)
- reduce(self, REAL_t v, BOOL_t asynchronous=False)
- send_py(self, vec, asynchronous=False, vecNo=0)
- setComplex(self)
- type
type: str
- unique(self, REAL_t[::1] vec, INDEX_t vecNo=0)
Return an accumulated vector by taking values from the highest rank.
- class PyNucleus_fem.algebraicOverlaps.algebraicOverlapOneSidedGet(INDEX_t num_subdomain_dofs, INDEX_t[::1] shared_dofs, INDEX_t mySubdomainNo, INDEX_t otherSubdomainNo, comm, INDEX_t numSharedVecs=1)
Bases:
algebraicOverlap
- __init__(*args, **kwargs)
- exchangeMemOffsets(self, comm, INDEX_t tag=0)
- flushMemory(self, INDEX_t vecNo=0, REAL_t value=0.)
- setWindow(self, Win w)
- class PyNucleus_fem.algebraicOverlaps.algebraicOverlapOneSidedPut(INDEX_t num_subdomain_dofs, INDEX_t[::1] shared_dofs, INDEX_t mySubdomainNo, INDEX_t otherSubdomainNo, comm, INDEX_t numSharedVecs=1)
Bases:
algebraicOverlap
- __init__(*args, **kwargs)
- exchangeMemOffsets(self, comm, INDEX_t tag=0)
- flushMemory(self, INDEX_t vecNo=0, REAL_t value=0.)
- setWindow(self, Win w)
- class PyNucleus_fem.algebraicOverlaps.algebraicOverlapOneSidedPutLockAll(INDEX_t num_subdomain_dofs, INDEX_t[::1] shared_dofs, INDEX_t mySubdomainNo, INDEX_t otherSubdomainNo, comm, INDEX_t numSharedVecs=1)
Bases:
algebraicOverlap
- __init__(*args, **kwargs)
- exchangeMemOffsets(self, comm, INDEX_t tag=0)
- flushMemory(self, INDEX_t vecNo=0, REAL_t value=0.)
- setWindow(self, Win w)
- class PyNucleus_fem.algebraicOverlaps.algebraicOverlapPersistent(INDEX_t num_subdomain_dofs, INDEX_t[::1] shared_dofs, INDEX_t mySubdomainNo, INDEX_t otherSubdomainNo, comm, INDEX_t numSharedVecs=1)
Bases:
algebraicOverlap
- __init__(*args, **kwargs)
- setMemory(self, REAL_t[:, ::1] exchangeIn, REAL_t[:, ::1] exchangeOut)
- class PyNucleus_fem.algebraicOverlaps.multilevelAlgebraicOverlapManager(comm, BOOL_t setupAsynchronousReduce=False)
Bases:
object
- static HDF5read(node, comm)
- HDF5write(self, node)
- LockAll(self)
- ReduceWindow
ReduceWindow: mpi4py.MPI.Win
- __init__(*args, **kwargs)
- accumulate(self, REAL_t[::1] vec, REAL_t[::1] return_vec=None, INDEX_t level=-1, BOOL_t asynchronous=False, INDEX_t vecNo=0)
- accumulateComplex(self, double complex[::1] vec, double complex[::1] return_vec=None, INDEX_t level=-1, BOOL_t asynchronous=False, INDEX_t vecNo=0)
- canUseAsynchronousReduce
canUseAsynchronousReduce: ‘BOOL_t’
- check(self, meshes, DoFMaps, label='Algebraic overlap')
- comm
comm: mpi4py.MPI.Comm
- countDoFs(self, localsize=None, level=None)
- distribute(self, REAL_t[::1] vec, REAL_t[::1] vec2=None, INDEX_t level=-1, BOOL_t nonOverlapping=False)
- distributeComplex(self, double complex[::1] vec, double complex[::1] vec2=None, INDEX_t level=-1, BOOL_t nonOverlapping=False)
- flushMemory(self, level=None, INDEX_t vecNo=0)
- getAccumulateOperator(self, level=None)
- getDistributeAsDiagonalOperator(self, level=None, BOOL_t nonOverlapping=False)
- getDistributeOperator(self, level=None, BOOL_t nonOverlapping=False)
- getGlobalIndices(self, level=None)
- getLevel(self, INDEX_t n)
- getOverlapLevel(self, num_subdomain_dofs)
- levels
levels: list
multilevelAlgebraicOverlapManager.get_num_shared_dofs(self, unique=False)
- prepareDistribute(self)
- prepareDistributeMeshOverlap(self, mesh, nc, DoFMap dm, depth, meshOverlaps)
- redistribute(self, REAL_t[::1] vec, REAL_t[::1] vec2=None, level=None, BOOL_t nonOverlapping=False, BOOL_t asynchronous=False, INDEX_t vecNo=0)
- reduce(self, REAL_t v, BOOL_t asynchronous=False)
- setComplex(self)
- unique(self, REAL_t[::1] vec, INDEX_t vecNo=0)
- useAsynchronousComm
useAsynchronousComm: ‘BOOL_t’
- useLockAll
useLockAll: ‘BOOL_t’
PyNucleus_fem.boundaryLayerCy module
- class PyNucleus_fem.boundaryLayerCy.boundaryLayer(mesh, depth, afterRefinements, INDEX_t startCell=0)
Bases:
object
- __init__(*args, **kwargs)
- getBoundaryAndConnectivity(self, mesh, INDEX_t startCell=0)
Calculate the connectivity and the boundary cells and edges of the given cells.
- getLayer(self, INDEX_t depth, set ofCells=None, BOOL_t returnLayerNo=False, INDEX_t[:, ::1] cells=None)
Returns depth layers of cells that are adjacent to ofCells.
- prune(self, depth, pp=None, cells=None)
Remove cells that are to far from the boundary.
- refine(self, newMesh)
Refine the boundary layers.
- vertex2cells(self, const INDEX_t[:, ::1] cells)
Return a lookup dict vertex no -> cell no
PyNucleus_fem.distributed.operators module
- class PyNucleus_fem.distributed_operators.CSR_DistributedLinearOperator(CSR_LinearOperator A, algebraicOverlapManager overlaps, BOOL_t doDistribute=False, BOOL_t keepDistributedResult=False)
Bases:
DistributedLinearOperator
- __init__(*args, **kwargs)
- diagonal
- class PyNucleus_fem.distributed_operators.ComplexCSR_DistributedLinearOperator(ComplexCSR_LinearOperator A, algebraicOverlapManager overlaps, BOOL_t doDistribute=False, BOOL_t keepDistributedResult=False)
Bases:
ComplexDistributedLinearOperator
- __init__(*args, **kwargs)
- diagonal
- class PyNucleus_fem.distributed_operators.ComplexDistributedLinearOperator(ComplexLinearOperator A, algebraicOverlapManager overlaps, BOOL_t doDistribute=False, BOOL_t keepDistributedResult=False)
Bases:
ComplexLinearOperator
- __init__(*args, **kwargs)
- asynchronous
asynchronous: ‘BOOL_t’
- diagonal
- doDistribute
doDistribute: ‘BOOL_t’
- keepDistributedResult
keepDistributedResult: ‘BOOL_t’
- tempMemY
tempMemY: ‘double complex[::1]’
- class PyNucleus_fem.distributed_operators.ComplexRowDistributedOperator(ComplexCSR_LinearOperator localMat, Comm comm, DoFMap dm, DoFMap local_dm, CSR_LinearOperator lclR, CSR_LinearOperator lclP)
Bases:
ComplexLinearOperator
Extracts the local parts of a matrix and creates a row-distributed operator.
- __init__(*args, **kwargs)
- comm
comm: mpi4py.MPI.Comm
- diagonal
- dm
dm: PyNucleus_fem.DoFMaps.DoFMap
- lclP
lclP: PyNucleus_base.linear_operators.LinearOperator
- lclR
lclR: PyNucleus_base.linear_operators.LinearOperator
- lcl_dm
lcl_dm: PyNucleus_fem.DoFMaps.DoFMap
- localMat
localMat: PyNucleus_base.linear_operators.ComplexCSR_LinearOperator
- class PyNucleus_fem.distributed_operators.DistributedLinearOperator(LinearOperator A, algebraicOverlapManager overlaps, BOOL_t doDistribute=False, BOOL_t keepDistributedResult=False)
Bases:
LinearOperator
- __init__(*args, **kwargs)
- asynchronous
asynchronous: ‘BOOL_t’
- diagonal
- doDistribute
doDistribute: ‘BOOL_t’
- keepDistributedResult
keepDistributedResult: ‘BOOL_t’
- tempMemY
tempMemY: ‘REAL_t[::1]’
- class PyNucleus_fem.distributed_operators.RowDistributedOperator(CSR_LinearOperator localMat, Comm comm, DoFMap dm, DoFMap local_dm, CSR_LinearOperator lclR, CSR_LinearOperator lclP)
Bases:
LinearOperator
Extracts the local parts of a matrix and creates a row-distributed operator.
- __init__(*args, **kwargs)
- comm
comm: mpi4py.MPI.Comm
- diagonal
- dm
dm: PyNucleus_fem.DoFMaps.DoFMap
- lclP
lclP: PyNucleus_base.linear_operators.LinearOperator
- lclR
lclR: PyNucleus_base.linear_operators.LinearOperator
- lcl_dm
lcl_dm: PyNucleus_fem.DoFMaps.DoFMap
- localMat
localMat: PyNucleus_base.linear_operators.CSR_LinearOperator
PyNucleus_fem.femCy module
- class PyNucleus_fem.femCy.CahnHilliard_F
Bases:
multi_function
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.CahnHilliard_F_prime
Bases:
multi_function
- __init__(*args, **kwargs)
- PyNucleus_fem.femCy.assembleCurlCurl(meshBase mesh, DoFMap dm, vector_t boundary_data=None, vector_t rhs_contribution=None, LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1, BOOL_t sss_format=False, BOOL_t reorder=False, function diffusivity=None, INDEX_t[::1] cellIndices=None)
- PyNucleus_fem.femCy.assembleDiscreteCurl(meshBase mesh, DoFMap DoFMap1, DoFMap DoFMap2, LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1)
- PyNucleus_fem.femCy.assembleDiscreteGradient(meshBase mesh, DoFMap DoFMap1, DoFMap DoFMap2, LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1)
- PyNucleus_fem.femCy.assembleDrift(DoFMap dm, vectorFunction coeff, LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1, INDEX_t[::1] cellIndices=None)
- PyNucleus_fem.femCy.assembleJumpMatrix(meshBase mesh, P0_DoFMap dm)
- PyNucleus_fem.femCy.assembleMass(DoFMap dm, vector_t boundary_data=None, vector_t rhs_contribution=None, LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1, BOOL_t sss_format=False, BOOL_t reorder=False, INDEX_t[::1] cellIndices=None, coefficient=None, simplexQuadratureRule qr=None)
- PyNucleus_fem.femCy.assembleMassNonSym(meshBase mesh, DoFMap DoFMap1, DoFMap DoFMap2, LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1)
- PyNucleus_fem.femCy.assembleMatrix(meshBase mesh, DoFMap dm, local_matrix_t local_matrix, vector_t boundary_data=None, vector_t rhs_contribution=None, LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1, BOOL_t sss_format=False, BOOL_t reorder=False, INDEX_t[::1] cellIndices=None)
- PyNucleus_fem.femCy.assembleNonSymMatrix_CSR(meshBase mesh, local_matrix_t local_matrix, DoFMap DoFMap1, DoFMap DoFMap2, CSR_LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1, INDEX_t[::1] cellIndices=None, BOOL_t symLocalMatrix=False)
- PyNucleus_fem.femCy.assembleNonlinearity(meshBase mesh, multi_function fun, DoFMap dm, multi_fe_vector U)
- PyNucleus_fem.femCy.assembleRHS(signatures, args, kwargs, defaults, _fused_sigindex={})
- PyNucleus_fem.femCy.assembleRHScomplex(complexFunction fun, DoFMap dm, simplexQuadratureRule qr=None)
- PyNucleus_fem.femCy.assembleRHSfromFEfunction(meshBase mesh, vector_t u, DoFMap dm, DoFMap target, simplexQuadratureRule qr=None)
- PyNucleus_fem.femCy.assembleRHSgrad(signatures, args, kwargs, defaults, _fused_sigindex={})
- PyNucleus_fem.femCy.assembleStiffness(DoFMap dm, vector_t boundary_data=None, vector_t rhs_contribution=None, LinearOperator A=None, INDEX_t start_idx=-1, INDEX_t end_idx=-1, BOOL_t sss_format=False, BOOL_t reorder=False, diffusivity=None, INDEX_t[::1] cellIndices=None, DoFMap dm2=None, simplexQuadratureRule qr=None)
- PyNucleus_fem.femCy.assembleSurfaceMass(meshBase mesh, meshBase surface, DoFMap volumeDoFMap, LinearOperator A=None, BOOL_t sss_format=False, BOOL_t reorder=False, BOOL_t compress=False)
- class PyNucleus_fem.femCy.brusselator(B=0.025, Q=0.06)
Bases:
multi_function
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.curlcurl_2d_sym
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.curlcurl_2d_sym_N1e
Bases:
curlcurl_2d_sym
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.div_div_2d
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.drift_1d
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.drift_1d_P1(vectorFunction coeff)
Bases:
drift_1d
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.drift_2d
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.drift_2d_P1(vectorFunction coeff)
Bases:
drift_2d
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.elasticity_1d_P1(REAL_t lam, REAL_t mu)
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.elasticity_2d_P1(REAL_t lam, REAL_t mu)
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.elasticity_3d_P1(REAL_t lam, REAL_t mu)
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- PyNucleus_fem.femCy.getSurfaceDoFMap(meshBase mesh, meshBase surface, DoFMap volumeDoFMap, INDEX_t[::1] boundaryCells=None)
- PyNucleus_fem.femCy.getSurfaceToVolumeProlongation(DoFMap dmVolume, DoFMap dmSurface)
- class PyNucleus_fem.femCy.gray_scott(F=0.025, k=0.06)
Bases:
multi_function
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.gray_scott_gradient(F=0.025, k=0.06)
Bases:
multi_function
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.local_matrix_t(INDEX_t dim)
Bases:
object
- __call__(*args, **kwargs)
Call self as a function.
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.mass_1d
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.mass_1d_sym_scalar_anisotropic
Bases:
mass_quadrature_matrix
- class PyNucleus_fem.femCy.mass_2d
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.mass_2d_sym_scalar_anisotropic
Bases:
mass_quadrature_matrix
- class PyNucleus_fem.femCy.mass_3d
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.mass_3d_sym_scalar_anisotropic
Bases:
mass_quadrature_matrix
- class PyNucleus_fem.femCy.mass_quadrature_matrix(function diffusivity, DoFMap dm, simplexQuadratureRule qr)
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.matrixFreeOperator(meshBase mesh, DoFMap dm, local_matrix_t local_matrix)
Bases:
LinearOperator
- __init__(*args, **kwargs)
- property diagonal
matrixFreeOperator.get_diagonal(self)
- get_diagonal(self)
- class PyNucleus_fem.femCy.multi_function(numInputs, numOutputs)
Bases:
object
- __call__(*args, **kwargs)
Call self as a function.
- __init__(*args, **kwargs)
- numInputs
numInputs: ‘INDEX_t’
- numOutputs
numOutputs: ‘INDEX_t’
- class PyNucleus_fem.femCy.power(k=2.)
Bases:
multi_function
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.scalar_coefficient_stiffness_1d_sym_P1(function diffusivity, simplexQuadratureRule qr=None)
Bases:
stiffness_quadrature_matrix
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.scalar_coefficient_stiffness_1d_sym_P2(function diffusivity, simplexQuadratureRule qr=None)
Bases:
stiffness_quadrature_matrix
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.scalar_coefficient_stiffness_2d_sym_P1(function diffusivity, simplexQuadratureRule qr=None)
Bases:
stiffness_quadrature_matrix
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.scalar_coefficient_stiffness_2d_sym_P2(function diffusivity, simplexQuadratureRule qr=None)
Bases:
stiffness_quadrature_matrix
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.scalar_coefficient_stiffness_3d_sym_P1(function diffusivity, simplexQuadratureRule qr=None)
Bases:
stiffness_quadrature_matrix
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.scalar_coefficient_stiffness_3d_sym_P2(function diffusivity, simplexQuadratureRule qr=None)
Bases:
stiffness_quadrature_matrix
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.simplexComputations
Bases:
object
- evalSimplexVolumeGradientsInnerProducts_py(self, REAL_t[:, ::1] simplex)
- evalVolumeGradientsInnerProducts_py(self)
- evalVolumeGradients_py(self)
- evalVolume_py(self)
- setSimplex_py(self, REAL_t[:, ::1] simplex)
- class PyNucleus_fem.femCy.simplexComputations1D
Bases:
simplexComputations
- class PyNucleus_fem.femCy.simplexComputations2D
Bases:
simplexComputations
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.simplexComputations3D
Bases:
simplexComputations
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.stiffness_1d_in_2d_sym_P1
Bases:
stiffness_2d_sym
- class PyNucleus_fem.femCy.stiffness_1d_in_2d_sym_P2
Bases:
stiffness_2d_sym
- class PyNucleus_fem.femCy.stiffness_1d_in_3d_sym_P1
Bases:
stiffness_3d_sym
- class PyNucleus_fem.femCy.stiffness_1d_sym
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.stiffness_1d_sym_P1
Bases:
stiffness_1d_sym
- class PyNucleus_fem.femCy.stiffness_1d_sym_P2
Bases:
stiffness_1d_sym
- class PyNucleus_fem.femCy.stiffness_1d_sym_P3
Bases:
stiffness_1d_sym
- class PyNucleus_fem.femCy.stiffness_2d_in_3d_sym_P1
Bases:
stiffness_3d_sym
- class PyNucleus_fem.femCy.stiffness_2d_in_3d_sym_P2
Bases:
stiffness_3d_sym
- class PyNucleus_fem.femCy.stiffness_2d_sym
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.stiffness_2d_sym_P1
Bases:
stiffness_2d_sym
- class PyNucleus_fem.femCy.stiffness_2d_sym_P2
Bases:
stiffness_2d_sym
- class PyNucleus_fem.femCy.stiffness_2d_sym_P3
Bases:
stiffness_2d_sym
- class PyNucleus_fem.femCy.stiffness_2d_sym_anisotropic2_P1(REAL_t alpha, REAL_t beta, REAL_t theta)
Bases:
stiffness_2d_sym
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.stiffness_2d_sym_anisotropic3_P1(matrixFunction K)
Bases:
stiffness_2d_sym
- __init__(*args, **kwargs)
- diffusivity
diffusivity: ‘REAL_t[:, ::1]’
- class PyNucleus_fem.femCy.stiffness_2d_sym_anisotropic_P1(diffusivity)
Bases:
stiffness_2d_sym
- K
K: ‘REAL_t[:, ::1]’
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.stiffness_3d_sym
Bases:
local_matrix_t
- __init__(*args, **kwargs)
- class PyNucleus_fem.femCy.stiffness_3d_sym_P1
Bases:
stiffness_3d_sym
- class PyNucleus_fem.femCy.stiffness_3d_sym_P2
Bases:
stiffness_3d_sym
- class PyNucleus_fem.femCy.stiffness_3d_sym_P3
Bases:
stiffness_3d_sym
- class PyNucleus_fem.femCy.stiffness_quadrature_matrix(function diffusivity, simplexQuadratureRule qr)
Bases:
mass_quadrature_matrix
- __init__(*args, **kwargs)
PyNucleus_fem.functions module
- class PyNucleus_fem.functions.affineFunction(REAL_t[::1] w, REAL_t c)
Bases:
function
- __init__(*args, **kwargs)
- c
c: ‘REAL_t’
- w
w: ‘REAL_t[::1]’
- class PyNucleus_fem.functions.complexFunction
Bases:
object
- __call__(*args, **kwargs)
Call self as a function.
- class PyNucleus_fem.functions.complexLambda(fun)
Bases:
complexFunction
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.complexMulFunction(complexFunction f, double complex fac)
Bases:
complexFunction
- __init__(*args, **kwargs)
- f
f: PyNucleus_fem.functions.complexFunction
- fac
fac: ‘double complex’
- class PyNucleus_fem.functions.complexSumFunction(complexFunction f1, double complex fac1, complexFunction f2, double complex fac2)
Bases:
complexFunction
- __init__(*args, **kwargs)
- f1
f1: PyNucleus_fem.functions.complexFunction
- f2
f2: PyNucleus_fem.functions.complexFunction
- fac1
fac1: ‘double complex’
- fac2
fac2: ‘double complex’
- class PyNucleus_fem.functions.componentVectorFunction(list components)
Bases:
vectorFunction
- __init__(*args, **kwargs)
- components
components: list
- class PyNucleus_fem.functions.constant(REAL_t value)
Bases:
function
- __init__(*args, **kwargs)
- value
value: ‘REAL_t’
- class PyNucleus_fem.functions.constantMatrixFunction(REAL_t[:, ::1] A)
Bases:
matrixFunction
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.expDiffusivity(REAL_t growth, REAL_t frequency)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.fractalDiffusivity(REAL_t maxVal, REAL_t offset)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.function
Bases:
object
- __call__(*args, **kwargs)
Call self as a function.
- class PyNucleus_fem.functions.inclusionsHong(epsilon=0.1)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.indicatorFunctor(function f, function indicator, REAL_t threshold=1e-9)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.logDiffusion1D(REAL_t[::1] c)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.logDiffusion2D(REAL_t[:, ::1] c)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.lookupFunction1D(REAL_t[:, ::1] coords, REAL_t[::1] vals)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.lookupFunctionTensor1DNew(REAL_t[:, ::1] coordsX, REAL_t[::1] vals, INDEX_t N)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.lookupFunctionTensor2D(REAL_t[:, ::1] coordsX, REAL_t[:, ::1] coordsY, REAL_t[:, ::1] vals)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.lookupFunctionTensor2DNew(REAL_t[:, ::1] coordsX, REAL_t[:, ::1] coordsY, REAL_t[:, ::1] vals, INDEX_t N)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.lookupFunctionTensor2DNewSym(REAL_t[::1] coordsX, REAL_t[::1] coordsY, REAL_t[:, ::1] vals)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.lookupFunctionTensor3D(REAL_t[:, ::1] coordsX, REAL_t[:, ::1] coordsY, REAL_t[:, ::1] coordsZ, REAL_t[:, :, ::1] vals)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.lookupFunctionTensor3DNew(REAL_t[:, ::1] coordsX, REAL_t[:, ::1] coordsY, REAL_t[:, ::1] coordsZ, REAL_t[:, :, ::1] vals, INDEX_t N)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.lookupFunctionTensor3DNewSym(REAL_t[::1] coordsX, REAL_t[::1] coordsY, REAL_t[::1] coordsZ, REAL_t[:, :, ::1] vals)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.matrixFunction(list components, BOOL_t symmetric)
Bases:
object
- __call__(*args, **kwargs)
Call self as a function.
- __init__(*args, **kwargs)
- symmetric
symmetric: ‘BOOL_t’
- class PyNucleus_fem.functions.monomial(REAL_t[::1] exponent, REAL_t factor=1.)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.motorPermeability(epsilon=1.0 / 5200.0, thetaRotor=pi / 12.0, thetaCoil=pi / 32.0, rRotorIn=0.375, rRotorOut=0.5, rStatorIn=0.875, rStatorOut=0.52, rCoilIn=0.8, rCoilOut=0.55, nRotorOut=4, nRotorIn=8, nStatorOut=4, nStatorIn=8)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.mulFunction(function f, REAL_t fac)
Bases:
function
- __init__(*args, **kwargs)
- f
f: PyNucleus_fem.functions.function
- fac
fac: ‘REAL_t’
- class PyNucleus_fem.functions.mulVectorFunction(vectorFunction f, REAL_t fac, function g=None)
Bases:
vectorFunction
- __init__(*args, **kwargs)
- f
f: PyNucleus_fem.functions.vectorFunction
- fac
fac: ‘REAL_t’
- g
g: PyNucleus_fem.functions.function
- class PyNucleus_fem.functions.periodicityFunctor(function f, REAL_t[::1] period)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.prodFunction(function f1, function f2)
Bases:
function
- __init__(*args, **kwargs)
- f1
f1: PyNucleus_fem.functions.function
- f2
f2: PyNucleus_fem.functions.function
- class PyNucleus_fem.functions.proj(function f, tuple bounds)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.radialIndicator(REAL_t radius, REAL_t[::1] center=None)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsBoundarySingularity2D(REAL_t alpha)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsFractional1D(REAL_t s, INDEX_t n)
Bases:
function
- __init__(*args, **kwargs)
- n
n: ‘INDEX_t’
- s
s: ‘REAL_t’
- class PyNucleus_fem.functions.rhsFractional2D(REAL_t s, INDEX_t l, INDEX_t n, REAL_t angular_shift=0.)
Bases:
function
- __init__(*args, **kwargs)
- angular_shift
angular_shift: ‘REAL_t’
- l
l: ‘INDEX_t’
- n
n: ‘INDEX_t’
- s
s: ‘REAL_t’
- class PyNucleus_fem.functions.rhsFractional2Dcombination(REAL_t s, params)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsFractionalBrusselator_U(REAL_t s1, REAL_t s2, REAL_t B, REAL_t Q, REAL_t eta, INDEX_t dim, REAL_t t, REAL_t radius=1.0)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsFractionalBrusselator_V(REAL_t s1, REAL_t s2, REAL_t B, REAL_t Q, REAL_t eta, INDEX_t dim, REAL_t t, REAL_t radius=1.0)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsFunCos2DNonlinear(REAL_t t, REAL_t k=2.)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsFunCos2DNonlinear_U(REAL_t t, REAL_t k=2.)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsFunCos2DNonlinear_V(REAL_t t, REAL_t k=2.)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsFunSource1D(REAL_t a, REAL_t b)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsFunSource2D(REAL_t[::1] a, REAL_t r)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsHr1D(REAL_t r, REAL_t scaling=1.)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsHr2D(REAL_t r, REAL_t scaling=1.)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsHr2Ddisk(REAL_t r, REAL_t scaling=1.)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsHr3D(REAL_t r, REAL_t scaling=1.)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsMotor(coilPairOn=[0, 1, 2])
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsTestFractional_U(REAL_t s, INDEX_t dim, REAL_t t, REAL_t radius=1.0)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsTestFractional_V(REAL_t s, INDEX_t dim, REAL_t t, REAL_t radius=1.0)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsTestGrayScott2D_U(REAL_t k, REAL_t F, REAL_t Du, REAL_t Dv, REAL_t t)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.rhsTestGrayScott2D_V(REAL_t k, REAL_t F, REAL_t Du, REAL_t Dv, REAL_t t)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.shiftScaleFunctor(function f, REAL_t[::1] shift, REAL_t[::1] scaling)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.simpleAnisotropy(epsilon=0.1)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.simpleAnisotropy2(epsilon=0.1)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.solBoundarySingularity2D(REAL_t alpha)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.solFractional(REAL_t s, INDEX_t dim, REAL_t radius=1.0)
Bases:
function
- __init__(*args, **kwargs)
- s
s: ‘REAL_t’
- class PyNucleus_fem.functions.solFractional1D(REAL_t s, INDEX_t n)
Bases:
function
- __init__(*args, **kwargs)
- n
n: ‘INDEX_t’
- s
s: ‘REAL_t’
- class PyNucleus_fem.functions.solFractional2D(REAL_t s, INDEX_t l, INDEX_t n, REAL_t angular_shift=0.)
Bases:
function
- __init__(*args, **kwargs)
- angular_shift
angular_shift: ‘REAL_t’
- l
l: ‘INDEX_t’
- n
n: ‘INDEX_t’
- s
s: ‘REAL_t’
- class PyNucleus_fem.functions.solFractional2Dcombination(REAL_t s, params)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.solFractionalDerivative(REAL_t s, INDEX_t dim, REAL_t radius=1.0)
Bases:
function
- __init__(*args, **kwargs)
- s
s: ‘REAL_t’
- class PyNucleus_fem.functions.sphericalIntegral(function f, INDEX_t dim, REAL_t radius, INDEX_t numQuadNodes)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.sqrtAffineFunction(REAL_t[::1] w, REAL_t c)
Bases:
function
- __init__(*args, **kwargs)
- c
c: ‘REAL_t’
- w
w: ‘REAL_t[::1]’
- class PyNucleus_fem.functions.squareIndicator(REAL_t[::1] a, REAL_t[::1] b)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.sumFunction(function f1, REAL_t fac1, function f2, REAL_t fac2)
Bases:
function
- __init__(*args, **kwargs)
- f1
f1: PyNucleus_fem.functions.function
- f2
f2: PyNucleus_fem.functions.function
- fac1
fac1: ‘REAL_t’
- fac2
fac2: ‘REAL_t’
- class PyNucleus_fem.functions.sumVectorFunction(vectorFunction f1, REAL_t fac1, vectorFunction f2, REAL_t fac2)
Bases:
vectorFunction
- __init__(*args, **kwargs)
- f1
f1: PyNucleus_fem.functions.vectorFunction
- f2
f2: PyNucleus_fem.functions.vectorFunction
- fac1
fac1: ‘REAL_t’
- fac2
fac2: ‘REAL_t’
- class PyNucleus_fem.functions.vectorFunction(INDEX_t numComponents)
Bases:
object
- __call__(*args, **kwargs)
Call self as a function.
- __init__(*args, **kwargs)
- norm(self)
- rows
rows: ‘INDEX_t’
- class PyNucleus_fem.functions.vectorNorm(vectorFunction vecFun)
Bases:
function
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.waveFunction(REAL_t[::1] waveVector)
Bases:
complexFunction
- __init__(*args, **kwargs)
- class PyNucleus_fem.functions.wrapRealToComplexFunction(function fun)
Bases:
complexFunction
- __init__(*args, **kwargs)
PyNucleus_fem.mesh module
- PyNucleus_fem.mesh.uniformSquare(N=2, M=None, ax=0, ay=0, bx=1, by=1, crossed=False, preserveLinesHorizontal=[], preserveLinesVertical=[], xVals=None, yVals=None)[source]
- PyNucleus_fem.mesh.doubleIntervalWithInteractions(a=0.0, b=1.0, c=2.0, horizon1=0.1, horizon2=0.2, h=None)[source]
- PyNucleus_fem.mesh.squareWithInteractions(ax, ay, bx, by, horizon, h=None, uniform=False, strictInteraction=True, innerRadius=-1, preserveLinesHorizontal=[], preserveLinesVertical=[], **kwargs)[source]
- PyNucleus_fem.mesh.doubleSquareWithInteractions(ax=0.0, ay=0.0, bx=1.0, by=1.0, cx=2.0, cy=1.0, horizon1=0.1, horizon2=0.2, h=None, returnSketch=False, **kwargs)[source]
- PyNucleus_fem.mesh.doubleSquareWithInteractionsCorners(ax=0.0, ay=0.0, bx=1.0, by=1.0, cx=2.0, cy=1.0, horizon1=0.1, horizon2=0.2, h=None, returnSketch=False, **kwargs)[source]
- PyNucleus_fem.mesh.discWithInteraction(radius, horizon, h=0.25, max_volume=None, projectNodeToOrigin=True)[source]
- PyNucleus_fem.mesh.gradedDiscWithInteraction(radius, horizon, mu=2.0, h=0.25, max_volume=None, projectNodeToOrigin=True)[source]
- PyNucleus_fem.mesh.discWithIslands(horizon=0.0, radius=1.0, islandOffCenter=0.35, islandDiam=0.5)[source]
- PyNucleus_fem.mesh.boxWithInteractions(horizon, ax=0.0, ay=0.0, az=0.0, bx=1.0, by=1.0, bz=1.0, Nx=2, Ny=2, Nz=2)[source]
- PyNucleus_fem.mesh.circle(n, radius=1.0, returnFacets=False, projectNodeToOrigin=True, **kwargs)[source]
- PyNucleus_fem.mesh.circleWithInnerRadius(n, radius=2.0, innerRadius=1.0, returnFacets=False, **kwargs)[source]
- PyNucleus_fem.mesh.squareWithCircularCutout(ax=-3.0, ay=-3.0, bx=3.0, by=3.0, radius=1.0, num_points_per_unit_len=2)[source]
- PyNucleus_fem.mesh.boxWithBallCutout(ax=-3.0, ay=-3.0, az=-3.0, bx=3.0, by=3.0, bz=3.0, radius=1.0, points=4, radial_subdiv=None, **kwargs)[source]
- PyNucleus_fem.mesh.double_graded_interval(h, mu_ll=2.0, mu_rr=2.0, mu_lr=None, mu_rl=None, a=-1.0, b=1.0)[source]
- PyNucleus_fem.mesh.double_graded_interval_with_interaction(horizon, h=None, mu_ll=2.0, mu_rr=2.0, mu_lr=None, mu_rl=None, a=-1.0, b=1.0)[source]
- PyNucleus_fem.mesh.double_graded_circle(M, muInterior=2.0, muExterior=2.0, rInterior=1.0, rExterior=2.0, returnFacets=False, **kwargs)[source]
- PyNucleus_fem.mesh.cutoutCircle(n, radius=1.0, cutoutAngle=1.5707963267948966, returnFacets=False, minAngle=30, **kwargs)[source]
- PyNucleus_fem.mesh.dumbbell(n=8, radius=1.0, barAngle=0.7853981633974483, barLength=3, returnFacets=False, minAngle=30, **kwargs)[source]
- PyNucleus_fem.mesh.wrench(n=8, radius=0.17, radius2=0.3, barLength=2, returnFacets=False, minAngle=30, **kwargs)[source]
- PyNucleus_fem.mesh.ball(radius=1.0, points=4, radial_subdiv=None, **kwargs)[source]
Build mesh for 3D ball as surface of revolution. points determines the number of points on the curve. radial_subdiv determines the number of steps in the rotation.
- PyNucleus_fem.mesh.gradeUniformBall(mesh, muInterior=2.0, muExterior=2.0, rInterior=1.0, rExterior=None, rExteriorInitial=None)[source]
- class PyNucleus_fem.mesh.meshNd(vertices, cells)[source]
Bases:
meshBase
- property boundaryVertices
- property boundaryEdges
- property boundaryFaces
- property boundaryCells
- property interiorVertices
- property diam
- property boundaryVertexTags
- property boundaryEdgeTags
- property boundaryFaceTags
- property surface
- class PyNucleus_fem.mesh.mesh1d(vertices, cells)[source]
Bases:
meshNd
- class PyNucleus_fem.mesh.mesh2d(vertices, cells)[source]
Bases:
meshNd
2D mesh
Attributes: vertices cells boundaryVertices boundaryEdges boundaryVertexTags boundaryEdgeTags
- getInteriorMap(tag)[source]
Returns a map from the vertex numbers of the mesh to the interior vertices.
- class PyNucleus_fem.mesh.mesh3d(vertices, cells)[source]
Bases:
meshNd
3D mesh
Attributes: vertices cells boundaryVertices boundaryEdges boundaryFaces boundaryVertexTags boundaryEdgeTags boundaryFaceTags
- PyNucleus_fem.mesh.stitchSubdomains(subdomains, overlapManagers, returnR=False, ncs=None)[source]
Stitch subdomains together. Works for 2D.
- PyNucleus_fem.mesh.stitchSolutions(global_mesh, DoFMaps, localCellLookup, solutions, tag=0)[source]
- PyNucleus_fem.mesh.getMappingToGlobalDoFMap(mesh, meshOverlaps, DoFMap, comm=None, collectRank=0, tag=0)[source]
- PyNucleus_fem.mesh.accumulate2global(mesh, meshOverlaps, DoFMap, vec, comm=None, collectRank=0, tag=0)[source]
Send subdomain meshes and solutions to root node, stitch together meshes and solution. Assumes that solution is already accumulated.
PyNucleus_fem.meshConstruction module
- class PyNucleus_fem.meshConstruction.segment(points, facets, holes=[])[source]
Bases:
object
- property num_points
- property num_facets
- property num_holes
- property num_mesh_transformations
- class PyNucleus_fem.meshConstruction.circularSegment(center, radius, start_angle, stop_angle, num_points_per_unit_len=None, num_points=None)[source]
Bases:
segment
- class PyNucleus_fem.meshConstruction.circle(center, radius, num_points_per_unit_len=None, num_points=None)[source]
Bases:
circularSegment
- class PyNucleus_fem.meshConstruction.line(start, end, num_points=None, num_points_per_unit_len=None)[source]
Bases:
segment
- PyNucleus_fem.meshConstruction.polygon(points, doClose=True, num_points=None, num_points_per_unit_len=None)[source]
PyNucleus_fem.meshCy module
- PyNucleus_fem.meshCy.boundaryEdges(INDEX_t[:, ::1] cells, BOOL_t returnBoundaryCells=False)
- PyNucleus_fem.meshCy.boundaryEdgesFromBoundaryFaces(INDEX_t[:, ::1] bfaces)
- PyNucleus_fem.meshCy.boundaryFaces(INDEX_t[:, ::1] cells)
- PyNucleus_fem.meshCy.boundaryFacesWithOrientation(REAL_t[:, ::1] vertices, INDEX_t[:, ::1] cells)
- PyNucleus_fem.meshCy.boundaryVertices(INDEX_t[:, ::1] cells)
- PyNucleus_fem.meshCy.boundaryVerticesFromBoundaryEdges(INDEX_t[:, ::1] bedges)
- class PyNucleus_fem.meshCy.cellFinder(meshBase mesh, INDEX_t numCandidates=-1)
Bases:
object
- __init__(*args, **kwargs)
- bary
bary: ‘REAL_t[::1]’
- simplex
simplex: ‘REAL_t[:, ::1]’
- class PyNucleus_fem.meshCy.cellFinder2(meshBase mesh)
Bases:
object
- __init__(*args, **kwargs)
- findCell_py(self, REAL_t[::1] vertex)
- PyNucleus_fem.meshCy.decode_edge_python(ENCODE_t encodeVal)
- PyNucleus_fem.meshCy.encode_edge_python(INDEX_t[::1] e)
- PyNucleus_fem.meshCy.encode_face_python(INDEX_t[::1] f)
- class PyNucleus_fem.meshCy.faceVals(INDEX_t num_dofs, uint8_t initial_length=0, uint8_t length_inc=3, BOOL_t deleteHits=True)
Bases:
object
- __init__(*args, **kwargs)
- PyNucleus_fem.meshCy.getSubmesh(meshBase mesh, INDEX_t[::1] selectedCells)
- PyNucleus_fem.meshCy.getSubmesh2(mesh, INDEX_t[::1] newCellIndices, INDEX_t num_cells=-1)
- class PyNucleus_fem.meshCy.gradedHypercubeTransformer(factor=0.4)
Bases:
meshTransformer
- __call__(*args, **kwargs)
Call self as a function.
- __init__(*args, **kwargs)
- class PyNucleus_fem.meshCy.gradedMeshTransformer(REAL_t mu=2., mu2=None, REAL_t radius=1.)
Bases:
meshTransformer
- __call__(*args, **kwargs)
Call self as a function.
- __init__(*args, **kwargs)
- PyNucleus_fem.meshCy.hdeltaCy(meshBase mesh)
- class PyNucleus_fem.meshCy.meshBase(vertices_t vertices, cells_t cells)
Bases:
object
- __init__(*args, **kwargs)
- cells
cells: ‘cells_t’
- cells_as_array
- copy(self)
- delta
- dim
- getCellCenters(self)
- getCellConnectivity(self, INDEX_t common_nodes=-1)
- getProjectedCenters(self)
- getSimplex_py(self, INDEX_t cellIdx, REAL_t[:, ::1] simplex)
- h
- hVector
- hmin
- init(self)
- manifold_dim
- num_cells
- num_vertices
- refine(self, BOOL_t returnLookup=False, BOOL_t sortRefine=False)
- removeUnusedVertices(self)
- resetMeshInfo(self)
- setMeshTransformation(self, meshTransformer transformer)
- simplexMapper
simplexMapper: PyNucleus_fem.simplexMapper.simplexMapper
- sizeInBytes
- transformer
transformer: PyNucleus_fem.meshCy.meshTransformer
- vertexInCell_py(self, REAL_t[::1] vertex, INDEX_t cellNo, REAL_t tol=0.)
- vertices
vertices: ‘vertices_t’
- vertices_as_array
- volVector
- volume
- class PyNucleus_fem.meshCy.meshTransformer
Bases:
object
- __call__(*args, **kwargs)
Call self as a function.
- __init__(*args, **kwargs)
- class PyNucleus_fem.meshCy.multiIntervalMeshTransformer(list intervals)
Bases:
meshTransformer
- __call__(*args, **kwargs)
Call self as a function.
- __init__(*args, **kwargs)
- PyNucleus_fem.meshCy.newBoundaryAndTags3D(dict lookup, INDEX_t[::1] boundaryVertices, INDEX_t[:, ::1] boundaryEdges, INDEX_t[:, ::1] boundaryFaces, TAG_t[::1] boundaryEdgeTags, TAG_t[::1] boundaryFaceTags)
- PyNucleus_fem.meshCy.radialMeshTransformation(mesh, dict lookup)
- class PyNucleus_fem.meshCy.radialMeshTransformer(REAL_t radius=0.)
Bases:
meshTransformer
- __call__(*args, **kwargs)
Call self as a function.
- __init__(*args, **kwargs)
- PyNucleus_fem.meshCy.refineCy1D(const REAL_t[:, ::1] vertices, const INDEX_t[:, ::1] cells)
- PyNucleus_fem.meshCy.refineCy2DedgeVals(const REAL_t[:, ::1] vertices, const INDEX_t[:, ::1] cells)
- PyNucleus_fem.meshCy.refineCy2Dhash(const REAL_t[:, ::1] vertices, const INDEX_t[:, ::1] cells)
- PyNucleus_fem.meshCy.refineCy2Dsort(const REAL_t[:, ::1] vertices, const INDEX_t[:, ::1] cells)
- PyNucleus_fem.meshCy.refineCy3DedgeVals(const REAL_t[:, ::1] vertices, const INDEX_t[:, ::1] cells)
- PyNucleus_fem.meshCy.sortEdge_py(INDEX_t c0, INDEX_t c1, INDEX_t[::1] e)
- PyNucleus_fem.meshCy.sortFace_py(INDEX_t c0, INDEX_t c1, INDEX_t c2, INDEX_t[::1] f)
PyNucleus_fem.meshOverlaps module
- exception PyNucleus_fem.meshOverlaps.NotFound
Bases:
Exception
- PyNucleus_fem.meshOverlaps.boundary1D(meshBase mesh)
- PyNucleus_fem.meshOverlaps.boundary2D(meshBase mesh, BOOL_t assumeConnected=True)
- PyNucleus_fem.meshOverlaps.boundary3D(meshBase mesh, BOOL_t assumeConnected=True)
- class PyNucleus_fem.meshOverlaps.dofChecker
Bases:
object
- class PyNucleus_fem.meshOverlaps.dofCheckerArray(INDEX_t num_dofs)
Bases:
dofChecker
- __init__(*args, **kwargs)
- class PyNucleus_fem.meshOverlaps.dofCheckerSet
Bases:
dofChecker
- __init__(*args, **kwargs)
- PyNucleus_fem.meshOverlaps.extendOverlap(meshBase subdomain, interfaces, interiorBL, depth, comm, debug=False)
- PyNucleus_fem.meshOverlaps.getBoundaryCells(meshBase subdomain, interface, simplexMapper sM, dict v2c)
- PyNucleus_fem.meshOverlaps.getMeshOverlapsWithOtherPartition(INDEX_t dim, INDEX_t myRank, Comm comm, INDEX_t[::1] localCellNos, INDEX_t[::1] partitions)
- class PyNucleus_fem.meshOverlaps.interfaceManager(Comm comm)
Bases:
sharedMeshManager
- __init__(*args, **kwargs)
- copy(self)
- getInterfaces(self)
- property interfaces
interfaceManager.getInterfaces(self)
- setInterfaces(self, interfaces)
- class PyNucleus_fem.meshOverlaps.meshInterface(INDEX_t[:, ::1] vertices, INDEX_t[:, ::1] edges, INDEX_t[:, ::1] faces, INDEX_t mySubdomainNo, INDEX_t otherSubdomainNo, INDEX_t dim)
Bases:
sharedMesh
- __init__(*args, **kwargs)
- class PyNucleus_fem.meshOverlaps.meshOverlap(INDEX_t[::1] cells, INDEX_t mySubdomainNo, INDEX_t otherSubdomainNo, INDEX_t dim)
Bases:
sharedMesh
- __init__(*args, **kwargs)
- class PyNucleus_fem.meshOverlaps.overlapManager(Comm comm)
Bases:
sharedMeshManager
- __init__(*args, **kwargs)
- check(self, mesh, comm, label='Mesh overlap')
- copy(self)
- getOverlaps(self)
- property overlaps
overlapManager.getOverlaps(self)
- setOverlaps(self, overlaps)
Bases:
object
cells: ‘INDEX_t[::1]’
dim: ‘INDEX_t’
edges: ‘INDEX_t[:, ::1]’
faces: ‘INDEX_t[:, ::1]’
Returns a list of shared vertices, i.e. vertices that are on shared faces, edges as well.
mySubdomainNo: ‘INDEX_t’
sharedMesh.get_num_cells(self)
sharedMesh.get_num_edges(self)
sharedMesh.get_num_faces(self)
sharedMesh.get_num_vertices(self)
otherSubdomainNo: ‘INDEX_t’
vertices: ‘INDEX_t[:, ::1]’
Bases:
object
comm: mpi4py.MPI.Comm
numSubdomains: ‘INDEX_t’
requests: list
sharedMeshes: dict
Bases:
object
managers: list
- PyNucleus_fem.meshOverlaps.updateBoundary1D(INDEX_t[:, ::1] cells, INDEX_t[::1] oldVertices)
- PyNucleus_fem.meshOverlaps.updateBoundary2D(INDEX_t[:, ::1] cells, INDEX_t[:, ::1] oldEdges, INDEX_t[::1] oldVertices)
- PyNucleus_fem.meshOverlaps.updateBoundary3D(INDEX_t[:, ::1] cells, INDEX_t[:, ::1] oldFaces, INDEX_t[:, ::1] oldEdges, INDEX_t[::1] oldVertices)
- class PyNucleus_fem.meshOverlaps.vertexMap(meshBase mesh, sharedMesh interface)
Bases:
object
- __init__(*args, **kwargs)
- dim
dim: ‘INDEX_t’
- local2overlap
local2overlap: dict
- num_interface_vertices
num_interface_vertices: ‘INDEX_t’
- num_vertices
num_vertices: ‘INDEX_t’
- overlap2local
overlap2local: dict
- translateLocal2Overlap(self, data)
- translateOverlap2Local(self, data, INDEX_t offset=0)
- class PyNucleus_fem.meshOverlaps.vertexMapManager(mesh, interfaceManager, mySubdomainNo)
Bases:
object
- __init__(self, meshBase mesh, interfaceManager, mySubdomainNo)
- addCells(self, cells, subdomainNo, numberCellswithoutLastLevel)
- addVertex(self, vertex, subdomainNo)
- getVertexByLocalIndex(self, localIndex)
- getVertexByOverlapIndex(self, subdomainNo, overlapIndex)
- removeDuplicateVertices(self)
- translateLocal2Overlap(self, sharedCells, subdomainNo, track=True)
- writeOverlapToMesh(self)
PyNucleus_fem.meshPartitioning module
- exception PyNucleus_fem.meshPartitioning.PartitionerException
Bases:
Exception
- class PyNucleus_fem.meshPartitioning.dofPartitioner(A=None, dm=None, matrixPower=1)
Bases:
object
- __init__(self, LinearOperator A=None, dm=None, INDEX_t matrixPower=1)
- inversePartitionDofs(self, numPartitions)
Split the DoFs into numPartitions partitions. Return a sparse graph that contains the map partitionNo -> [dofNo]
- partitionDofs(self, numPartitions)
- class PyNucleus_fem.meshPartitioning.meshPartitioner(mesh)
Bases:
object
- __init__(self, mesh)
- inversePartitionCells(self, numPartitions)
Split the cells into numPartitions partitions. Return a sparse graph that contains the map partitionNo -> [cellNo]
- inversePartitionVertices(self, numPartitions)
Split the vertices into numPartitions partitions. Return a sparse graph that contains the map partitionNo -> [vertexNo]
- partitionCells(self, numPartitions, partition_weights=None)
Split the cells into numPartitions partitions. If inverse is False, return a vector that contains the map cellNo -> partitionNo. If inverse is True, return a sparse graph that contains the map partitionNo -> [cellNo]
- partitionVertices(self, numPartitions)
Split the vertices into numPartitions partitions. Return a vector that contains the map vertexNo -> partitionNo.
- class PyNucleus_fem.meshPartitioning.metisDofPartitioner(A=None, dm=None, matrixPower=1)
Bases:
dofPartitioner
- __call__(self, numPartitions)
- partitionDofs(self, numPartitions, ufactor=30, dofWeights=None)
- class PyNucleus_fem.meshPartitioning.metisMeshPartitioner(mesh)
Bases:
meshPartitioner
- partitionCells(self, numPartitions, inverse=False, ufactor=30, partition_weights=None)
- partitionVertices(self, numPartitions, interiorOnly=True, ufactor=30)
- PyNucleus_fem.meshPartitioning.partition2sparseGraph(const INDEX_t[::1] partition, INDEX_t numPartitions)
- class PyNucleus_fem.meshPartitioning.regularDofPartitioner(A=None, dm=None, matrixPower=1)
Bases:
dofPartitioner
- __call__(self, numPartitions)
- partitionDofs(self, numPartitions, partitionedDimensions=None, partition_weights=None, irregular=False)
- class PyNucleus_fem.meshPartitioning.regularMeshPartitioner(mesh)
Bases:
meshPartitioner
- __call__(self, numPartitions)
- partitionCells(self, numPartitions, partitionedDimensions=None, partition_weights=None)
- partitionVertices(self, INDEX_t numPartitions, interiorOnly=True, partitionedDimensions=None, partition_weights=None, irregular=False)
- class PyNucleus_fem.meshPartitioning.regularVertexPartitioner(vertices, partitionedDimensions=None, numPartitionsPerDim=None)
Bases:
vertexPartitioner
- __init__(self, REAL_t[:, ::1] vertices, partitionedDimensions=None, numPartitionsPerDim=None)
- balancePartitions(self, INDEX_t numPartitions)
- getBoundingBox(self)
- partitionDim(self, REAL_t[:, ::1] coord, INDEX_t[::1] part, INDEX_t[::1] numPartitionsPerDim, INDEX_t[::1] idx, INDEX_t d=0, INDEX_t offset=0)
- partitionVertices(self, INDEX_t numPartitions, irregular=False)
- partitionVerticesIrregular(self, INDEX_t numPartitions)
- class PyNucleus_fem.meshPartitioning.vertexPartitioner(vertices)
Bases:
object
- __init__(self, REAL_t[:, ::1] vertices)
- inversePartitionVertices(self, numPartitions)
Split the vertices into numPartitions partitions. Return a sparse graph that contains the map partitionNo -> [vertexNo]
- partitionVertices(self, INDEX_t numPartitions)
Split the vertices into numPartitions partitions. Return a vector that contains the map vertexNo -> partitionNo.
PyNucleus_fem.pdeProblems module
PyNucleus_fem.quadrature module
- class PyNucleus_fem.quadrature.Gauss(order, dim)
Bases:
quadQuadratureRule
- __init__(*args, **kwargs)
- order
order: ‘INDEX_t’
- class PyNucleus_fem.quadrature.Gauss1D(order)
Bases:
simplexQuadratureRule
- __init__(*args, **kwargs)
- order
order: ‘INDEX_t’
- class PyNucleus_fem.quadrature.Gauss2D(INDEX_t order)
Bases:
simplexQuadratureRule
- __init__(*args, **kwargs)
- order
order: ‘INDEX_t’
- class PyNucleus_fem.quadrature.Gauss3D(INDEX_t order)
Bases:
simplexQuadratureRule
- __init__(*args, **kwargs)
- order
order: ‘INDEX_t’
- class PyNucleus_fem.quadrature.GaussJacobi(order_weight_exponents)
Bases:
quadQuadratureRule
- __init__(*args, **kwargs)
- order
order: ‘INDEX_t’
- class PyNucleus_fem.quadrature.doubleSimplexQuadratureRule(simplexQuadratureRule rule1, simplexQuadratureRule rule2)
Bases:
quadratureRule
- __init__(*args, **kwargs)
- evalFun(self, function fun, const REAL_t[:, ::1] simplexVertices1, const REAL_t[:, ::1] simplexVertices2, REAL_t[::1] fun_vals) void
- integrate(self, function fun, const REAL_t[:, ::1] simplexVertices1, const REAL_t[:, ::1] simplexVertices2)
- rule1
rule1: PyNucleus_fem.quadrature.simplexQuadratureRule
- rule2
rule2: PyNucleus_fem.quadrature.simplexQuadratureRule
- class PyNucleus_fem.quadrature.quadQuadratureRule(REAL_t[:, ::1] nodes, REAL_t[::1] weights)
Bases:
quadratureRule
- __init__(*args, **kwargs)
- evalFun(self, function fun, const REAL_t[:, ::1] quadVertices, REAL_t[::1] fun_vals) void
- getQuadVolume(self, const REAL_t[:, ::1] quadVertices) REAL_t
- integrate(self, function fun, const REAL_t[:, ::1] quadVertices)
- nodesInGlobalCoords(self, const REAL_t[:, ::1] quadVertices, REAL_t[:, ::1] coords) void
- orders
orders: list
- class PyNucleus_fem.quadrature.quadratureRule(REAL_t[:, ::1] nodes, REAL_t[::1] weights, INDEX_t dim, manifold_dim=None)
Bases:
object
- __init__(*args, **kwargs)
- dim
- manifold_dim
- nodes
nodes: ‘REAL_t[:, ::1]’
- num_nodes
- weights
weights: ‘REAL_t[::1]’
- class PyNucleus_fem.quadrature.simplexDuffyTransformation(order, dim, manifold_dim=None)
Bases:
simplexQuadratureRule
- __init__(*args, **kwargs)
- class PyNucleus_fem.quadrature.simplexJaskowiecSukumar(order, dim, manifold_dim=None)
Bases:
simplexQuadratureRule
- __init__(*args, **kwargs)
- order
order: ‘INDEX_t’
- class PyNucleus_fem.quadrature.simplexQuadratureRule(REAL_t[:, ::1] nodes, REAL_t[::1] weights, INDEX_t dim, manifold_dim=None)
Bases:
quadratureRule
- __init__(*args, **kwargs)
- evalComplexFun(self, complexFunction fun, const REAL_t[:, ::1] simplexVertices, double complex[::1] fun_vals) void
- evalFun(self, function fun, const REAL_t[:, ::1] simplexVertices, REAL_t[::1] fun_vals) void
- evalVectorFun(self, vectorFunction fun, const REAL_t[:, ::1] simplexVertices, REAL_t[:, ::1] fun_vals) void
- getAllNodesInGlobalCoords(self, meshBase mesh)
- getSimplexVolume_py(self, const REAL_t[:, ::1] simplexVertices)
- integrate(self, function fun, const REAL_t[:, ::1] simplexVertices)
- nodesInGlobalCoords_py(self, const REAL_t[:, ::1] simplexVertices, REAL_t[:, ::1] coords)
- orders
orders: list
- class PyNucleus_fem.quadrature.simplexXiaoGimbutas(order, dim, manifold_dim=None)
Bases:
simplexQuadratureRule
- __init__(*args, **kwargs)
- order
order: ‘INDEX_t’
- class PyNucleus_fem.quadrature.sphericalQuadRule(REAL_t[:, ::1] vertexOffsets, REAL_t[::1] weights)
Bases:
object
- __init__(*args, **kwargs)
- num_nodes
- vertexOffsets
vertexOffsets: ‘REAL_t[:, ::1]’
- weights
weights: ‘REAL_t[::1]’
- class PyNucleus_fem.quadrature.sphericalQuadRule1D(REAL_t radius)
Bases:
sphericalQuadRule
- __init__(*args, **kwargs)
- class PyNucleus_fem.quadrature.sphericalQuadRule2D(REAL_t radius, INDEX_t numQuadNodes)
Bases:
sphericalQuadRule
- __init__(*args, **kwargs)
- class PyNucleus_fem.quadrature.transformQuadratureRule(simplexQuadratureRule qr)
Bases:
simplexQuadratureRule
- __init__(*args, **kwargs)
- setAffineBaryTransform(self, REAL_t[:, ::1] A, REAL_t[::1] b) void
- setLinearBaryTransform(self, REAL_t[:, ::1] A) void
PyNucleus_fem.repartitioner module
- class PyNucleus_fem.repartitioner.Repartitioner(meshBase subdomain, interfaceManager interfaces, Comm globalComm, Comm oldComm, Comm newComm)
Bases:
object
- __init__(*args, **kwargs)
- getCellPartition(self, partitioner='parmetis', partitionerParams={})
- getGlobalVertexIndices(self)
- getNumPartitions(self)
- getRepartitionedSubdomains(self)
- property globalVertexIndices
Repartitioner.getGlobalVertexIndices(self)
- newRankSubdomainNo(self, INDEX_t rank)
- newSubdomainGlobalRank(self, INDEX_t subdomainNo)
- property numPartitions
Repartitioner.getNumPartitions(self)
- oldRankSubdomainNo(self, INDEX_t rank)
- oldSubdomainGlobalRank(self, INDEX_t subdomainNo)
- reorderPartitioning(self)
We collect the information of how many cells f_{p,q} of which partition q are on each subdomain p. Then we solve a linear program
max_n sum_{p=1}^P sum_{q=1}^Q f_{p,q} * n_{p,q} subject to sum_q n_{p,q} = 1 forall p = 1,..,P (each subdomain gets one partition) sum_p n_{p,q} <= 1 forall q = 1,..,Q (each partition gets at most one subdomain)
PyNucleus_fem.simplexMapper module
- class PyNucleus_fem.simplexMapper.simplexMapper(mesh=None)
Bases:
object
- __init__(*args, **kwargs)
- findEdgeInCellEncoded_py(self, INDEX_t cellNo, ENCODE_t hv)
- findEdgeInCell_py(self, INDEX_t cellNo, INDEX_t[::1] edge)
- findFaceInCellEncoded_py(self, INDEX_t cellNo, tuple hv)
- findFaceInCell_py(self, INDEX_t cellNo, INDEX_t[::1] face)
- findVertexInCell_py(self, INDEX_t cellNo, INDEX_t vertexNo)
- getEdgeInCellEncoded_py(self, INDEX_t cellNo, INDEX_t edgeNo)
- getEdgeInCell_py(self, INDEX_t cellNo, INDEX_t edgeNo, BOOL_t sorted=False)
- getFaceInCellEncoded_py(self, INDEX_t cellNo, INDEX_t faceNo)
- getFaceInCell_py(self, INDEX_t cellNo, INDEX_t faceNo, BOOL_t sorted=False)
- getVertexInCell_py(self, INDEX_t cellNo, INDEX_t vertexNo)
- loopOverCellEdgesEncoded_py(self, ENCODE_t[::1] hv)
- loopOverCellEdges_py(self, INDEX_t[::1] edge)
- loopOverFaceEdgesEncoded_py(self, list hv)
- loopOverFaceEdges_py(self, INDEX_t[::1] edge)
- sortAndEncodeEdge_py(self, INDEX_t[::1] edge)
- sortAndEncodeFace_py(self, INDEX_t[::1] face)
- startLoopOverCellEdges_py(self, INDEX_t[::1] cell)
- startLoopOverFaceEdges_py(self, INDEX_t[::1] face)
- class PyNucleus_fem.simplexMapper.simplexMapper0D(mesh=None)
Bases:
simplexMapper
- __init__(*args, **kwargs)
- class PyNucleus_fem.simplexMapper.simplexMapper1D(mesh=None)
Bases:
simplexMapper
- __init__(*args, **kwargs)
- class PyNucleus_fem.simplexMapper.simplexMapper2D(mesh=None)
Bases:
simplexMapper
- __init__(*args, **kwargs)
- class PyNucleus_fem.simplexMapper.simplexMapper3D(mesh=None)
Bases:
simplexMapper
- __init__(*args, **kwargs)
PyNucleus_fem.splitting module
- class PyNucleus_fem.splitting.dofmapSplitter(dm, indicators)
Bases:
object
- __init__(self, dm, indicators)
- getRestrictionProlongation(self, label)
- getSubMap(self, label)
- getSubMapOnSubMesh(self, label)
- getSubMesh(self, label)
- plotSubMaps(self)
- class PyNucleus_fem.splitting.meshSplitter(meshBase mesh, indicators)
Bases:
object
- __init__(*args, **kwargs)
- getRestrictionProlongation(self, label, dm, sub_dm)
- getSubMap(self, label, dm)
- getSubMapOnFullMesh(self, label, dm)
- getSubMesh(self, label)
- plotSubMeshes(self)
- class PyNucleus_fem.splitting.meshSplitter2(meshBase mesh, function indicator)
Bases:
meshSplitter
- __init__(*args, **kwargs)
- createSubdomains(self, function indicator)