The bempp.core module

Introduction

This module contains SWIG-generated wrappers of C++ classes from BEM++.

Many of the classes occur in several variants corresponding to particular instantiations of C++ class templates depending on parameters such as BasisFunctionType and ResultType (see the documentation of the C++ interface for more information on the meaning of these types). These variants are distinguished by their names. For example, the group of classes denoted symbolically as BoundaryOperator_BasisFunctionType_ResultType has six concrete representatives:

  • BoundaryOperator_float32_float32,
  • BoundaryOperator_float32_complex64,
  • BoundaryOperator_complex64_complex64,
  • BoundaryOperator_float64_float64,
  • BoundaryOperator_float64_complex128 and
  • BoundaryOperator_complex128_complex128.

Here, float32 and float64 stand for single- and double-precision floating-point numbers, whereas complex64 and complex128 denote single- and double-precision complex numbers.

It would be tedious and error-prone to have to specify these numeric types explicitly whenever a new object is constructed. For this reason, the bempp.lib module provides create... helper functions that construct new instances of classes from bempp.core with automatically determined values of BasisFunctionType and ResultType. These “non-member constructors” should be used in preference to the usual constructors.

The documentation of this module is in preliminary stage. The Grid-related classes have been almost fully documented; for the remaining classes only member signatures are provided. Please refer to the documentation of the C++ interface for more complete information.

Reference

class bempp.core.AbstractBoundaryOperator_BasisFunctionType_ResultType

Bases: object

Proxy of C++ AbstractBoundaryOperator<BasisFunctionType,ResultType> class

assembleWeakForm(self, context) → DiscreteBoundaryOperator_ValueType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
basisFunctionType(self) → string
domain(self) → Space_BasisFunctionType
dualToRange(self) → Space_BasisFunctionType
isLocal(self) → bool
label(self) → string
range(self) → Space_BasisFunctionType
resultType(self) → string
symmetry(self) → int
thisown

The membership flag

static uniqueLabel() → string
bempp.core.AbstractBoundaryOperator_BasisFunctionType_ResultType_uniqueLabel() → string
class bempp.core.AcaOptions

Bases: object

Proxy of C++ Bempp::AcaOptions class

ERROR = 2
GLOBAL_ASSEMBLY = 0
HYBRID_ASSEMBLY = 2
IGNORE = 0
LOCAL_ASSEMBLY = 1
MAX_ASSEMBLY_MODE = 2
MAX_REACTION = 2
MIN_ASSEMBLY_MODE = 0
MIN_REACTION = 0
WARNING = 1
eps

eps -> float

eta

eta -> float

firstClusterIndex

firstClusterIndex -> int

globalAssemblyBeforeCompression

globalAssemblyBeforeCompression (deprecated) -> bool

maximumBlockSize

maximumBlockSize -> int

maximumRank

maximumRank -> int

minimumBlockSize

minimumBlockSize -> int

mode

mode -> “global_assembly”, “local_assembly” or “hybrid_assembly”

outputFname

outputFname -> string

outputPostscript

outputPostscript -> bool

reactionToUnsupportedMode

reactionToUnsupportedMode -> “ignore”, “warning” or “error”

recompress

recompress -> bool

scaling

scaling -> float

thisown

The membership flag

useAhmedAca

AcaOptions_useAhmedAca_get(self) -> bool

Parameters:
self: Bempp::AcaOptions *
class bempp.core.AccuracyOptions

Bases: object

Proxy of C++ Fiber::AccuracyOptions class

doubleRegular

doubleRegular -> QuadratureOptions

doubleSingular

doubleSingular -> QuadratureOptions

singleRegular

singleRegular -> QuadratureOptions

thisown

The membership flag

class bempp.core.AccuracyOptionsEx

Bases: object

Proxy of C++ Fiber::AccuracyOptionsEx class

doubleRegular(self, normalizedDistance) → QuadratureOptions
Parameters:
  • normalizedDistance (float)
doubleSingular(self) → QuadratureOptions
setDoubleRegular(self, accuracyOrder, relativeToDefault=True)
Parameters:
  • accuracyOrder (int)
  • relativeToDefault (bool)

setDoubleRegular(self, maxNormalizedDistance1, accuracyOrder1, accuracyOrder2, relativeToDefault=True)

Parameters:
  • maxNormalizedDistance1 (float)
  • accuracyOrder1 (int)
  • accuracyOrder2 (int)
  • relativeToDefault (bool)
setDoubleRegular(self, maxNormalizedDistance1, accuracyOrder1, maxNormalizedDistance2, accuracyOrder2, accuracyOrder3,
relativeToDefault=True)
Parameters:
  • maxNormalizedDistance1 (float)
  • accuracyOrder1 (int)
  • maxNormalizedDistance2 (float)
  • accuracyOrder2 (int)
  • accuracyOrder3 (int)
  • relativeToDefault (bool)
setDoubleRegular(self, maxNormalizedDistance1, accuracyOrder1, maxNormalizedDistance2, accuracyOrder2, maxNormalizedDistance3,
accuracyOrder3, accuracyOrder4, relativeToDefault=True)
Parameters:
  • maxNormalizedDistance1 (float)
  • accuracyOrder1 (int)
  • maxNormalizedDistance2 (float)
  • accuracyOrder2 (int)
  • maxNormalizedDistance3 (float)
  • accuracyOrder3 (int)
  • accuracyOrder4 (int)
  • relativeToDefault (bool)
setDoubleRegular(self, maxNormalizedDistance1, accuracyOrder1, maxNormalizedDistance2, accuracyOrder2, maxNormalizedDistance3,
accuracyOrder3, maxNormalizedDistance4, accuracyOrder4, accuracyOrder5, relativeToDefault=True)
Parameters:
  • maxNormalizedDistance1 (float)
  • accuracyOrder1 (int)
  • maxNormalizedDistance2 (float)
  • accuracyOrder2 (int)
  • maxNormalizedDistance3 (float)
  • accuracyOrder3 (int)
  • maxNormalizedDistance4 (float)
  • accuracyOrder4 (int)
  • accuracyOrder5 (int)
  • relativeToDefault (bool)

setDoubleRegular(self, maxNormalizedDistances, accuracyOrders, relativeToDefault=True)

Parameters:
  • maxNormalizedDistances (list of float objects)
  • accuracyOrders (list of int objects)
  • relativeToDefault (bool)
setDoubleSingular(self, accuracyOrder, relativeToDefault=True)
Parameters:
  • accuracyOrder (int)
  • relativeToDefault (bool)
setSingleRegular(self, accuracyOrder, relativeToDefault=True)
Parameters:
  • accuracyOrder (int)
  • relativeToDefault (bool)

setSingleRegular(self, maxNormalizedDistance1, accuracyOrder1, accuracyOrder2, relativeToDefault=True)

Parameters:
  • maxNormalizedDistance1 (float)
  • accuracyOrder1 (int)
  • accuracyOrder2 (int)
  • relativeToDefault (bool)
setSingleRegular(self, maxNormalizedDistance1, accuracyOrder1, maxNormalizedDistance2, accuracyOrder2, accuracyOrder3,
relativeToDefault=True)
Parameters:
  • maxNormalizedDistance1 (float)
  • accuracyOrder1 (int)
  • maxNormalizedDistance2 (float)
  • accuracyOrder2 (int)
  • accuracyOrder3 (int)
  • relativeToDefault (bool)
setSingleRegular(self, maxNormalizedDistance1, accuracyOrder1, maxNormalizedDistance2, accuracyOrder2, maxNormalizedDistance3,
accuracyOrder3, accuracyOrder4, relativeToDefault=True)
Parameters:
  • maxNormalizedDistance1 (float)
  • accuracyOrder1 (int)
  • maxNormalizedDistance2 (float)
  • accuracyOrder2 (int)
  • maxNormalizedDistance3 (float)
  • accuracyOrder3 (int)
  • accuracyOrder4 (int)
  • relativeToDefault (bool)
setSingleRegular(self, maxNormalizedDistance1, accuracyOrder1, maxNormalizedDistance2, accuracyOrder2, maxNormalizedDistance3,
accuracyOrder3, maxNormalizedDistance4, accuracyOrder4, accuracyOrder5, relativeToDefault=True)
Parameters:
  • maxNormalizedDistance1 (float)
  • accuracyOrder1 (int)
  • maxNormalizedDistance2 (float)
  • accuracyOrder2 (int)
  • maxNormalizedDistance3 (float)
  • accuracyOrder3 (int)
  • maxNormalizedDistance4 (float)
  • accuracyOrder4 (int)
  • accuracyOrder5 (int)
  • relativeToDefault (bool)

setSingleRegular(self, maxNormalizedDistances, accuracyOrders, relativeToDefault=True)

Parameters:
  • maxNormalizedDistances (list of float objects)
  • accuracyOrders (list of int objects)
  • relativeToDefault (bool)
singleRegular(self) → QuadratureOptions

singleRegular(self, normalizedDistance) -> QuadratureOptions

Parameters:
  • normalizedDistance (float)
thisown

The membership flag

class bempp.core.AssembledPotentialOperator_BasisFunctionType_ResultType

Bases: object

Proxy of C++ AssembledPotentialOperator<BasisFunctionType,ResultType> class

apply(argument)
basisFunctionType(self) → string
componentCount(self) → int
discreteOperator(self) → DiscreteBoundaryOperator_ValueType
evaluationPoints(self) → boost::shared_ptr< arma::Mat< Bempp::AssembledPotentialOperator< std::complex< double >,std::complex< double > >::CoordinateType > const >
resultType(self) → string
space(self) → Space_BasisFunctionType
thisown

The membership flag

class bempp.core.AssemblyOptions

Bases: object

Proxy of C++ Bempp::AssemblyOptions class

ACA = 1
AUTO = -1
DENSE = 0
NO = 0
YES = 1
acaOptions(self) → AcaOptions
assemblyMode(self) → AssemblyOptions::Mode
enableBlasInQuadrature(self, value=AUTO)
Parameters:
  • value (enum AssemblyOptions::Value)
enableJointAssembly(self, value=True)
Parameters:
  • value (bool)
enableSingularIntegralCaching(self, value=True)
Parameters:
  • value (bool)
enableSparseStorageOfLocalOperators(self, value=True)
Parameters:
  • value (bool)

enableSparseStorageOfLocalOperators(self)

enableSparseStorageOfMassMatrices(self, value=True)
Parameters:
  • value (bool)
isBlasEnabledInQuadrature(self) → AssemblyOptions::Value
isJointAssemblyEnabled(self) → bool
isQuadratureOrderUniformInEachCluster(self) → bool
isSingularIntegralCachingEnabled(self) → bool
isSparseStorageOfLocalOperatorsEnabled(self) → bool
isSparseStorageOfMassMatricesEnabled(self) → bool
makeQuadratureOrderUniformInEachCluster(self, value=True)
Parameters:
  • value (bool)

makeQuadratureOrderUniformInEachCluster(self)

parallelizationOptions(self) → ParallelizationOptions
setMaxThreadCount(self, maxThreadCount)
Parameters:
  • maxThreadCount (int)
setVerbosityLevel(self, level)
Parameters:
  • level (enum VerbosityLevel::Level)
switchToAca(self, acaOptions)
Parameters:
  • acaOptions (AcaOptions)
switchToAcaMode(self, acaOptions)
Parameters:
  • acaOptions (AcaOptions)
switchToDense(self)
switchToDenseMode(self)
thisown

The membership flag

verbosityLevel(self) → VerbosityLevel::Level
class bempp.core.BlockedBoundaryOperator_BasisFunctionType_ResultType

Bases: object

Proxy of C++ BlockedBoundaryOperator<BasisFunctionType,ResultType> class

basisFunctionType(self) → string
block(self, row, column) → BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • row (int)
  • column (int)
columnCount(self) → int
domain(self, column) → Space_BasisFunctionType
Parameters:
  • column (int)
dualToRange(self, row) → Space_BasisFunctionType
Parameters:
  • row (int)
isEmpty(self, row, column) → bool
Parameters:
  • row (int)
  • column (int)
range(self, row) → Space_BasisFunctionType
Parameters:
  • row (int)
resultType(self) → string
rowCount(self) → int
thisown

The membership flag

totalGlobalDofCountInDomains(self) → int
totalGlobalDofCountInDualsToRanges(self) → int
totalGlobalDofCountInRanges(self) → int
weakForm(self) → DiscreteBoundaryOperator_ValueType
class bempp.core.BlockedOperatorStructure_BasisFunctionType_ResultType

Bases: object

Proxy of C++ BlockedOperatorStructure<BasisFunctionType,ResultType> class

basisFunctionType(self) → string
block(self, row, column) → BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • row (int)
  • column (int)
columnCount(self) → int
isEmpty(self, row, column) → bool
Parameters:
  • row (int)
  • column (int)
reset(self)
resetBlock(self, row, column)
Parameters:
  • row (int)
  • column (int)
resultType(self) → string
rowCount(self) → int
setBlock(self, row, column, op)
Parameters:
  • row (int)
  • column (int)
  • op (BoundaryOperator_BasisFunctionType_ResultType)
thisown

The membership flag

class bempp.core.BlockedSolution_BasisFunctionType_ResultType

Bases: bempp.core.SolutionBase_BasisFunctionType_ResultType

Proxy of C++ BlockedSolution<BasisFunctionType,ResultType> class

gridFunction(self, i) → GridFunction_BasisFunctionType_ResultType
Parameters:
  • i (int)

gridFunction(self, i) -> GridFunction_BasisFunctionType_ResultType

Parameters:
  • i (int)
gridFunctionCount(self) → int
thisown

The membership flag

class bempp.core.BoundaryOperator_BasisFunctionType_ResultType

Bases: object

Proxy of C++ BoundaryOperator<BasisFunctionType,ResultType> class

abstractOperator(self) → AbstractBoundaryOperator_BasisFunctionType_ResultType
apply(self, trans, x_in, y_inout, alpha, beta)
Parameters:
  • trans (‘n’, ‘t’, ‘c’ or ‘h’)
  • x_in (GridFunction_BasisFunctionType_ResultType)
  • y_inout (GridFunction_BasisFunctionType_ResultType)
  • alpha (complex)
  • beta (complex)
basisFunctionType(self) → string
context(self) → Context_BasisFunctionType_ResultType
domain(self) → Space_BasisFunctionType
dualToRange(self) → Space_BasisFunctionType
holdWeakForm(self, value)
Parameters:
  • value (bool)
initialize(self, context, abstractOp)
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • abstractOp (AbstractBoundaryOperator_BasisFunctionType_ResultType)
isInitialized(self) → bool
isWeakFormHeld(self) → bool
label(self) → string
range(self) → Space_BasisFunctionType
resultType(self) → string
thisown

The membership flag

uninitialize(self)
weakForm(self) → DiscreteBoundaryOperator_ValueType
class bempp.core.Context_BasisFunctionType_ResultType

Bases: object

Proxy of C++ Context<BasisFunctionType,ResultType> class

assemblyOptions(self) → AssemblyOptions
basisFunctionType(self) → string
getWeakForm(self, op) → DiscreteBoundaryOperator_ValueType
Parameters:
  • op (AbstractBoundaryOperator_BasisFunctionType_ResultType)
quadStrategy(self) → boost::shared_ptr< Bempp::Context< std::complex< double >,std::complex< double > >::QuadratureStrategy const >
resultType(self) → string
thisown

The membership flag

class bempp.core.ConvergenceTestMode

Bases: object

Proxy of C++ Bempp::ConvergenceTestMode class

TEST_CONVERGENCE_IN_DUAL_TO_RANGE = 0
TEST_CONVERGENCE_IN_RANGE = 1
thisown

The membership flag

class bempp.core.DefaultDirectSolver_BasisFunctionType_ResultType

Bases: bempp.core.Solver_BasisFunctionType_ResultType

Proxy of C++ DefaultDirectSolver<BasisFunctionType,ResultType> class

thisown

The membership flag

class bempp.core.DefaultIterativeSolver_BasisFunctionType_ResultType

Bases: bempp.core.Solver_BasisFunctionType_ResultType

Proxy of C++ DefaultIterativeSolver<BasisFunctionType,ResultType> class

initializeSolver(self, paramList)
Parameters:
  • paramList (Teuchos::RCP< Teuchos::ParameterList >)

initializeSolver(self, paramList, preconditioner)

Parameters:
  • paramList (Teuchos::RCP< Teuchos::ParameterList >)
  • preconditioner (Preconditioner_ValueType)
setPreconditioner(self, preconditioner)
Parameters:
  • preconditioner (Preconditioner_ValueType)
thisown

The membership flag

class bempp.core.DiscreteBoundaryOperator_ValueType

Bases: object

Proxy of C++ DiscreteBoundaryOperator<ValueType> class

apply(self)

apply(self, trans, x_in, y_inout, alpha, beta)

Parameters:
  • trans (‘n’, ‘t’, ‘c’ or ‘h’)
  • x_in (2D array)
  • y_inout (2D array)
  • alpha (complex)
  • beta (complex)
asDiscreteAcaBoundaryOperator(self, eps=-1, maximumRank=-1, interleave=False) → DiscreteBoundaryOperator_ValueType
Parameters:
  • eps (float)
  • maximumRank (int)
  • interleave (bool)
asMatrix(self)
asPyTrilinosInverseOperator(label='', pid=0)

Return a representation as Trilinos Epetra Inverse Operator.

Parameters:
  • label (str)

    The operator’s label.

  • pid (int)

    Id of the process in which the operator lives (not yet supported).

asPyTrilinosOperator(label='', pid=0)

Return a representation as Trilinos Epetra Operator.

Parameters:
  • label (str)

    The operator’s label.

  • pid (int)

    Id of the process in which the operator lives (not yet supported).

columnCount(self) → int
dtype
dump(self)
matmat(other)

Multiply this operator with the matrix ‘other’ and return the result.

Parameters:
  • other (2D ndarray)

    Matrix that should be multiplied with this operator.

matvec(other)

Multiply this operator with ‘other’ and return the result.

Parameters:
  • other (1D or 2D ndarray)

    Vector or matrix that should be multiplied with this operator.

rmatvec(other)

Multiply the conjugate transpose of this operator with ‘other’ and return the result.

Parameters:
  • other (1D or 2D ndarray)

    Vector or matrix that should be multiplied with the conjugate transpose of this operator.

rowCount(self) → int
shape
thisown

The membership flag

valueType(self) → string
class bempp.core.EntityCodim0

Bases: object

Entity of codimension 0.

codimension = 0
father(self) → Entity

Inter-level access to father entity on the next-coarser grid.

The given entity resulted directly from a subdivision of its father entity. For macro (level-0) elements father() returns None.

geometry(self) → Geometry

Geometry of this entity.

This object gives, among other things, the map from a reference element to world coordinates.

hasFather(self) → bool

True if entity has a father entity which can be accessed using the father() method.

isLeaf(self) → bool

True if the entity is contained in the leaf grid.

isNew(self) → bool

True if the entity has been created during the last call to adapt().

isRegular(self) → bool

True if the element is of regular type in red/green type refinement.

In bisection or hanging node refinement this is always true.

level(self) → int

Entity level.

mightVanish(self) → bool

True if the entity might disappear during the next call to adapt().

If the method returns False, the entity is guaranteed to still be present after adaptation.

parentGrid

Parent grid

sons(self, maxLevel) → EntityIterator

Iterator over elements that resulted from (recursive) subdivision of this element.

Parameters:
  • maxlevel (int)

    Iterator does not stop at elements with level greater than maxLevel.

subEntities(self, codimSub) → EntityIterator

Iterator over subentities of codimension codimSub.

Note: codimSub must be greater than 0 and less than the dimension of the grid.

subEntityCount(self, codim) → int

Number of subentities of codimension codimSub.

thisown

The membership flag

type(self) → GeometryType

Type of the reference element.

class bempp.core.EntityCodim1

Bases: object

Entity of codimension 1.

codimension = 1
geometry(self) → Geometry

Geometry of this entity.

This object gives, among other things, the map from a reference element to world coordinates.

level(self) → int

Entity level.

parentGrid

Parent grid

thisown

The membership flag

type(self) → GeometryType

Type of the reference element.

class bempp.core.EntityCodim2

Bases: object

Entity of codimension 2.

codimension = 2
geometry(self) → Geometry

Geometry of this entity.

This object gives, among other things, the map from a reference element to world coordinates.

level(self) → int

Entity level.

parentGrid

Parent grid

thisown

The membership flag

type(self) → GeometryType

Type of the reference element.

class bempp.core.EntityCodim3

Bases: object

Entity of codimension 3.

codimension = 3
geometry(self) → Geometry

Geometry of this entity.

This object gives, among other things, the map from a reference element to world coordinates.

level(self) → int

Entity level.

parentGrid

Parent grid

thisown

The membership flag

type(self) → GeometryType

Type of the reference element.

class bempp.core.EntityIteratorCodim0

Bases: object

Iterator over entities of codimension 0.

next(self) → Entity

Return the current entity and increment the iterator.

parentGrid

Parent grid

thisown

The membership flag

class bempp.core.EntityIteratorCodim1

Bases: object

Iterator over entities of codimension 1.

next(self) → Entity

Return the current entity and increment the iterator.

parentGrid

Parent grid

thisown

The membership flag

class bempp.core.EntityIteratorCodim2

Bases: object

Iterator over entities of codimension 2.

next(self) → Entity

Return the current entity and increment the iterator.

parentGrid

Parent grid

thisown

The membership flag

class bempp.core.EntityIteratorCodim3

Bases: object

Iterator over entities of codimension 3.

next(self) → Entity

Return the current entity and increment the iterator.

parentGrid

Parent grid

thisown

The membership flag

class bempp.core.EvaluationOptions

Bases: object

Proxy of C++ Bempp::EvaluationOptions class

ACA = 1
AUTO = -1
DENSE = 0
acaOptions(self) → AcaOptions
evaluationMode(self) → EvaluationOptions::Mode
parallelizationOptions(self) → ParallelizationOptions
setMaxThreadCount(self, maxThreadCount)
Parameters:
  • maxThreadCount (int)
setVerbosityLevel(self, level)
Parameters:
  • level (enum VerbosityLevel::Level)
switchToAcaMode(self, acaOptions)
Parameters:
  • acaOptions (AcaOptions)
switchToDenseMode(self)
thisown

The membership flag

verbosityLevel(self) → VerbosityLevel::Level
class bempp.core.Geometry

Bases: object

Geometry of an entity.

affine(self) → bool

True if the geometry mapping is affine and false otherwise.

center(self) → ndarray

Center of geometry.

Note that this method is still subject to a change of name and semantics. At the moment, the center is not required to be the centroid of the geometry, or even the centroid of its corners. This makes acceptable the current default implementation, which maps the centroid of the reference element to the geometry.

We may change the name (and semantics) of the method to centroid() if Dune’s developers find reasonably efficient ways to implement it properly.

Returns a vector containing the coordinates of the center of geometry.

cornerCount(self) → int

Number of corners of the reference element.

corners(self) → ndarray

Positions of the geometry corners.

Returns a 2D array whose ith column contains the coordinates of the ith corner. The numbering of corners follows the conventions of the generic reference element.

global2local(self, global_) → ndarray

Convert global (physical) to local (logical) coordinates.

Parameters:
  • global (ndarray)

    2D array whose ith column contains the global coordinates of a point x_i.

Returns a 2D whose ith column contains the local coordinates of x_i.

integrationElements(*args)

integrationElement(self, local) -> ndarray

The factor mu appearing in the integral transformation formula.

See the documentation of the C++ interface for the definition of mu.

Parameters:
  • local (ndarray)

    2D array whose ith column contains the local coordinates of a point x_i.

Returns a vector whose ith entry contains the integration element mu(x_i).

jacobianInversesTransposed(self, local) → ndarray

Inverses of the transposed Jacobian matrices.

See the documentation of the C++ interface for the definition of the Jacobian matrix.

Parameters:
  • local (ndarray)

    2D array whose ith column contains the local coordinates of a point x_i.

Returns a 3D array whose ith slice (i.e. ...[:,:,i]) contains the inverse of the transposed Jacobian matrix at x_i.

Note: In the non-symmetric case dimGrid != dimWorld the pseudoinverse of the transposed Jacobian matrix is returned. This means that it is an inverse for all vectors tangential to the grid while mapping all normal vectors to zero.

jacobiansTransposed(self, local) → ndarray

Transposed Jacobian matrices.

See the documentation of the C++ interface for the definition of the Jacobian matrix.

Parameters:
  • local (ndarray)

    2D array whose ith column contains the local coordinates of a point x_i.

Returns a 3D array whose ith slice (i.e. ...[:,:,i]) contains the transposed Jacobian matrix at x_i.

local2global(self, local) → ndarray

Convert local (logical) to global (physical) coordinates.

Parameters:
  • local (ndarray)

    2D array whose ith column contains the local coordinates of a point x_i

Returns a 2D array whose ith column contains the global coordinates of x_i.

normals(self, local)
parentEntity

Parent entity

thisown

The membership flag

type(self) → GeometryType

Type of the reference element.

volume(self) → float

Volume of geometry.

class bempp.core.GeometryType

Bases: object

Unique label for each type of entities that can occur in grids.

dim(self) → int

Return dimension of the type.

isCube(self) → bool

Return true if entity is a cube of any dimension

isHexahedron(self) → bool

Return true if entity is a hexahedron.

isLine(self) → bool

Return true if entity is a line segment

isNone(self) → bool

Return true if entity is a singular of any dimension

isPrism(self) → bool

Return true if entity is a prism.

isPyramid(self) → bool

Return true if entity is a pyramid.

isQuadrilateral(self) → bool

Return true if entity is a quadrilateral.

isSimplex(self) → bool

Return true if entity is a simplex of any dimension.

isTetrahedron(self) → bool

Return true if entity is a tetrahedron.

isTriangle(self) → bool

Return true if entity is a triangle

isVertex(self) → bool

Return true if entity is a vertex

makeCube(self, dim)

Make a hypercube of dimension dim.

makeHexahedron(self)

Make a hexahedron

makeLine(self)

Make a line segment

makeNone(self, dim)

Make a singular of dimension dim.

makePrism(self)

Make a prism

makePyramid(self)

Make a pyramid

makeQuadrilateral(self)

Make a quadrilateral

makeSimplex(self, dim)

Make a simplex of dimension dim.

makeTetrahedron(self)

Make a tetrahedron

makeTriangle(self)

Make a triangle

makeVertex(self)

Make a vertex

thisown

The membership flag

class bempp.core.Grid

Bases: object

Grid.

barycentricGrid(self) → Grid
dim(self) → int

Dimension of the grid.

dimWorld(self) → int

Dimension of the space containing the grid.

getBoundingBox(self, lowerBound, upperBound)
globalIdSet(self) → IdSet

Grid’s global id set.

hasBarycentricGrid(self) → bool
isBarycentricRepresentationOf(self, other) → bool
leafView(self) → GridView

View of the leaf entities.

levelView(self, level) → GridView

View of the entities on grid level ‘level’.

maxLevel(self) → int

Maximum level defined in this grid.

Levels are numbered 0 ... maxLevel() with 0 the coarsest level.

plot()

Visualize the Grid.

thisown

The membership flag

topology(self) → GridParameters::Topology
class bempp.core.GridFactory

Bases: object

Grid factory.

This class provides static member functions to construct grids on the fly and to import grids from existing files.

static createGridFromConnectivityArrays(topology, vertices, elementCorners) → Grid

Create a grid from connectivity arrays.

Parameters:
  • topology (string)

    Topology of the grid to be constructed (one of ‘linear’, ‘triangular’, ‘quadrilateral’, ‘hybrid’).

  • vertices (2D ndarray)

    2D array whose (i, j)th element contains the ith component of the jth vertex.

  • elementCorners (2D ndarray)

    2D array whose (i, j)th element contains the index of the ith vertex of the jth element.

Note: Currently only grids with triangular topology are supported.

static createStructuredGrid(topology, lowerLeft, upperRight, nElements) → Grid

Construct a regular structured grid.

Parameters:
  • topology (string)

    Topology of the grid to be constructed (one of ‘linear’, ‘triangular’, ‘quadrilateral’, ‘hybrid’).

  • lowerLeft (tuple)

    Coordinates of the lower left corner of the grid.

  • upperRight (tuple)

    Coordinates of the upper right corner of the grid.

  • nElements (tuple)

    Number of grid subdivisions in each direction.

This function constructs a regular structured grid. Its dimension, dimGrid, and the dimension of the surrounding space, dimWorld, are determined from the parameter ‘topology’. The constructed grid covers the dimGrid-dimensional cube

[lowerLeft(0) upperRight(0)] x [lowerLeft(1) upperRight(1)]
x ... x [lowerLeft(dimGrid-1), upperRight(dimGrid-1)].

The last (dimWorld - dimGrid) dimensions of all grid points are set to zero.

Each side of the cube parallel to the nth coordinate axis is subdivided into nElements(n) segments.

Note: Currently only grids with triangular topology are supported.

static importGmshGrid(*args)
importGmshGrid(topology, fileName, verbose = True,
insertBoundarySegments = False) -> Grid

Import grid from a file in Gmsh format.

Parameters:
  • topology (string)

    Topology of the grid to be constructed (one of ‘linear’, ‘triangular’, ‘quadrilateral’, ‘hybrid’).

  • fileName (string)

    Name of the Gmsh file.

  • verbose (bool, default: True)

    Output diagnostic information.

  • insertBoundarySegments (bool, default: False)

    Insert boundary segments.

See http://geuz.org/gmsh for information about the Gmsh file format. See Dune::GmshReader documentation for information about the supported Gmsh features.

thisown

The membership flag

class bempp.core.GridFunction_BasisFunctionType_ResultType

Bases: object

Proxy of C++ GridFunction<BasisFunctionType,ResultType> class

APPROXIMATE = 0
COEFFICIENTS = 0
INTERPOLATE = 1
L2Norm(self) → float
PROJECTIONS = 1
basisFunctionType(self) → string
coefficients(self)
componentCount(self) → int
context(self) → Context_BasisFunctionType_ResultType
dualSpace(self) → Space_BasisFunctionType
evaluate(self, ep, local)
Parameters:
  • ep (EntityPointer< 0 >)
  • local (2D array)
evaluateAtSpecialPoints(dataType, returnPoints=False)
exportToGmsh(self, dataLabel, fileName)
Parameters:
  • dataLabel (string)
  • fileName (string)
exportToVtk(self, dataType, dataLabel, fileNamesBase, filesPath=None, type='ascii')
Parameters:
  • dataType (‘cell_data’ or ‘vertex_data’)
  • dataLabel (string)
  • fileNamesBase (string)
  • filesPath (string)
  • type (‘ascii’, ‘base64’, ‘appendedraw’ or ‘appendedbase64’)
grid(self) → Grid
isInitialized(self) → bool
plot()

Visualize the GridFunction.

projections(self)

projections(self, dualSpace)

Parameters:
  • dualSpace (Space_BasisFunctionType)
resultType(self) → string
shapeset(self, element) → Fiber::Shapeset< std::complex< double > > const &
Parameters:
  • element (Entity< 0 >)
space(self) → Space_BasisFunctionType
thisown

The membership flag

wasInitializedFromCoefficients(self) → bool
class bempp.core.GridParameters

Bases: object

Proxy of C++ Bempp::GridParameters class

HYBRID_2D = 3
LINEAR = 0
QUADRILATERAL = 2
TETRAHEDRAL = 4
TRIANGULAR = 1
thisown

The membership flag

topology

topology -> string

class bempp.core.GridSegment

Bases: object

Proxy of C++ Bempp::GridSegment class

static closedDomain(grid, domain, level=0) → GridSegment

closedDomain(grid, domain) -> GridSegment

complement(self) → GridSegment
contains(self, codim, index) → bool
difference(self, other) → GridSegment
intersection(self, other) → GridSegment
markExcludedEntities(self, codim, marks, mark=-1)

markExcludedEntities(self, codim, marks)

static openDomain(grid, domain, level=0) → GridSegment

openDomain(grid, domain) -> GridSegment

thisown

The membership flag

union_(self, other) → GridSegment
static wholeGrid(grid, level=0) → GridSegment

wholeGrid(grid) -> GridSegment

bempp.core.GridSegment_closedDomain(*args)

closedDomain(grid, domain, level=0) -> GridSegment GridSegment_closedDomain(grid, domain) -> GridSegment

bempp.core.GridSegment_openDomain(*args)

openDomain(grid, domain, level=0) -> GridSegment GridSegment_openDomain(grid, domain) -> GridSegment

bempp.core.GridSegment_wholeGrid(*args)

wholeGrid(grid, level=0) -> GridSegment GridSegment_wholeGrid(grid) -> GridSegment

class bempp.core.GridView

Bases: object

Grid view.

This class provides a means to access a specific subset of entities, for example the leaf entities or the entities on a certain refinement level.

containsEntity(self, e) → bool

containsEntity(self, e) -> bool containsEntity(self, e) -> bool containsEntity(self, e) -> bool

True if the entity e belongs to this grid view.

If e is not an element of the grid, then the result of containsEntity() is undefined.

dim(self) → int
dimWorld(self) → int
entities(self, codim) → EntityIterator

Iterator over entities of codimension codim contained in this view.

entityCount(self, codim) → int

entityCount(self, type) -> int

Number of entities with certain characteristics.

Parameters:
  • codim (int)

    codimension

  • type (GeometryType)

    geometry type

getRawElementData(returnDomainIndices=False)
indexSet(self) → IndexSet

The index set.

parentGrid

Parent grid

thisown

The membership flag

vtkWriter(self, dm = 'conforming') → VtkWriter

VtkWriter for this grid view.

Parameters:
  • dm (string, optional)

    data mode, ‘conforming’ (default) or ‘nonconforming’

See the documentation of Dune::VTK::DataMode for more information about the implications of the choice of data mode.

class bempp.core.IdSet

Bases: object

Id set.

entityId(self, e) → int

entityId(self, e) -> int entityId(self, e) -> int entityId(self, e) -> int

Id of the entity e.

parentGrid

Parent grid

subEntityId(self, e, i, codimSub) → int

Id of i’th subentity of codimension codimSub of entity e of codimension 0.

thisown

The membership flag

class bempp.core.IndexSet

Bases: object

Index set.

entityIndex(self, e) → int

entityIndex(self, e) -> int entityIndex(self, e) -> int entityIndex(self, e) -> int

Index of the entity e.

The result of calling this method with an entity that is not in the index set is undefined.

Returns an integer in the range 0 ... (max number of entities in set - 1).

parentGridView

Parent grid view

subEntityIndex(self, e, i, codimSub) → int

Index of i’th subentity of codimension codimSub of entity e of codimension 0.

thisown

The membership flag

bempp.core.L2NormOfDifferenceFromPythonSurfaceNormalDependentFunctor_ValueType_complex128(gridFunction, functor, quadStrategy, options) → ScalarTraits< std::complex< double > >::RealType
Parameters:
  • gridFunction (GridFunction_BasisFunctionType_ResultType)
  • functor (PythonSurfaceNormalDependentFunctor_ValueType)
  • quadStrategy (QuadratureStrategy_BasisFunctionType_ResultType)
  • options (EvaluationOptions)
bempp.core.L2NormOfDifferenceFromPythonSurfaceNormalIndependentFunctor_ValueType_complex128(gridFunction, functor, quadStrategy, options) → ScalarTraits< std::complex< double > >::RealType
Parameters:
  • gridFunction (GridFunction_BasisFunctionType_ResultType)
  • functor (PythonSurfaceNormalIndependentFunctor_ValueType)
  • quadStrategy (QuadratureStrategy_BasisFunctionType_ResultType)
  • options (EvaluationOptions)
class bempp.core.OpenClOptions

Bases: object

Proxy of C++ Fiber::OpenClOptions class

thisown

The membership flag

useOpenCl

OpenClOptions_useOpenCl_get(self) -> bool

Parameters:
self: Fiber::OpenClOptions *
class bempp.core.ParallelizationOptions

Bases: object

Proxy of C++ Fiber::ParallelizationOptions class

AUTO = -1
disableOpenCl(self)
enableOpenCl(self, openClOptions)
Parameters:
  • openClOptions (OpenClOptions)
isOpenClEnabled(self) → bool
maxThreadCount(self) → int
openClOptions(self) → OpenClOptions
setMaxThreadCount(self, maxThreadCount=AUTO)
Parameters:
  • maxThreadCount (int)
thisown

The membership flag

class bempp.core.PotentialOperator_BasisFunctionType_ResultType

Bases: object

Proxy of C++ PotentialOperator<BasisFunctionType,ResultType> class

assemble(self, space, evaluationPoints, quadStrategy, options) → AssembledPotentialOperator_BasisFunctionType_ResultType
Parameters:
  • space (boost::shared_ptr< Space< PotentialOperator_BasisFunctionType_ResultType::BasisFunctionType > >)
  • evaluationPoints (boost::shared_ptr< 2D array >)
  • quadStrategy (PotentialOperator_BasisFunctionType_ResultType::QuadratureStrategy)
  • options (EvaluationOptions)
basisFunctionType(self) → string
componentCount(self) → int
evaluateAtPoints(argument, evaluationPoints, evaluationOptions=<bempp.core.EvaluationOptions; proxy of <Swig Object of type 'Bempp::EvaluationOptions *' at 0x10cb5c0c0> >)
resultType(self) → string
thisown

The membership flag

class bempp.core.Preconditioner_ValueType

Bases: object

Proxy of C++ Preconditioner<ValueType> class

thisown

The membership flag

valueType(self) → string
class bempp.core.QuadratureOptions

Bases: object

Proxy of C++ Fiber::QuadratureOptions class

order
orderIncrement
quadratureOrder(self, defaultOrder) → int
Parameters:
  • defaultOrder (int)
setAbsoluteQuadratureOrder(self, order)
Parameters:
  • order (int)
setRelativeQuadratureOrder(self, offset)
Parameters:
  • offset (int)
thisown

The membership flag

class bempp.core.QuadratureStrategyBase_BasisFunctionType_ResultType

Bases: object

Proxy of C++ Fiber::QuadratureStrategyBase<BasisFunctionType,ResultType,Bempp::GeometryFactory)> class

basisFunctionType(self) → string
resultType(self) → string
thisown

The membership flag

class bempp.core.QuadratureStrategy_BasisFunctionType_ResultType

Bases: bempp.core.QuadratureStrategyBase_BasisFunctionType_ResultType

Proxy of C++ Fiber::QuadratureStrategy<BasisFunctionType,ResultType,Bempp::GeometryFactory)> class

basisFunctionType(self) → string
resultType(self) → string
thisown

The membership flag

class bempp.core.SolutionBase_BasisFunctionType_ResultType

Bases: object

Proxy of C++ SolutionBase<BasisFunctionType,ResultType> class

achievedTolerance(self) → float
extraParameters(self) → Teuchos::RCP< Teuchos::ParameterList >
iterationCount(self) → int
solverMessage(self) → string
status(self) → SolutionStatus::Status
thisown

The membership flag

class bempp.core.SolutionStatus

Bases: object

Proxy of C++ Bempp::SolutionStatus class

CONVERGED = 0
UNCONVERGED = 1
UNKNOWN = 2
thisown

The membership flag

class bempp.core.Solution_BasisFunctionType_ResultType

Bases: bempp.core.SolutionBase_BasisFunctionType_ResultType

Proxy of C++ Solution<BasisFunctionType,ResultType> class

gridFunction(self) → GridFunction_BasisFunctionType_ResultType

gridFunction(self) -> GridFunction_BasisFunctionType_ResultType

thisown

The membership flag

class bempp.core.Solver_BasisFunctionType_ResultType

Bases: object

Proxy of C++ Solver<BasisFunctionType,ResultType> class

basisFunctionType(self) → string
resultType(self) → string
solve(self, rhs) → Solution_BasisFunctionType_ResultType
Parameters:
  • rhs (GridFunction_BasisFunctionType_ResultType)

solve(self, rhs) -> BlockedSolution_BasisFunctionType_ResultType

Parameters:
  • rhs (list of GridFunction_BasisFunctionType_ResultType objects)
thisown

The membership flag

class bempp.core.Space_BasisFunctionType

Bases: object

Proxy of C++ Space<BasisFunctionType> class

assignDofs(self)
barycentricSpace(self, self) → Space_BasisFunctionType
basisFunctionType(self) → string
codomainDimension(self) → int
discontinuousSpace(self, self) → Space_BasisFunctionType
dofsAssigned(self) → bool
domainDimension(self) → int
elementGeometryFactory(self) → GeometryFactory
flatLocalDofCount(self) → int
getGlobalDofInterpolationDirections(self, directions)
Parameters:
  • directions (2D array)
getGlobalDofInterpolationPoints(self, points)
Parameters:
  • points (2D array)
getNormalsAtGlobalDofInterpolationPoints(self)
globalDofCount(self) → int
globalDofNormals(self)
globalDofPositions(self)
grid(self) → Grid
gridDimension(self) → int
gridIsIdentical(self, other) → bool
Parameters:
  • other (Space_BasisFunctionType)
gridView(self) → GridView
isBarycentric(self) → bool
isDiscontinuous(self) → bool
level(self) → int
spaceIdentifier(self) → SpaceIdentifier
spaceIsCompatible(self, other) → bool
Parameters:
  • other (Space_BasisFunctionType)
thisown

The membership flag

worldDimension(self) → int
class bempp.core.VerbosityLevel

Bases: object

Proxy of C++ Fiber::VerbosityLevel class

DEFAULT = 0
HIGH = 5
LOW = -5
thisown

The membership flag

class bempp.core.VtkWriter

Bases: object

Exporter of data in the vtk format.

Exports data (living on cells or vertices of a grid) to a file suitable for easy visualization with the Visualization Toolkit (VTK; see http://public.kitware.com/VTK)

APPENDED_BASE_64 = 3
APPENDED_RAW = 2
ASCII = 0
BASE_64 = 1
CELL_DATA = 0
VERTEX_DATA = 1
addCellData(self, data, name)

addCellData(self, data, name)

Add to the visualization output a grid function representing data associated with the cells of the grid.

Parameters:
  • data (ndarray)

    2D array whose (m, n)th entry contains the value of the mth component of the grid function in the nth cell.

  • name (string)

    Name to identify the grid function.

addVertexData(self, data, name)

addVertexData(self, data, name)

Add to the visualization output a grid function representing data associated with the vertices of the grid.

Parameters:
  • data (ndarray)

    2D array whose (m, n)th entry contains the value of the mth component of the grid function at the nth vertex.

  • name (string)

    Name to identify the grid function.

clear(self)

Clear the list of registered functions.

parentGridView

Parent grid view

pwrite(self, name, path, extendpath, type = 'ascii') → string

Write output (interface might change later).

‘pwrite’ means ‘path write’ (i.e. write somewhere else than the current directory). The ‘p’ does not mean this method has a monopoly on parallel writing, the regular write() method can do that just fine.

Parameters:
  • name (string)

    Base name of the output files. This should not contain any directory part or filename extensions. It will be used both for the piece file of each process and the parallel collection file.

  • path (string)

    Directory where to put the parallel collection (.pvtu/.pvtp) file. If it is relative, it is taken relative to the current directory.

  • extendpath (string)

    Directory where to put the piece file (.vtu/.vtp) of this process. If it is relative, it is taken relative to the directory denoted by path.

  • type (string, optional)

    Format of the output, one of ‘ascii’ (default), ‘base64’, ‘appendedraw’ or ‘appendedbase64’.

Returns the name of the created file.

Note: Currently, extendpath may not be absolute unless path is.

thisown

The membership flag

write(self, name, type = 'ascii') → string

Write output (interface might change later).

This method can be used in parallel as well as in serial programs. For serial runs (commSize=1) it chooses other names without the ‘s####:p####:’ prefix for the .vtu/.vtp files and omits writing of the .pvtu/pvtp file however. For parallel runs (commSize > 1) it is the same as a call to pwrite() with path=’’ and extendpath=’‘.

Parameters:
  • name (string)

    Basic name to write (may not contain a path).

  • type (string, optional)

    Format of the output, one of ‘ascii’ (default), ‘base64’, ‘appendedraw’ or ‘appendedbase64’.

Returns the name of the created file.

bempp.core.acaOperatorApproximateLuInverse_ValueType(op, delta) → DiscreteBoundaryOperator_ValueType
Parameters:
  • op (DiscreteBoundaryOperator_ValueType)
  • delta (float)
bempp.core.acaOperatorSum_ValueType(op1, op2, eps, maximumRank) → DiscreteBoundaryOperator_ValueType
Parameters:
  • op1 (DiscreteBoundaryOperator_ValueType)
  • op2 (DiscreteBoundaryOperator_ValueType)
  • eps (float)
  • maximumRank (int)
bempp.core.adjoint_complex128_complex128(op) → BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • op (BoundaryOperator_BasisFunctionType_ResultType)

adjoint_complex128_complex128(op, range) -> BoundaryOperator_BasisFunctionType_ResultType

Parameters:
  • op (BoundaryOperator_BasisFunctionType_ResultType)
  • range (Space_BasisFunctionType)
bempp.core.areInside(grid, points) → vector_bool
bempp.core.defaultCgParameterList(tol, maxIterationCount=1000) → Teuchos::RCP< Teuchos::ParameterList >
Parameters:
  • tol (float)
  • maxIterationCount (int)

defaultCgParameterList(tol) -> Teuchos::RCP< Teuchos::ParameterList >

Parameters:
  • tol (float)
bempp.core.defaultGmresParameterList(tol, maxIterationCount=1000) → Teuchos::RCP< Teuchos::ParameterList >
Parameters:
  • tol (float)
  • maxIterationCount (int)

defaultGmresParameterList(tol) -> Teuchos::RCP< Teuchos::ParameterList >

Parameters:
  • tol (float)
bempp.core.discreteBlockDiagonalPreconditioner_ValueType(opVector) → Preconditioner_ValueType
Parameters:
  • opVector (list of DiscreteBoundaryOperator_ValueType objects)
bempp.core.discreteDenseBoundaryOperator_complex128(mat) → DiscreteBoundaryOperator_ValueType
Parameters:
  • mat (2D array)
bempp.core.discreteOperatorToPreconditioner_ValueType(discreteOperator) → Preconditioner_ValueType
Parameters:
  • discreteOperator (DiscreteBoundaryOperator_ValueType)
bempp.core.discreteSparseInverse_ValueType(discreteOp) → DiscreteBoundaryOperator_ValueType
Parameters:
  • discreteOp (DiscreteBoundaryOperator_ValueType)
bempp.core.exportToGmsh_complex128_complex128(gridFunction, dataLabel, fileName)
Parameters:
  • gridFunction (GridFunction_BasisFunctionType_ResultType)
  • dataLabel (string)
  • fileName (string)
bempp.core.exportToVtk_complex128_complex128(gridFunction, dataType, dataLabel, fileNamesBase, filesPath=None, type='ascii')
Parameters:
  • gridFunction (GridFunction_BasisFunctionType_ResultType)
  • dataType (‘cell_data’ or ‘vertex_data’)
  • dataLabel (string)
  • fileNamesBase (string)
  • filesPath (string)
  • type (‘ascii’, ‘base64’, ‘appendedraw’ or ‘appendedbase64’)

exportToVtk_complex128_complex128(gridFunction, dataType, dataLabel, fileNamesBase, filesPath=None)

Parameters:
  • gridFunction (GridFunction_BasisFunctionType_ResultType)
  • dataType (‘cell_data’ or ‘vertex_data’)
  • dataLabel (string)
  • fileNamesBase (string)
  • filesPath (string)

exportToVtk_complex128_complex128(gridFunction, dataType, dataLabel, fileNamesBase)

Parameters:
  • gridFunction (GridFunction_BasisFunctionType_ResultType)
  • dataType (‘cell_data’ or ‘vertex_data’)
  • dataLabel (string)
  • fileNamesBase (string)
bempp.core.gridFunctionFromCoefficients_BasisFunctionType_ResultType(context, space, dualSpace, data) → GridFunction_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • space (Space_BasisFunctionType)
  • dualSpace (Space_BasisFunctionType)
  • data (1D array)
bempp.core.gridFunctionFromProjections_complex128_complex128(context, space, dualSpace, data) → GridFunction_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • space (Space_BasisFunctionType)
  • dualSpace (Space_BasisFunctionType)
  • data (1D array)
bempp.core.gridFunctionFromPythonSurfaceNormalDependentFunctor_BasisFunctionType_ResultType(context, space, dualSpace, functor, mode) → GridFunction_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • space (Space_BasisFunctionType)
  • dualSpace (Space_BasisFunctionType)
  • functor (PythonSurfaceNormalDependentFunctor_ValueType)
  • mode (enum GridFunction_BasisFunctionType_ResultType::ConstructionMode)
bempp.core.gridFunctionFromPythonSurfaceNormalIndependentFunctor_BasisFunctionType_ResultType(context, space, dualSpace, functor, mode) → GridFunction_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • space (Space_BasisFunctionType)
  • dualSpace (Space_BasisFunctionType)
  • functor (PythonSurfaceNormalIndependentFunctor_ValueType)
  • mode (enum GridFunction_BasisFunctionType_ResultType::ConstructionMode)
bempp.core.gridSegmentWithPositiveX(grid, level=0) → GridSegment

gridSegmentWithPositiveX(grid) -> GridSegment

bempp.core.helmholtz3dAdjointDoubleLayerBoundaryOperator_ResultType(*args)
helmholtz3dAdjointDoubleLayerBoundaryOperator_ResultType(context, domain, range, dualToRange, waveNumber, label=””, symmetry=NO_SYMMETRY,
useInterpolation=False, interpPtsPerWavelength=DEFAULT_HELMHOLTZ_INTERPOLATION_DENSITY) -> BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • waveNumber (complex)
  • label (string)
  • symmetry (int)
  • useInterpolation (bool)
  • interpPtsPerWavelength (int)
bempp.core.helmholtz3dDoubleLayerBoundaryOperator_ResultType(*args)
helmholtz3dDoubleLayerBoundaryOperator_ResultType(context, domain, range, dualToRange, waveNumber, label=””, symmetry=NO_SYMMETRY,
useInterpolation=False, interpPtsPerWavelength=DEFAULT_HELMHOLTZ_INTERPOLATION_DENSITY) -> BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • waveNumber (complex)
  • label (string)
  • symmetry (int)
  • useInterpolation (bool)
  • interpPtsPerWavelength (int)
bempp.core.helmholtz3dDoubleLayerPotentialOperator_ResultType(waveNumber) → PotentialOperator_BasisFunctionType_ResultType
Parameters:
  • waveNumber (complex)
bempp.core.helmholtz3dFarFieldDoubleLayerPotentialOperator_ResultType(waveNumber) → PotentialOperator_BasisFunctionType_ResultType
Parameters:
  • waveNumber (complex)
bempp.core.helmholtz3dFarFieldSingleLayerPotentialOperator_ResultType(waveNumber) → PotentialOperator_BasisFunctionType_ResultType
Parameters:
  • waveNumber (complex)
bempp.core.helmholtz3dHypersingularBoundaryOperator_ResultType(*args)
helmholtz3dHypersingularBoundaryOperator_ResultType(context, domain, range, dualToRange, waveNumber, label=””, symmetry=NO_SYMMETRY,
useInterpolation=False, interpPtsPerWavelength=DEFAULT_HELMHOLTZ_INTERPOLATION_DENSITY) -> BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • waveNumber (complex)
  • label (string)
  • symmetry (int)
  • useInterpolation (bool)
  • interpPtsPerWavelength (int)
bempp.core.helmholtz3dSingleLayerBoundaryOperator_ResultType(*args)
helmholtz3dSingleLayerBoundaryOperator_ResultType(context, domain, range, dualToRange, waveNumber, label=””, symmetry=NO_SYMMETRY,
useInterpolation=False, interpPtsPerWavelength=DEFAULT_HELMHOLTZ_INTERPOLATION_DENSITY) -> BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • waveNumber (complex)
  • label (string)
  • symmetry (int)
  • useInterpolation (bool)
  • interpPtsPerWavelength (int)
bempp.core.helmholtz3dSingleLayerPotentialOperator_ResultType(waveNumber) → PotentialOperator_BasisFunctionType_ResultType
Parameters:
  • waveNumber (complex)
bempp.core.identityOperator_BasisFunctionType_ResultType(context, domain, range, dualToRange, label="", symmetry=AUTO_SYMMETRY) → BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • label (string)
  • symmetry (int)
bempp.core.laplace3dAdjointDoubleLayerBoundaryOperator_BasisFunctionType_ResultType(context, domain, range, dualToRange, label="", symmetry=NO_SYMMETRY) → BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • label (string)
  • symmetry (int)
bempp.core.laplace3dDoubleLayerBoundaryOperator_BasisFunctionType_ResultType(context, domain, range, dualToRange, label="", symmetry=NO_SYMMETRY) → BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • label (string)
  • symmetry (int)
bempp.core.laplace3dDoubleLayerPotentialOperator_BasisFunctionType_ResultType() → PotentialOperator_BasisFunctionType_ResultType
bempp.core.laplace3dHypersingularBoundaryOperator_BasisFunctionType_ResultType(context, domain, range, dualToRange, label="", symmetry=NO_SYMMETRY) → BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • label (string)
  • symmetry (int)
bempp.core.laplace3dSingleLayerBoundaryOperator_BasisFunctionType_ResultType(context, domain, range, dualToRange, label="", symmetry=NO_SYMMETRY) → BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • label (string)
  • symmetry (int)
bempp.core.laplace3dSingleLayerPotentialOperator_BasisFunctionType_ResultType() → PotentialOperator_BasisFunctionType_ResultType
bempp.core.laplaceBeltrami3dOperator_complex128_complex128(context, domain, range, dualToRange, label="", symmetry=NO_SYMMETRY) → BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • label (string)
  • symmetry (int)
bempp.core.maxwell3dDoubleLayerBoundaryOperator_complex128(*args)
maxwell3dDoubleLayerBoundaryOperator_complex128(context, domain, range, dualToRange, waveNumber, label=””, symmetry=NO_SYMMETRY,
useInterpolation=False, interpPtsPerWavelength=DEFAULT_HELMHOLTZ_INTERPOLATION_DENSITY) -> BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • waveNumber (complex)
  • label (string)
  • symmetry (int)
  • useInterpolation (bool)
  • interpPtsPerWavelength (int)
bempp.core.maxwell3dDoubleLayerPotentialOperator_complex128(waveNumber) → PotentialOperator_BasisFunctionType_ResultType
Parameters:
  • waveNumber (complex)
bempp.core.maxwell3dFarFieldDoubleLayerPotentialOperator_complex128(waveNumber) → PotentialOperator_BasisFunctionType_ResultType
Parameters:
  • waveNumber (complex)
bempp.core.maxwell3dFarFieldSingleLayerPotentialOperator_complex128(waveNumber) → PotentialOperator_BasisFunctionType_ResultType
Parameters:
  • waveNumber (complex)
bempp.core.maxwell3dIdentityOperator_complex128_complex128(context, domain, range, dualToRange, label="", symmetry=NO_SYMMETRY) → BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • label (string)
  • symmetry (int)
bempp.core.maxwell3dSingleLayerBoundaryOperator_complex128(*args)
maxwell3dSingleLayerBoundaryOperator_complex128(context, domain, range, dualToRange, waveNumber, label=””, symmetry=NO_SYMMETRY,
useInterpolation=False, interpPtsPerWavelength=DEFAULT_HELMHOLTZ_INTERPOLATION_DENSITY) -> BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • waveNumber (complex)
  • label (string)
  • symmetry (int)
  • useInterpolation (bool)
  • interpPtsPerWavelength (int)
bempp.core.maxwell3dSingleLayerPotentialOperator_complex128(waveNumber) → PotentialOperator_BasisFunctionType_ResultType
Parameters:
  • waveNumber (complex)
bempp.core.modifiedHelmholtz3dAdjointDoubleLayerBoundaryOperator_BasisFunctionType_KernelType_ResultType(*args)
modifiedHelmholtz3dAdjointDoubleLayerBoundaryOperator_BasisFunctionType_KernelType_ResultType(context, domain, range, dualToRange, waveNumber, label=””, symmetry=NO_SYMMETRY,
useInterpolation=False, interpPtsPerWavelength=DEFAULT_HELMHOLTZ_INTERPOLATION_DENSITY) -> BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • waveNumber (complex)
  • label (string)
  • symmetry (int)
  • useInterpolation (bool)
  • interpPtsPerWavelength (int)
bempp.core.modifiedHelmholtz3dDoubleLayerBoundaryOperator_BasisFunctionType_KernelType_ResultType(*args)
modifiedHelmholtz3dDoubleLayerBoundaryOperator_BasisFunctionType_KernelType_ResultType(context, domain, range, dualToRange, waveNumber, label=””, symmetry=NO_SYMMETRY,
useInterpolation=False, interpPtsPerWavelength=DEFAULT_HELMHOLTZ_INTERPOLATION_DENSITY) -> BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • waveNumber (complex)
  • label (string)
  • symmetry (int)
  • useInterpolation (bool)
  • interpPtsPerWavelength (int)
bempp.core.modifiedHelmholtz3dDoubleLayerPotentialOperator_complex128(waveNumber) → PotentialOperator_BasisFunctionType_ResultType
Parameters:
  • waveNumber (complex)
bempp.core.modifiedHelmholtz3dHypersingularBoundaryOperator_BasisFunctionType_KernelType_ResultType(*args)
modifiedHelmholtz3dHypersingularBoundaryOperator_BasisFunctionType_KernelType_ResultType(context, domain, range, dualToRange, waveNumber, label=””, symmetry=NO_SYMMETRY,
useInterpolation=False, interpPtsPerWavelength=DEFAULT_HELMHOLTZ_INTERPOLATION_DENSITY) -> BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • waveNumber (complex)
  • label (string)
  • symmetry (int)
  • useInterpolation (bool)
  • interpPtsPerWavelength (int)
bempp.core.modifiedHelmholtz3dSingleLayerBoundaryOperator_BasisFunctionType_KernelType_ResultType(*args)
modifiedHelmholtz3dSingleLayerBoundaryOperator_BasisFunctionType_KernelType_ResultType(context, domain, range, dualToRange, waveNumber, label=””, symmetry=NO_SYMMETRY,
useInterpolation=False, interpPtsPerWavelength=DEFAULT_HELMHOLTZ_INTERPOLATION_DENSITY) -> BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • waveNumber (complex)
  • label (string)
  • symmetry (int)
  • useInterpolation (bool)
  • interpPtsPerWavelength (int)
bempp.core.modifiedHelmholtz3dSingleLayerPotentialOperator_complex128(waveNumber) → PotentialOperator_BasisFunctionType_ResultType
Parameters:
  • waveNumber (complex)
bempp.core.nullOperator_BasisFunctionType_ResultType(context, domain, range, dualToRange, label="", symmetry=AUTO_SYMMETRY) → BoundaryOperator_BasisFunctionType_ResultType
Parameters:
  • context (Context_BasisFunctionType_ResultType)
  • domain (Space_BasisFunctionType)
  • range (Space_BasisFunctionType)
  • dualToRange (Space_BasisFunctionType)
  • label (string)
  • symmetry (int)
bempp.core.numericalQuadratureStrategy_BasisFunctionType_ResultType(accuracyOptions) → QuadratureStrategy_BasisFunctionType_ResultType
Parameters:
  • accuracyOptions (AccuracyOptionsEx)

numericalQuadratureStrategy_BasisFunctionType_ResultType(accuracyOptions) -> QuadratureStrategy_BasisFunctionType_ResultType

Parameters:
  • accuracyOptions (AccuracyOptions)
bempp.core.piecewiseConstantDualGridScalarSpace_BasisFunctionType(grid) → Space_BasisFunctionType
Parameters:
  • grid (boost::shared_ptr< Grid >)
bempp.core.piecewiseConstantScalarSpaceBarycentric_complex128(grid, segment=None) → Space_BasisFunctionType
Parameters:
  • grid (boost::shared_ptr< Grid >)
  • segment (GridSegment *)
bempp.core.piecewiseConstantScalarSpace_BasisFunctionType(grid, segment=None) → Space_BasisFunctionType
Parameters:
  • grid (boost::shared_ptr< Grid >)
  • segment (GridSegment *)
bempp.core.piecewiseLinearContinuousScalarSpaceBarycentric_complex128(grid, segment=None, strictlyOnSegment=False) → Space_BasisFunctionType
Parameters:
  • grid (boost::shared_ptr< Grid >)
  • segment (GridSegment *)
  • strictlyOnSegment (bool)
bempp.core.piecewiseLinearContinuousScalarSpace_BasisFunctionType(grid, segment=None, strictlyOnSegment=False) → Space_BasisFunctionType
Parameters:
  • grid (boost::shared_ptr< Grid >)
  • segment (GridSegment *)
  • strictlyOnSegment (bool)
bempp.core.piecewiseLinearDiscontinuousScalarSpaceBarycentric_complex128(grid, segment=None, strictlyOnSegment=False) → Space_BasisFunctionType
Parameters:
  • grid (boost::shared_ptr< Grid >)
  • segment (GridSegment *)
  • strictlyOnSegment (bool)

piecewiseLinearDiscontinuousScalarSpaceBarycentric_complex128(grid, segment=None) -> Space_BasisFunctionType

Parameters:
  • grid (boost::shared_ptr< Grid >)
  • segment (GridSegment *)

piecewiseLinearDiscontinuousScalarSpaceBarycentric_complex128(grid) -> Space_BasisFunctionType

Parameters:
  • grid (boost::shared_ptr< Grid >)
bempp.core.piecewiseLinearDiscontinuousScalarSpace_BasisFunctionType(grid, segment=None, strictlyOnSegment=False) → Space_BasisFunctionType
Parameters:
  • grid (boost::shared_ptr< Grid >)
  • segment (GridSegment *)
  • strictlyOnSegment (bool)
bempp.core.piecewisePolynomialContinuousScalarSpace_BasisFunctionType(grid, polynomialOrder, segment=None, strictlyOnSegment=False) → Space_BasisFunctionType
Parameters:
  • grid (boost::shared_ptr< Grid >)
  • polynomialOrder (int)
  • segment (GridSegment *)
  • strictlyOnSegment (bool)
bempp.core.piecewisePolynomialDiscontinuousScalarSpace_BasisFunctionType(grid, polynomialOrder, segment=None, dofMode=Bempp::REFERENCE_POINT_ON_SEGMENT) → Space_BasisFunctionType
Parameters:
  • grid (boost::shared_ptr< Grid >)
  • polynomialOrder (int)
  • segment (GridSegment *)
  • dofMode (int)
bempp.core.raviartThomas0VectorSpace_BasisFunctionType(grid, segment=None, putDofsOnBoundaries=False, dofMode=Bempp::EDGE_ON_SEGMENT) → Space_BasisFunctionType
Parameters:
  • grid (boost::shared_ptr< Grid >)
  • segment (GridSegment *)
  • putDofsOnBoundaries (bool)
  • dofMode (int)

raviartThomas0VectorSpace_BasisFunctionType(grid, segment=None, putDofsOnBoundaries=False) -> Space_BasisFunctionType

Parameters:
  • grid (boost::shared_ptr< Grid >)
  • segment (GridSegment *)
  • putDofsOnBoundaries (bool)

raviartThomas0VectorSpace_BasisFunctionType(grid, segment=None) -> Space_BasisFunctionType

Parameters:
  • grid (boost::shared_ptr< Grid >)
  • segment (GridSegment *)

raviartThomas0VectorSpace_BasisFunctionType(grid) -> Space_BasisFunctionType

Parameters:
  • grid (boost::shared_ptr< Grid >)
bempp.core.scaledAcaOperator_ValueType(multiplier, op) → DiscreteBoundaryOperator_ValueType
Parameters:
  • multiplier (complex)
  • op (DiscreteBoundaryOperator_ValueType)

scaledAcaOperator_ValueType(op, multiplier) -> DiscreteBoundaryOperator_ValueType

Parameters:
  • op (DiscreteBoundaryOperator_ValueType)
  • multiplier (complex)
bempp.core.uninitializedGridFunction_BasisFunctionType_ResultType() → GridFunction_BasisFunctionType_ResultType
bempp.core.unitScalarSpace_BasisFunctionType(grid) → Space_BasisFunctionType
Parameters:
  • grid (boost::shared_ptr< Grid >)
class bempp.core.vectord

Bases: object

Proxy of C++ std::vector<(double)> class

append(self, x)
Parameters:
  • x (std::vector< double >::value_type)
assign(self, n, x)
Parameters:
  • n (std::vector< double >::intype)
  • x (std::vector< double >::value_type)
back(self) → std::vector< double >::value_type const &
begin(self) → std::vector< double >::iterator
capacity(self) → std::vector< double >::size_type
clear(self)
empty(self) → bool
end(self) → std::vector< double >::iterator
erase(self, pos) → std::vector< double >::iterator
Parameters:
  • pos (std::vector< double >::iterator)

erase(self, first, last) -> std::vector< double >::iterator

Parameters:
  • first (std::vector< double >::iterator)
  • last (std::vector< double >::iterator)
front(self) → std::vector< double >::value_type const &
get_allocator(self) → std::vector< double >::allocator_type
insert(self, pos, x) → std::vector< double >::iterator
Parameters:
  • pos (std::vector< double >::iterator)
  • x (std::vector< double >::value_type)

insert(self, pos, n, x)

Parameters:
  • pos (std::vector< double >::iterator)
  • n (std::vector< double >::intype)
  • x (std::vector< double >::value_type)
iterator(self) → SwigPyIterator
pop(self) → std::vector< double >::value_type
pop_back(self)
push_back(self, x)
Parameters:
  • x (std::vector< double >::value_type)
rbegin(self) → std::vector< double >::reverse_iterator
rend(self) → std::vector< double >::reverse_iterator
reserve(self, n)
Parameters:
  • n (std::vector< double >::intype)
resize(self, new_size)
Parameters:
  • new_size (std::vector< double >::intype)

resize(self, new_size, x)

Parameters:
  • new_size (std::vector< double >::intype)
  • x (std::vector< double >::value_type)
size(self) → std::vector< double >::size_type
swap(self, v)
Parameters:
  • v (std::vector< double >)
thisown

The membership flag

class bempp.core.vectori

Bases: object

Proxy of C++ std::vector<(int)> class

append(self, x)
assign(self, n, x)
back(self) → std::vector< int >::value_type
begin(self) → std::vector< int >::iterator
capacity(self) → std::vector< int >::size_type
clear(self)
empty(self) → bool
end(self) → std::vector< int >::iterator
erase(self, pos) → std::vector< int >::iterator

erase(self, first, last) -> std::vector< int >::iterator

front(self) → std::vector< int >::value_type
get_allocator(self) → std::vector< int >::allocator_type
insert(self, pos, x) → std::vector< int >::iterator

insert(self, pos, n, x)

iterator(self) → SwigPyIterator
pop(self) → std::vector< int >::value_type
pop_back(self)
push_back(self, x)
rbegin(self) → std::vector< int >::reverse_iterator
rend(self) → std::vector< int >::reverse_iterator
reserve(self, n)
resize(self, new_size)

resize(self, new_size, x)

size(self) → std::vector< int >::size_type
swap(self, v)
thisown

The membership flag

Table Of Contents

Previous topic

Welcome to BEM++’s documentation!

Next topic

The bempp.lib module

This Page