Public API

The sympde.api package provides the supported flat namespace for user-facing objects. For example:

from sympde.api import Cube, Mapping, Constant
from sympde.api import ScalarFunctionSpace, elements_of
from sympde.api import BilinearForm, LinearForm, Norm

The complete namespace is listed below. These objects are also documented and indexed at their defining modules, so this page does not create duplicate cross-reference targets.

Public user-facing API for SymPDE.

This module is the one supported location for convenient, flat imports such as:

from sympde.api import BilinearForm, Square, elements_of, grad

It contains the objects used by the projects that depend on SymPDE (PSYDAC, IGA-Python and GeLaTo) and by the SymPDE documentation. Every object is imported from the module that defines it.

Internal SymPDE code and the unit tests import objects from their defining modules instead, to keep their dependencies explicit.

class sympde.api.Advection(axis, weight=1)[source]
class sympde.api.AdvectionT(axis, weight=1)[source]
class sympde.api.AffineMapping(name, dim=None, **kwargs)[source]

Represents a 1D/2D/3D Affine Mapping object.

Examples

class sympde.api.Area(*args)[source]
classmethod eval(*args)[source]

.

class sympde.api.Basic1dForm(axis, weight=1)[source]
class sympde.api.BasicCallableMapping[source]

Transformation of coordinates, which can be evaluated.

F: R^l -> R^p F(eta) = x

with l <= p

abstract jacobian(*eta)[source]

Compute Jacobian matrix at location eta.

abstract jacobian_inv(*eta)[source]

Compute inverse Jacobian matrix at location eta. An exception should be raised if the matrix is singular.

abstract property ldim

Number of logical/parametric dimensions in mapping (= number of eta components).

abstract metric(*eta)[source]

Compute components of metric tensor at location eta.

abstract metric_det(*eta)[source]

Compute determinant of metric tensor at location eta.

abstract property pdim

Number of physical dimensions in mapping (= number of x components).

class sympde.api.BasicDomain(*args)[source]
class sympde.api.BasicForm(*args)[source]
class sympde.api.BasicFunctionSpace(name, domain, shape, kind)[source]

Represents a basic continuous Function space.

Examples

property kind

Default kind for all SymPy object. If the kind is not defined for the object, or if the object cannot infer the kind from its arguments, this will be returned.

Examples

>>> from sympy import Expr
>>> Expr().kind
UndefinedKind
class sympde.api.Bilaplacian(axis, weight=1)[source]
class sympde.api.BilinearForm(arguments, expr, check_linearity=True, ignore_linearity_errors=False, **options)[source]
class sympde.api.Boundary(name, domain, axis=None, ext=None, mapping=None, logical_domain=None)[source]

Represents an undefined boundary over a domain.

Examples

class sympde.api.CallableMapping(mapping, **kwargs)[source]
jacobian(*eta)[source]

Compute Jacobian matrix at location eta.

jacobian_inv(*eta)[source]

Compute the inverse Jacobian matrix, if possible.

property ldim

Number of logical/parametric dimensions in mapping (= number of eta components).

metric(*eta)[source]

Compute components of metric tensor at location eta.

metric_det(*eta)[source]

Compute determinant of metric tensor at location eta.

property pdim

Number of physical dimensions in mapping (= number of x components).

class sympde.api.CollelaMapping2D(name, dim=None, **kwargs)[source]

Represents a Collela 2D Mapping object.

class sympde.api.Constant(*args, **kwargs)[source]

Represents a constant symbol.

Examples

class sympde.api.Cube(name='Cube', bounds1=(0, 1), bounds2=(0, 1), bounds3=(0, 1), *structural_args)[source]
class sympde.api.CzarnyMapping(name, dim=None, **kwargs)[source]

Represents a Czarny 2D Mapping object.

Examples

class sympde.api.Derham(domain, sequence=None)[source]

.

class sympde.api.DifferentialForm(name, index, dim)[source]

Represents a differential form symbol.

Examples

sympde.api.Dn

alias of NormalDerivative

class sympde.api.Domain(name: str, interiors: TypeUnion[Iterable[InteriorDomain], InteriorDomain, None] = None, boundaries: TypeUnion[Iterable[Boundary], Boundary, None] = None, mapping: Mapping | None = None, logical_domain: Domain | None = None, connectivity: TypeUnion[Connectivity, Iterable[Interface], None] = None, *, dim: int | None = None)[source]

Represents an undefined domain. A domain is defined by at least one interior domain and possible boundaries. A domain without a boundary is either infinite or periodic. Instead of interior domains, only a dimension can be given, in which case a single interior domain with the name of the domain is created. Multi-patch domains additionally carry a connectivity, which describes the interfaces between their patches.

property boundary: Union | Boundary

Either a Union object containing the boundaries or just a boundary if there is only one

property connectivity: Connectivity

Contains information about the interfaces

property dim: int

Dimension of the space

property dtype: dict

Dictionary containing information about domain

classmethod from_file(filename)[source]

Read the “topology.yml” portion of an HDF5 geometry file and create a (mapped) multipatch domain using the information therein.

Parameters

filenamestr

Name of the HDF5 geometry file to be read.

Returns

Domain

Multipatch domain.

get_boundary(axis, ext)[source]

Return the domain boundary at the given extremity of the required axis.

Parameters

axisint | None

Index of the coordinate (0 <= axis < ndim) which has constant value at the boundary. In 1D passing axis=None is accepted, in which case it is interpreted as 0.

ext{-1, +1}
Extremity identifier:
  • If -1, the boundary is at the minimum value of $x_{axis}$

  • If +1, the boundary is at the maximum value of $x_{axis}$

Returns

Boundary (from sympde.topology.basic)

The domain boundary of interest.

get_interior(name)[source]

return interior by name.

get_shared_corners()[source]

Compute the corners shared by multiple patches in 2D

get_subdomain(names)[source]

Returns an individual patch or a Union of patches of a multipatch domain.

Parameters

namestuple of str or str

Names of the patches to join. If a string is given, the corresponding patch will be returned. If a tuple of strings is given, the Union of the corresponding subdomains will be returned.

Notes

The subdomain is returned as it was before being joined, which means that its boundary includes the boundaries that are part of an interface in the multipatch domain.

property interfaces: Union | Interface | None

Union of the interfaces

The Union constructor is applied to the interfaces. If there is only one interface it returns the interface object and None if there is no interface.

property interior: Union | InteriorDomain

Either a Union object containing the interiors or just the interior domain if there is only one

classmethod join(patches, connectivity, name)[source]

Create a multipatch domain by joining patches in 2D or 3D.

Parameters

patchessequence of Domain

Atomic patches in the joined domain.

connectivitysequence of tuple

Interface descriptions of the form (minus, plus, orientation). Each side is (patch, axis, ext), where patch is a patch object or its index in patches and ext is -1 or 1. A 2D orientation is -1 or 1. A 3D orientation is a tuple of three values, each equal to -1 or 1.

namestr

Name of the domain.

Returns

Domain

Multipatch domain.

Notes

The orientations are specified in the same manner as in GeoPDES, see e.g. <https://github.com/rafavzqz/geopdes/blob/master/geopdes/doc/geo_specs_mp_v21.txt#L193-L237> and T. Dokken, E. Quak, V. Skytt. Requirements from Isogeometric Analysis for changes in product design ontologies, 2010.

Example

# list of patches (mapped domains)
Omega_0 = F0(A)
Omega_1 = F1(A)
Omega_2 = F2(A)
Omega_3 = F3(A)

patches = [Omega_0, Omega_1, Omega_2, Omega_3]

# integers representing the axes
axis_0 = 0
axis_1 = 1
axis_2 = 2

# integers representing the extremities: left (-1) or right (+1)
ext_0 = -1
ext_1 = +1

# A connectivity list in 2D
connectivity = [((Omega_0, axis_0, ext_0), (Omega_1, axis_0, ext_1),  1),
                ((Omega_1, axis_1, ext_0), (Omega_3, axis_1, ext_1), -1),
                ((Omega_0, axis_1, ext_0), (Omega_2, axis_1, ext_1),  1),
                ((Omega_2, axis_0, ext_0), (Omega_3, axis_0, ext_1), -1)]

# alternative option (passing interface patches by their indices in the patches list):
connectivity = [((0, axis_0, ext_0), (1, axis_0, ext_1),  1),
                ((1, axis_1, ext_0), (3, axis_1, ext_1), -1),
                ((0, axis_1, ext_0), (2, axis_1, ext_1),  1),
                ((2, axis_0, ext_0), (3, axis_0, ext_1), -1)]

# A connectivity list in 3D
connectivity = [((Omega_0, axis_0, ext_1), (Omega_1, axis_0, ext_0), ( 1,  1,  1)),
                ((Omega_0, axis_1, ext_1), (Omega_2, axis_1, ext_0), ( 1, -1,  1)),
                ((Omega_1, axis_1, ext_1), (Omega_3, axis_1, ext_0), (-1,  1, -1)),
                ((Omega_2, axis_0, ext_1), (Omega_3, axis_0, ext_0), (-1,  1,  1))]

# alternative option (passing interface patches by their indices in the patches list):
connectivity = [((0, axis_0, ext_1), (1, axis_0, ext_0), ( 1,  1,  1)),
                ((0, axis_1, ext_1), (2, axis_1, ext_0), ( 1, -1,  1)),
                ((1, axis_1, ext_1), (3, axis_1, ext_0), (-1,  1, -1)),
                ((2, axis_0, ext_1), (3, axis_0, ext_0), (-1,  1,  1))]

# the multi-patch domain
Omega = Domain.join(patches=patches, connectivity=connectivity, name='Omega')
property logical_domain: Domain

The domain is the image of the logical_domain under the mapping

property mapping: Mapping | None

The mapping that maps the logical domain to the physical domain

property subdomains: tuple

returns subdomains as tuple of Domains

class sympde.api.DomainExpression(target, expr)[source]
class sympde.api.ElementDomain[source]
class sympde.api.Equation(lhs, rhs, trials, tests, bc=None, constraint=None)[source]
class sympde.api.EssentialBC(lhs, rhs, boundary, position=None, index_component=None)[source]
class sympde.api.Functional(expr, domain, evaluate=True, **options)[source]
class sympde.api.H1SpaceType[source]
class sympde.api.HcurlSpaceType[source]
class sympde.api.HdivSpaceType[source]
class sympde.api.IdentityMapping(name, dim=None, **kwargs)[source]

Represents an identity 1D/2D/3D Mapping object.

Examples

class sympde.api.IndexedVectorFunction(base, *args, **kw_args)[source]

Represents a mathematical object with indices.

property free_symbols

Return from the atoms of self those which are free symbols.

Not all free symbols are Symbol (see examples)

For most expressions, all symbols are free symbols. For some classes this is not true. e.g. Integrals use Symbols for the dummy variables which are bound variables, so Integral has a method to return all symbols except those. Derivative keeps track of symbols with respect to which it will perform a derivative; those are bound variables, too, so it has its own free_symbols method.

Any other method that uses bound variables should implement a free_symbols method.

Examples

>>> from sympy import Derivative, Integral, IndexedBase
>>> from sympy.abc import x, y, n
>>> (x + 1).free_symbols
{x}
>>> Integral(x, y).free_symbols
{x, y}

Not all free symbols are actually symbols:

>>> IndexedBase('F')[0].free_symbols
{F, F[0]}

The symbols of differentiation are not included unless they appear in the expression being differentiated.

>>> Derivative(x + y, y).free_symbols
{x, y}
>>> Derivative(x, y).free_symbols
{x}
>>> Derivative(x, (y, n)).free_symbols
{n, x}

If you want to know if a symbol is in the variables of the Derivative you can do so as follows:

>>> Derivative(x, y).has_free(y)
True
class sympde.api.Inner(*args)[source]

Represents a generic Frobenius inner operator, without knowledge of the dimension.

This operator implements the properties of addition and multiplication

Examples

>>> from sympde.api import inner, grad
>>> from sympde.api import Domain
>>> from sympde.api import VectorFunctionSpace
>>> from sympde.api import VectorFunction
>>> domain = Domain('Omega', dim=2)
>>> V = VectorFunctionSpace('V', domain)
>>> u,u1,u2 = [VectorFunction(V, name=i) for i in ['u', 'u1', 'u2']]
>>> v,v1,v2 = [VectorFunction(V, name=i) for i in ['v', 'v1', 'v2']]
>>> inner(grad(u), grad(v))
Inner(Grad(u), Grad(v))
>>> inner(grad(u1+u2), grad(v))
Inner(Grad(u1), Grad(v)) + Inner(Grad(u2), Grad(v))
class sympde.api.Integral(*args)[source]
class sympde.api.Interface(name, bnd_minus, bnd_plus, ornt=None, mapping=None, logical_domain=None)[source]

Represents an interface between two subdomains through two boundaries.

Parameters

namestr

Name of the interface.

bnd_minusBoundary

Boundary on the “minus” side of the interface.

bnd_plusBoundary

Boundary on the “plus” side of the interface.

mappingMapping, optional

Mapping from the logical domain to the physical domain, if available.

logical_domainBasicDomain, optional

Logical domain associated with the interface, if available. It should be consistent with the mapping if provided.

orntint | Iterable[int], optional

Orientation of the interface. For 1D interfaces, this is not needed and should be set to None. For 2D interfaces, this should be either -1 or 1. For 3D interfaces, this should be a tuple of three integers, each being either -1 or 1.

Notes

The orientations are specified in the same manner as in GeoPDES, see e.g. <https://github.com/rafavzqz/geopdes/blob/master/geopdes/doc/geo_specs_mp_v21.txt#L193-L237> and T. Dokken, E. Quak, V. Skytt. Requirements from Isogeometric Analysis for changes in product design ontologies, 2010.

class sympde.api.InterfaceMapping(minus, plus)[source]

InterfaceMapping is used to represent a mapping in the interface.

Attributes

minusMapping

the mapping on the negative direction of the interface

plusMapping

the mapping on the positive direction of the interface

class sympde.api.InteriorDomain(name, dim=None, dtype=None, mapping=None, logical_domain=None, target=None)[source]

Represents an undefined interior domain.

Examples

class sympde.api.KernelExpression(target, expr)[source]

A generic SymPDE expression expr defined over the target domain. This is a lightweight object which stores just the input values. In addition, if the expression is a 1x1 matrix, the content of its only entry is taken.

Parameters

targetBasicDomain (from sympde.topology.basic)

The domain in which the expression is defined. This may be a Domain, a Boundary, an Interface, or an object of any subclasses.

exprExpr (from sympy)

The mathematical expression.

class sympde.api.L2SpaceType[source]
class sympde.api.Line(name='Line', bounds=(0, 1), *structural_args)[source]
class sympde.api.LinearExpr(arguments, expr, **options)[source]
class sympde.api.LinearForm(arguments, expr, check_linearity=True, ignore_linearity_errors=False, **options)[source]
class sympde.api.LogicalExpr(expr, domain, **options)[source]
classmethod eval(expr, domain, **options)[source]

.

class sympde.api.Mapping(name, dim=None, **kwargs)[source]

Represents a Mapping object.

Examples

class sympde.api.Mass(axis, weight=1)[source]
class sympde.api.MultiPatchMapping(dic)[source]
class sympde.api.NCube(name, dim, min_coords, max_coords, *structural_args)[source]
classmethod from_file(filename)[source]

Read the “topology.yml” portion of an HDF5 geometry file and create a (mapped) multipatch domain using the information therein.

Parameters

filenamestr

Name of the HDF5 geometry file to be read.

Returns

Domain

Multipatch domain.

class sympde.api.NCubeInterior(name, dim=None, dtype=None, min_coords=None, max_coords=None, mapping=None, logical_domain=None)[source]
get_boundary(axis=None, ext=None)[source]

return boundary by (axis, ext).

class sympde.api.Norm(expr, domain, kind='l2', evaluate=True, **options)[source]
property kind

Default kind for all SymPy object. If the kind is not defined for the object, or if the object cannot infer the kind from its arguments, this will be returned.

Examples

>>> from sympy import Expr
>>> Expr().kind
UndefinedKind
class sympde.api.NormalVector(label, shape=None, *, offset=0, strides=None, **kw_args)[source]
class sympde.api.PlusInterfaceOperator(*_args)[source]

The plus operator represents the value of an expression on the second side of an interface.

classmethod eval(*_args)[source]

Returns a canonical form of cls applied to arguments args.

Explanation

The eval() method is called when the class cls is about to be instantiated and it should return either some simplified instance (possible of some other class), or if the class cls should be unmodified, return None.

Examples of eval() for the function “sign”

@classmethod
def eval(cls, arg):
    if arg is S.NaN:
        return S.NaN
    if arg.is_zero: return S.Zero
    if arg.is_positive: return S.One
    if arg.is_negative: return S.NegativeOne
    if isinstance(arg, Mul):
        coeff, terms = arg.as_coeff_Mul(rational=True)
        if coeff is not S.One:
            return cls(coeff) * cls(terms)
class sympde.api.PolarMapping(name, dim=None, **kwargs)[source]

Represents a Polar 2D Mapping object (Annulus).

Examples

class sympde.api.ProductSpace(*spaces)[source]

Represents a product of continuous Sobolev spaces.

Examples

class sympde.api.ScalarFunction(space, name)[source]

Represents a test function as an element of a fem space.

Examples

>>> from sympde.codegen.core import SplineFemSpace
>>> from sympde.codegen.core import ScalarFunction
>>> V = SplineFemSpace('V')
>>> phi = ScalarFunction(V, 'phi')
class sympde.api.ScalarFunctionSpace(name, domain, kind=None)[source]

Represents a basic continuous scalar Function space.

class sympde.api.SemiNorm(expr, domain, kind='l2', evaluate=True, **options)[source]
property kind

Default kind for all SymPy object. If the kind is not defined for the object, or if the object cannot infer the kind from its arguments, this will be returned.

Examples

>>> from sympy import Expr
>>> Expr().kind
UndefinedKind
class sympde.api.SpaceType[source]

Base class representing function space types

class sympde.api.SphericalMapping(name, dim=None, **kwargs)[source]

Parametrization of a sphere (or a portion of it) using spherical coordinates (x1, x2, x3) = (r, theta, phi), where:

  • radius r >= 0

  • inclination 0 <= theta <= pi

  • azimuth 0 <= phi < 2 pi

class sympde.api.Square(name='Square', bounds1=(0, 1), bounds2=(0, 1), *structural_args)[source]
class sympde.api.Stiffness(axis, weight=1)[source]
class sympde.api.SymbolicDeterminant(*args, **options)[source]
class sympde.api.SymbolicExpr(*_args, **kwargs)[source]

returns a sympy expression where partial derivatives are converted into sympy Symbols.

classmethod eval(*_args, **kwargs)[source]

.

class sympde.api.SymbolicWeightedVolume(*args)[source]

This class represents the symbolic weighted volume of a quadrature rule

class sympde.api.TangentVector(label, shape=None, *, offset=0, strides=None, **kw_args)[source]
class sympde.api.TargetMapping(name, dim=None, **kwargs)[source]

Represents a Target 2D Mapping object.

Examples

class sympde.api.TensorExpr(*_args, **kwargs)[source]
classmethod eval(*_args, **kwargs)[source]

.

class sympde.api.TerminalExpr(expr, domain)[source]

This class takes a SymPDE expression and transforms its vector operators into atomic ones for a specified domain.

Parameters

exprExpr or Matrix or ImmutableDenseMatrix or LogicalExpr

The mathematical expression.

domainBasicDomain (from sympde.topology.basic)

The domain in which the expression is defined. This may be a Domain, a Boundary, an Interface, or an object of any subclasses.

evaluatebool, optional

Whether the input expression should be evaluated (default = True).

Returns

Expr | tuple[Expr] | TerminalExpr

The atomized expression. A tuple of expressions is returned in the case of expr being a BasicForm (i.e. a BilinearForm, LinearForm, or Functional), as the domain could contain multiple patches. The transformation applied to the input argument expr depends on its exact type. If expr does not match any of the specific isinstance checks, the input object is returned unchanged.

classmethod eval(expr, domain)[source]

Process the whole AST of expr to generate a new expression where the vector operators have been replaced by atomic operators. The input domain is used to determine essential information like the number of dimensions, the coordinate variables, the boundary orientation, etc.

Parameters

exprExpr (from sympy)

The mathematical expression.

domainBasicDomain (from sympde.topology.basic)

The domain in which the expression is defined. This may be a Domain, a Boundary, an Interface, or an object of any subclasses.

Returns

Expr | tuple[Expr] | TerminalExpr

The atomized expression. A tuple of expressions is returned in the case of expr being a BasicForm (i.e. a BilinearForm, LinearForm, or Functional), as the domain could contain multiple patches. An unevaluated TerminalExpr object (which only stores its arguments) is returned if evaluate is False.

class sympde.api.TorusSurfaceMapping(name, dim=None, **kwargs)[source]

3D surface obtained by “slicing” the torus above at r = a. The parametrization uses the coordinates (x1, x2) = (theta, phi), where:

  • poloidal angle 0 <= theta < 2 pi

  • toroidal angle 0 <= phi < 2 pi

class sympde.api.Trace(expr, boundary, order=0, **options)[source]

Represents the trace over a boundary and a space function

class sympde.api.Transpose(*args, **options)[source]
class sympde.api.TwistedTargetSurfaceMapping(name, dim=None, **kwargs)[source]

3D surface obtained by “twisting” the TargetMapping out of the (x, y) plane

class sympde.api.UndefinedSpaceType[source]
class sympde.api.Union(*args)[source]
class sympde.api.VectorFunction(space, name)[source]

Represents a vector test function as an element of a fem space.

Examples

property shape

Returns the shape of the IndexedBase object.

Examples

>>> from sympy import IndexedBase, Idx
>>> from sympy.abc import x, y
>>> IndexedBase('A', shape=(x, y)).shape
(x, y)

Note: If the shape of the IndexedBase is specified, it will override any shape information given by the indices.

>>> A = IndexedBase('A', shape=(x, y))
>>> B = IndexedBase('B')
>>> i = Idx('i', 2)
>>> j = Idx('j', 1)
>>> A[i, j].shape
(x, y)
>>> B[i, j].shape
(2, 1)
class sympde.api.VectorFunctionSpace(name, domain, kind=None)[source]

Represents a basic continuous vector Function space.

sympde.api.avg

alias of Average

sympde.api.bracket

alias of Bracket

sympde.api.convect

alias of Convect

sympde.api.cross

alias of Cross

sympde.api.curl

alias of Curl

sympde.api.d

alias of ExteriorDerivative

sympde.api.delta

alias of AdjointExteriorDerivative

sympde.api.div

alias of Div

sympde.api.dot

alias of Dot

class sympde.api.dx(expr)[source]
class sympde.api.dx1(expr)[source]
class sympde.api.dx2(expr)[source]
class sympde.api.dx3(expr)[source]
class sympde.api.dy(expr)[source]
class sympde.api.dz(expr)[source]
sympde.api.element_of(space, name)[source]

Create a single element of a given space (possibly a ProductSpace).

Parameters

spaceScalarFunctionSpace | VectorFunctionSpace | ProductSpace

Function space from which a single element should be created.

namestr | iterable

If space is ProductSpace, ‘name’ must either be an explicit list of function names, or a single pattern string that will be expanded into such a list. Otherwise, ‘name’ must be a simple string.

Results

resScalarFunction | VectorFunction | iterable

Single element taken from the given space. If space is ProductSpace, an element is a list of functions; otherwise, it is a single function.

sympde.api.elements_of(space, names)[source]

Create multiple elements of same space (possibly a ProductSpace).

Parameters

space : ScalarFunctionSpace | VectorFunctionSpace | ProductSpace

namesstr | iterable

Pattern or list of patterns from which a list of function names is produced.

Results

resiterable

Multiple elements taken from the given space. If space is ProductSpace, each element is a list of functions; otherwise, each element is a single function.

sympde.api.get_atom_derivatives(expr)[source]
sympde.api.get_atom_logical_derivatives(expr)[source]
sympde.api.get_index_derivatives(expr)[source]
sympde.api.get_index_derivatives_atom(expr, atom, verbose=False)[source]

This function return a dictionary of partial derivative indices for a given atom. it must be called after atomizing the expression.

sympde.api.get_index_logical_derivatives(expr)[source]
sympde.api.get_index_logical_derivatives_atom(expr, atom, verbose=False)[source]

This function return a dictionary of partial derivative indices for a given atom. it must be called after atomizing the expression.

sympde.api.grad

alias of Grad

sympde.api.hessian

alias of Hessian

sympde.api.hodge

alias of Hodge

sympde.api.inner

alias of Inner

sympde.api.ip

alias of InteriorProduct

sympde.api.jp

alias of AdjointInteriorProduct

sympde.api.jump

alias of Jump

sympde.api.laplace

alias of Laplace

sympde.api.ld

alias of LieDerivative

sympde.api.linearize(form, fields, trials=None)[source]

Parameters

formLinearForm

Linear form F(v; u) to be linearized. F is nonlinear in the parameter u

fields{Scalar|Vector}Function or tuple

Function u with respect to which F should be differentiated. Tuple if element of ProductSpace.

trials{Scalar|Vector}Function or tuple

Trial function to be used in resulting bilinear form.

Results

aBilinearForm

a(u, v) is bilinear form obtained from linearization of F(v; u).

sympde.api.minus

alias of MinusInterfaceOperator

sympde.api.outer

alias of Outer

sympde.api.plot_domain(domain, draw=True, isolines=False, refinement=None)[source]

Plots a 2D or 3D domain using matplotlib

Parameters

domainsympde.topology.domain.Domain

Domain to plot

drawbool, default=True

If true, plt.show() will be called.

isolinesbool, default=False

If true and the domain is 2D, also plots iso-lines.

refinementint or None

Number of straight line segments used to approximate each boundary edge. If None, uses 15 for 3D domains and 40 for 2D domains

sympde.api.plus

alias of PlusInterfaceOperator

sympde.api.rot

alias of Rot

sympde.api.wedge

alias of ExteriorProduct