api.ast.nodes#

Functions#

construct_itergener(a, index)

Create the generator and the iterator based on a and the index

construct_logical_expressions(u, nderiv[, lhs])

get_number_derivatives(expr)

returns the number of partial derivatives in expr.

toInteger(a)

Classes#

Inheritance diagram of psydac.api.ast.nodes

AddNode(*args)

Allocate(arr, shape)

AndNode(*args)

ArityType()

Base class representing a form type: bilinear/linear/functional

Array(*args)

ArrayNode(*args)

AtomicNode(*args)

BaseNode(*args)

BasisAtom(expr)

Used to describe a temporary for the basis coefficient or in the kernel.

BilinearArity()

Block(body)

This class represents a Block of statements

BlockLinearOperatorNode(*args)

BlockScalarLocalBasis([trials, tests, expr, ...])

This is used to describe a block of scalar dofs over an element

BlockStencilMatrixGlobalBasis(trials, tests, ...)

used to describe local dof over an element as a block stencil matrix

BlockStencilMatrixLocalBasis(trials, tests, ...)

used to describe local dof over an element as a block stencil matrix

BlockStencilVectorGlobalBasis(tests, pads, ...)

used to describe local dof over an element as a block stencil matrix

BlockStencilVectorLocalBasis(tests, pads, expr)

used to describe local dof over an element as a block stencil matrix

CoefficientBasis(target)

ComputeKernelExpr(expr[, weights])

ComputeLogical(expr[, weights, lhs])

ComputeLogicalBasis(expr[, lhs])

ComputeNode(expr)

ComputePhysical(expr)

ComputePhysicalBasis(expr)

Element(*args)

ElementOf(target)

EqNode(*args)

EvalField(domain, atoms, q_index, l_index, ...)

This function computes atomic expressions needed to evaluate EvaluteField/VectorField final expression

EvalMapping(domain, quads, indices_basis, ...)

This function computes atomic expressions needed to evaluate EvalMapping final expression.

Evaluation(*args)

ExprNode(*args)

Expression(*args)

The Expression class gives us the possibility to create specific instructions for some dimension, where the generated code is not in a vectorized form.

FieldEvaluation(*args)

FloorDiv(*args)

FunctionalArity()

GeneratorBase(target, dummies)

GeometryAtom(expr)

GeometryExpr(expr[, dtype])

GeometryExpressions(M, nderiv[, dtype])

GlobalElementBasis(*args)

GlobalSpanArray(target[, index])

This represents the global span array

GlobalTensorQuadratureBasis(target[, index])

GlobalTensorQuadratureGrid(*args)

This class represents the quadrature points and weights in a domain.

GlobalTensorQuadratureTestBasis(target[, index])

GlobalTensorQuadratureTrialBasis(target[, index])

GlobalThreadEnds([index])

This represents the threads ends over the decomposed domain

GlobalThreadSizes([index])

This represents the number of elements owned by a thread

GlobalThreadSpanArray(target[, index])

This represents the global span array of each thread

GlobalThreadStarts([index])

This represents the threads starts over the decomposed domain

Grid(*args)

IfNode(*args)

IndexDerivative([length])

IndexDof([start, stop, length, index])

IndexDofTest([start, stop, length, index])

IndexDofTrial([start, stop, length, index])

IndexElement([start, stop, length, index])

IndexInnerDofTest([start, stop, length, index])

IndexNode([start, stop, length, index])

Base class representing one index of an iterator

IndexOuterDofTest([start, stop, length, index])

IndexQuadrature([start, stop, length, index])

IntDivNode(*args)

IteratorBase(target[, dummies])

LengthDof([target, index])

LengthDofTest([target, index])

LengthDofTrial([target, index])

LengthElement([target, index])

LengthInnerDofTest([target, index])

LengthNode([target, index])

Base class representing one length of an iterator

LengthOuterDofTest([target, index])

LengthQuadrature([target, index])

LinearArity()

LocalElementBasis(*args)

LocalIndexElement([start, stop, length, index])

LocalSpanArray(target[, index])

This represents the local span array

LocalTensorQuadratureBasis(target[, index])

LocalTensorQuadratureGrid(*args)

This class represents the element wise quadrature points and weights in a domain.

LocalTensorQuadratureTestBasis(target[, index])

LocalTensorQuadratureTrialBasis(target[, index])

LocalThreadEnds([index])

This represents the local threads ends over the decomposed domain

LocalThreadStarts([index])

This represents the local threads starts over the decomposed domain

LogicalBasisValue(expr)

LogicalGeometryValue(expr)

LogicalValueNode(expr)

Loop(iterable, index, *[, stmts, mask, ...])

class to describe a dimensionless loop of an iterator over a generator.

MappingEvaluation(*args)

Mask(axis, ext)

MatrixCoordsFromRank(*args)

MatrixGlobalBasis(target, test[, dtype])

used to describe global dof

MatrixLocalBasis(target[, dtype])

used to describe local dof over an element

MatrixNode(*args)

MatrixQuadrature(target[, dtype])

MatrixRankFromCoords(*args)

Max(*args)

Min(*args)

MulNode(*args)

NeighbourThreadCoordinates([start, stop, ...])

NotNode(*args)

NumThreads([target, index])

Pads(tests[, trials, tests_degree, ...])

This represents the global pads

ParallelBlock([default, private, shared, ...])

Pattern(*args, **kwargs)

PhysicalBasisValue(expr)

PhysicalGeometryValue(expr)

PhysicalValueNode(expr)

PlusGlobalTensorQuadratureGrid(*args)

This class represents the quadrature points and weights in the plus side of an interface.

PlusLocalTensorQuadratureGrid(*args)

This class represents the element wise quadrature points and weights in the plus side of an interface.

PlusTensorQuadrature(*args)

This class represents the quadrature point and weight in the plus side of an interface.

ProductGenerator(target, dummies)

This class represent an element of an array with arbitrary number of dimensions.

ProductIteration(iterator, generator)

ProductIterator(target[, dummies])

RAT(*args)

RankDimension()

RankNode()

Base class representing a rank of an iterator

Reduce(op, rhs, lhs, loop)

Reduction(op, expr[, lhs])

Reset(var[, expr])

ScalarLocalBasis([u, v, tag, dtype])

This is used to describe scalar dof over an element

ScalarNode(*args)

Span(target[, index])

This represents the span of a basis in an element

SpanArray(target[, index])

This represents the global span array

SplitArray(target, positions, lengths)

StencilMatrixGlobalBasis(u, v, pads[, tag, ...])

used to describe local dof over an element as a stencil matrix

StencilMatrixLocalBasis(u, v, pads[, tag, dtype])

used to describe local dof over an element as a stencil matrix

StencilVectorGlobalBasis(v, pads[, tag, dtype])

used to describe local dof over an element as a stencil vector

StencilVectorLocalBasis(v, pads[, tag, dtype])

used to describe local dof over an element as a stencil vector

StrictLessThanNode(*args)

TensorAdd(*args)

TensorAssignExpr(lhs, rhs)

TensorBasis(target)

TensorExpression(*args)

TensorGenerator(target, dummies)

This class represent an array list of array elements with arbitrary number of dimensions.

TensorIntDiv(*args)

TensorInteger(*args)

TensorIteration(iterator, generator)

TensorIterator(target[, dummies])

TensorMax(*args)

TensorMul(*args)

TensorQuadrature(*args)

This class represents the quadrature point and weight in a domain.

TensorQuadratureBasis(target)

TensorQuadratureTestBasis(target)

TensorQuadratureTrialBasis(target)

TensorTestBasis(target)

TensorTrialBasis(target)

ThreadCoordinates([start, stop, length, index])

ThreadId([start, stop, length, index])

ValueNode(expr)

VectorAssign(lhs, rhs[, op])

WeightedVolumeQuadrature(*args)

WhileLoop(condition, body)

Zeros(*args)

ZerosLike(*args)

Details#

toInteger(a)[source]#
get_number_derivatives(expr)[source]#

returns the number of partial derivatives in expr. this assumes that expr is of the form d(a) where a is a single atom.

class ZerosLike(*args)[source]#

Bases: Function

property rhs#
default_assumptions = {}#
class Zeros(*args)[source]#

Bases: Function

property shape#
property dtype#
default_assumptions = {}#
class Array(*args)[source]#

Bases: Function

property data#
property dtype#
default_assumptions = {}#
class FloorDiv(*args)[source]#

Bases: Function

property arg1#
property arg2#
default_assumptions = {}#
class Max(*args)[source]#

Bases: Expr

default_assumptions = {}#
class Min(*args)[source]#

Bases: Expr

default_assumptions = {}#
class Allocate(arr, shape)[source]#

Bases: Basic

property array#
property shape#
default_assumptions = {}#
class VectorAssign(lhs, rhs, op=None)[source]#

Bases: Basic

property lhs#
property rhs#
property op#
default_assumptions = {}#
class ArityType[source]#

Bases: Basic

Base class representing a form type: bilinear/linear/functional

default_assumptions = {}#
class BilinearArity[source]#

Bases: ArityType

default_assumptions = {}#
class LinearArity[source]#

Bases: ArityType

default_assumptions = {}#
class FunctionalArity[source]#

Bases: ArityType

default_assumptions = {}#
class LengthNode(target=None, index=None)[source]#

Bases: Expr

Base class representing one length of an iterator

property target#
property index#
set_index(index)[source]#
default_assumptions = {}#
class LengthElement(target=None, index=None)[source]#

Bases: LengthNode

default_assumptions = {}#
class LengthQuadrature(target=None, index=None)[source]#

Bases: LengthNode

default_assumptions = {}#
class LengthDof(target=None, index=None)[source]#

Bases: LengthNode

default_assumptions = {}#
class LengthDofTrial(target=None, index=None)[source]#

Bases: LengthNode

default_assumptions = {}#
class LengthDofTest(target=None, index=None)[source]#

Bases: LengthNode

default_assumptions = {}#
class LengthOuterDofTest(target=None, index=None)[source]#

Bases: LengthNode

default_assumptions = {}#
class LengthInnerDofTest(target=None, index=None)[source]#

Bases: LengthNode

default_assumptions = {}#
class NumThreads(target=None, index=None)[source]#

Bases: LengthNode

default_assumptions = {}#
class TensorExpression(*args)[source]#

Bases: Expr

default_assumptions = {}#
class TensorIntDiv(*args)[source]#

Bases: TensorExpression

default_assumptions = {}#
class TensorAdd(*args)[source]#

Bases: TensorExpression

default_assumptions = {}#
class TensorMul(*args)[source]#

Bases: TensorExpression

default_assumptions = {}#
class TensorMax(*args)[source]#

Bases: TensorExpression

default_assumptions = {}#
class TensorInteger(*args)[source]#

Bases: TensorExpression

default_assumptions = {}#
class TensorAssignExpr(lhs, rhs)[source]#

Bases: Basic

property lhs#
property rhs#
default_assumptions = {}#
class IndexNode(start=0, stop=None, length=None, index=None)[source]#

Bases: Expr

Base class representing one index of an iterator

property start#
property stop#
property length#
property index#
set_range(start=TensorInteger(0), stop=None, length=None)[source]#
set_index(index)[source]#
default_assumptions = {}#
class IndexElement(start=0, stop=None, length=None, index=None)[source]#

Bases: IndexNode

default_assumptions = {}#
class IndexQuadrature(start=0, stop=None, length=None, index=None)[source]#

Bases: IndexNode

default_assumptions = {}#
class IndexDof(start=0, stop=None, length=None, index=None)[source]#

Bases: IndexNode

default_assumptions = {}#
class IndexDofTrial(start=0, stop=None, length=None, index=None)[source]#

Bases: IndexDof

default_assumptions = {}#
class IndexDofTest(start=0, stop=None, length=None, index=None)[source]#

Bases: IndexDof

default_assumptions = {}#
class IndexOuterDofTest(start=0, stop=None, length=None, index=None)[source]#

Bases: IndexDof

default_assumptions = {}#
class IndexInnerDofTest(start=0, stop=None, length=None, index=None)[source]#

Bases: IndexDof

default_assumptions = {}#
class ThreadId(start=0, stop=None, length=None, index=None)[source]#

Bases: IndexDof

default_assumptions = {}#
class ThreadCoordinates(start=0, stop=None, length=None, index=None)[source]#

Bases: IndexDof

default_assumptions = {}#
class NeighbourThreadCoordinates(start=0, stop=None, length=None, index=None)[source]#

Bases: IndexDof

default_assumptions = {}#
class LocalIndexElement(start=0, stop=None, length=None, index=None)[source]#

Bases: IndexDof

default_assumptions = {}#
class IndexDerivative(length=None)[source]#

Bases: IndexNode

default_assumptions = {}#
class RankNode[source]#

Bases: Basic

Base class representing a rank of an iterator

default_assumptions = {}#
class RankDimension[source]#

Bases: RankNode

default_assumptions = {}#
class BaseNode(*args)[source]#

Bases: Basic

default_assumptions = {}#
class Element(*args)[source]#

Bases: BaseNode

default_assumptions = {}#
class Pattern(*args, **kwargs)[source]#

Bases: Tuple

default_assumptions = {}#
class Mask(axis, ext)[source]#

Bases: Basic

property axis#
property ext#
default_assumptions = {}#
class EvalField(domain, atoms, q_index, l_index, q_basis, coeffs, l_coeffs, g_coeffs, tests, mapping, nderiv, mask=None, dtype='real', quad_loop=None)[source]#

Bases: BaseNode

This function computes atomic expressions needed to evaluate EvaluteField/VectorField final expression

Parameters:
domain<Domain>

Sympde Domain object

atoms: tuple_like (Expr)

The atomic expression to be evaluated

q_index: <IndexQuadrature>

Indices used for the quadrature loops

l_index<IndexDofTest>

Indices used for the basis loops

q_basis<GlobalTensorQuadratureTestBasis>

The 1d basis function of the tensor-product space

coeffstuple_like (CoefficientBasis)

Coefficient of the basis function

l_coeffstuple_like (MatrixLocalBasis)

Local coefficient of the basis functions

g_coeffstuple_like (MatrixGlobalBasis)

Global coefficient of the basis functions

teststuple_like (Variable)

The field to be evaluated

mapping<Mapping>

Sympde Mapping object

nderivint

Maximum number of derivatives

maskint,optional

The fixed direction in case of a boundary integral

property inits#
property body#
property dtype#
property pads#
default_assumptions = {}#
class RAT(*args)[source]#

Bases: Basic

default_assumptions = {}#
class EvalMapping(domain, quads, indices_basis, q_basis, mapping, components, mapping_space, nderiv, mask=None, is_rational=None, trial=None, quad_loop=None)[source]#

Bases: BaseNode

This function computes atomic expressions needed to evaluate EvalMapping final expression.

Parameters:
domain<Domain>

Sympde Domain object

quads: <IndexQuadrature>

Indices used for the quadrature loops

indices_basis<IndexDofTest>

Indices used for the basis loops

q_basis<GlobalTensorQuadratureTestBasis>

The 1d basis function of the tensor-product space

mapping<Mapping>

Sympde Mapping object

components<GeometryExpressions>

The 1d coefficients of the mapping

mapping_space<VectorSpace>

The vector space of the mapping

nderiv<int>

Maximum number of derivatives

maskint,optional

The fixed direction in case of a boundary integral

is_rational: bool,optional

True if the mapping is rational

property stmts#
property inits#
property coeffs#
default_assumptions = {}#
class IteratorBase(target, dummies=None)[source]#

Bases: BaseNode

property target#
property dummies#
default_assumptions = {}#
class TensorIterator(target, dummies=None)[source]#

Bases: IteratorBase

default_assumptions = {}#
class ProductIterator(target, dummies=None)[source]#

Bases: IteratorBase

default_assumptions = {}#
class GeneratorBase(target, dummies)[source]#

Bases: BaseNode

property target#
property dummies#
default_assumptions = {}#
class TensorGenerator(target, dummies)[source]#

Bases: GeneratorBase

This class represent an array list of array elements with arbitrary number of dimensions. the length of the list is given by the rank of target.

Parameters:
target<ArrayNode|MatrixNode>

the array object

dummies<Tuple|tuple|list>

multidimensional index

Examples

>>> T = TensorGenerator(GlobalTensorQuadrature(), index_quad)
>>> T
TensorGenerator(GlobalTensorQuadrature(), (IndexQuadrature(),))
>>> ast = parse(T, settings={'dim':2,'nderiv':2,'target':Square()})
>>> ast[0]
((IndexedElement(local_x1, i_quad_1), IndexedElement(local_w1, i_quad_1)),
 (IndexedElement(local_x2, i_quad_2), IndexedElement(local_w2, i_quad_2)))
default_assumptions = {}#
class ProductGenerator(target, dummies)[source]#

Bases: GeneratorBase

This class represent an element of an array with arbitrary number of dimensions.

Parameters:
target<ArrayNode|MatrixNode>

the array object

dummies<Tuple|tuple|list>

multidimensional index

Examples

>>> P = ProductGenerator(MatrixRankFromCoords(), thread_coords)
>>> P
ProductGenerator(MatrixRankFromCoords(), (ThreadCoordinates(),))
>>> ast = parse(P, settings={'dim':2,'nderiv':2,'target':Square()})
>>> ast
IndexedElement(rank_from_coords, thread_coords_1, thread_coords_2)
default_assumptions = {}#
class Grid(*args)[source]#

Bases: BaseNode

default_assumptions = {}#
class ScalarNode(*args)[source]#

Bases: BaseNode, AtomicExpr

default_assumptions = {}#
class ArrayNode(*args)[source]#

Bases: BaseNode, AtomicExpr

property rank#
property positions#
property free_indices#
pattern()[source]#
default_assumptions = {}#
class MatrixNode(*args)[source]#

Bases: ArrayNode

default_assumptions = {}#
class BlockLinearOperatorNode(*args)[source]#

Bases: MatrixNode

default_assumptions = {}#
class GlobalTensorQuadratureGrid(*args)[source]#

Bases: ArrayNode

This class represents the quadrature points and weights in a domain.

property weights#
default_assumptions = {}#
class PlusGlobalTensorQuadratureGrid(*args)[source]#

Bases: GlobalTensorQuadratureGrid

This class represents the quadrature points and weights in the plus side of an interface.

default_assumptions = {}#
class LocalTensorQuadratureGrid(*args)[source]#

Bases: ArrayNode

This class represents the element wise quadrature points and weights in a domain.

property weights#
default_assumptions = {}#
class PlusLocalTensorQuadratureGrid(*args)[source]#

Bases: LocalTensorQuadratureGrid

This class represents the element wise quadrature points and weights in the plus side of an interface.

default_assumptions = {}#
class TensorQuadrature(*args)[source]#

Bases: ScalarNode

This class represents the quadrature point and weight in a domain.

property weights#
default_assumptions = {}#
class PlusTensorQuadrature(*args)[source]#

Bases: TensorQuadrature

This class represents the quadrature point and weight in the plus side of an interface.

default_assumptions = {}#
class MatrixQuadrature(target, dtype='real')[source]#

Bases: MatrixNode

property target#
property dtype#
default_assumptions = {}#
class MatrixRankFromCoords(*args)[source]#

Bases: MatrixNode

default_assumptions = {}#
class MatrixCoordsFromRank(*args)[source]#

Bases: MatrixNode

default_assumptions = {}#
class WeightedVolumeQuadrature(*args)[source]#

Bases: ScalarNode

default_assumptions = {}#
class GlobalTensorQuadratureBasis(target, index=None)[source]#

Bases: ArrayNode

property target#
property index#
property unique_scalar_space#
property is_scalar#

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

set_index(index)[source]#
default_assumptions = {}#
class LocalTensorQuadratureBasis(target, index=None)[source]#

Bases: ArrayNode

property target#
property index#
property unique_scalar_space#
property is_scalar#

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

set_index(index)[source]#
default_assumptions = {}#
class TensorQuadratureBasis(target)[source]#

Bases: ArrayNode

property target#
property unique_scalar_space#
property is_scalar#

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

default_assumptions = {}#
class CoefficientBasis(target)[source]#

Bases: ScalarNode

property target#
default_assumptions = {}#
class TensorBasis(target)[source]#

Bases: CoefficientBasis

default_assumptions = {}#
class GlobalTensorQuadratureTestBasis(target, index=None)[source]#

Bases: GlobalTensorQuadratureBasis

default_assumptions = {}#
class LocalTensorQuadratureTestBasis(target, index=None)[source]#

Bases: LocalTensorQuadratureBasis

default_assumptions = {}#
class TensorQuadratureTestBasis(target)[source]#

Bases: TensorQuadratureBasis

default_assumptions = {}#
class TensorTestBasis(target)[source]#

Bases: TensorBasis

default_assumptions = {}#
class GlobalTensorQuadratureTrialBasis(target, index=None)[source]#

Bases: GlobalTensorQuadratureBasis

default_assumptions = {}#
class LocalTensorQuadratureTrialBasis(target, index=None)[source]#

Bases: LocalTensorQuadratureBasis

default_assumptions = {}#
class TensorQuadratureTrialBasis(target)[source]#

Bases: TensorQuadratureBasis

default_assumptions = {}#
class TensorTrialBasis(target)[source]#

Bases: TensorBasis

default_assumptions = {}#
class MatrixGlobalBasis(target, test, dtype='real')[source]#

Bases: MatrixNode

used to describe global dof

property target#
property test#
property dtype#
default_assumptions = {}#
class MatrixLocalBasis(target, dtype='real')[source]#

Bases: MatrixNode

used to describe local dof over an element

property target#
property dtype#
default_assumptions = {}#
class StencilMatrixLocalBasis(u, v, pads, tag=None, dtype='real')[source]#

Bases: MatrixNode

used to describe local dof over an element as a stencil matrix

property pads#
property rank#
property name#
property tag#
property dtype#
default_assumptions = {}#
class StencilMatrixGlobalBasis(u, v, pads, tag=None, dtype='real')[source]#

Bases: MatrixNode

used to describe local dof over an element as a stencil matrix

property pads#
property rank#
property name#
property tag#
property dtype#
default_assumptions = {}#
class StencilVectorLocalBasis(v, pads, tag=None, dtype='real')[source]#

Bases: MatrixNode

used to describe local dof over an element as a stencil vector

property pads#
property rank#
property name#
property tag#
property dtype#
default_assumptions = {}#
class StencilVectorGlobalBasis(v, pads, tag=None, dtype='real')[source]#

Bases: MatrixNode

used to describe local dof over an element as a stencil vector

property pads#
property rank#
property name#
property tag#
property dtype#
default_assumptions = {}#
class LocalElementBasis(*args)[source]#

Bases: MatrixNode

tag = 'ww59dg'#
default_assumptions = {}#
class GlobalElementBasis(*args)[source]#

Bases: MatrixNode

tag = 'lv8uix'#
default_assumptions = {}#
class BlockStencilMatrixLocalBasis(trials, tests, expr, dim, tag=None, outer=None, tests_degree=None, trials_degree=None, tests_multiplicity=None, trials_multiplicity=None, dtype='real')[source]#

Bases: BlockLinearOperatorNode

used to describe local dof over an element as a block stencil matrix

property pads#
property rank#
property trials_multiplicity#
property tag#
property expr#
property dtype#
property outer#
property unique_scalar_space#
default_assumptions = {}#
class BlockStencilMatrixGlobalBasis(trials, tests, pads, multiplicity, expr, tag=None, dtype='real')[source]#

Bases: BlockLinearOperatorNode

used to describe local dof over an element as a block stencil matrix

property pads#
property multiplicity#
property rank#
property tag#
property expr#
property dtype#
property unique_scalar_space#
default_assumptions = {}#
class BlockStencilVectorLocalBasis(tests, pads, expr, tag=None, dtype='real')[source]#

Bases: BlockLinearOperatorNode

used to describe local dof over an element as a block stencil matrix

property pads#
property rank#
property tag#
property expr#
property dtype#
property unique_scalar_space#
default_assumptions = {}#
class BlockStencilVectorGlobalBasis(tests, pads, multiplicity, expr, tag=None, dtype='real')[source]#

Bases: BlockLinearOperatorNode

used to describe local dof over an element as a block stencil matrix

property pads#
property multiplicity#
property rank#
property tag#
property expr#
property dtype#
property unique_scalar_space#
default_assumptions = {}#
class ScalarLocalBasis(u=None, v=None, tag=None, dtype='real')[source]#

Bases: ScalarNode

This is used to describe scalar dof over an element

property tag#
property dtype#
property trial#
property test#
default_assumptions = {}#
class BlockScalarLocalBasis(trials=None, tests=None, expr=None, tag=None, dtype='real')[source]#

Bases: ScalarNode

This is used to describe a block of scalar dofs over an element

property tag#
property dtype#
property tests#
property trials#
property expr#
default_assumptions = {}#
class SpanArray(target, index=None)[source]#

Bases: ArrayNode

This represents the global span array

property target#
property index#
set_index(index)[source]#
default_assumptions = {}#
class GlobalSpanArray(target, index=None)[source]#

Bases: SpanArray

This represents the global span array

default_assumptions = {}#
class LocalSpanArray(target, index=None)[source]#

Bases: SpanArray

This represents the local span array

default_assumptions = {}#
class GlobalThreadSpanArray(target, index=None)[source]#

Bases: SpanArray

This represents the global span array of each thread

default_assumptions = {}#
class GlobalThreadStarts(index=None)[source]#

Bases: ArrayNode

This represents the threads starts over the decomposed domain

property index#
set_index(index)[source]#
default_assumptions = {}#
class GlobalThreadEnds(index=None)[source]#

Bases: ArrayNode

This represents the threads ends over the decomposed domain

property index#
set_index(index)[source]#
default_assumptions = {}#
class GlobalThreadSizes(index=None)[source]#

Bases: ArrayNode

This represents the number of elements owned by a thread

property index#
set_index(index)[source]#
default_assumptions = {}#
class LocalThreadStarts(index=None)[source]#

Bases: ArrayNode

This represents the local threads starts over the decomposed domain

property index#
set_index(index)[source]#
default_assumptions = {}#
class LocalThreadEnds(index=None)[source]#

Bases: ArrayNode

This represents the local threads ends over the decomposed domain

property index#
set_index(index)[source]#
default_assumptions = {}#
class Span(target, index=None)[source]#

Bases: ScalarNode

This represents the span of a basis in an element

property target#
property index#
set_index(index)[source]#
default_assumptions = {}#
class Pads(tests, trials=None, tests_degree=None, trials_degree=None, tests_multiplicity=None, trials_multiplicity=None, test_index=None, trial_index=None, dim_index=None)[source]#

Bases: ScalarNode

This represents the global pads

property tests#
property trials#
property tests_degree#
property trials_degree#
property tests_multiplicity#
property trials_multiplicity#
property test_index#
property trial_index#
property dim_index#
default_assumptions = {}#
class Evaluation(*args)[source]#

Bases: BaseNode

default_assumptions = {}#
class FieldEvaluation(*args)[source]#

Bases: Evaluation

default_assumptions = {}#
class MappingEvaluation(*args)[source]#

Bases: Evaluation

default_assumptions = {}#
class ComputeNode(expr)[source]#

Bases: Basic

property expr#
default_assumptions = {}#
class ComputePhysical(expr)[source]#

Bases: ComputeNode

default_assumptions = {}#
class ComputePhysicalBasis(expr)[source]#

Bases: ComputePhysical

default_assumptions = {}#
class ComputeKernelExpr(expr, weights=True)[source]#

Bases: ComputeNode

property expr#
property weights#
default_assumptions = {}#
class ComputeLogical(expr, weights=True, lhs=None)[source]#

Bases: ComputeNode

property expr#
property weights#
property lhs#
default_assumptions = {}#
class ComputeLogicalBasis(expr, lhs=None)[source]#

Bases: ComputeLogical

property expr#
property lhs#
default_assumptions = {}#
class Reduction(op, expr, lhs=None)[source]#

Bases: Basic

property op#
property expr#
property lhs#
default_assumptions = {}#
class Reduce(op, rhs, lhs, loop)[source]#

Bases: Basic

property op#
property rhs#
property lhs#
property loop#
default_assumptions = {}#
class Reset(var, expr=None)[source]#

Bases: Basic

property var#
property expr#
default_assumptions = {}#
class ElementOf(target)[source]#

Bases: Basic

property target#
default_assumptions = {}#
class ExprNode(*args)[source]#

Bases: Basic

default_assumptions = {}#
class AtomicNode(*args)[source]#

Bases: ExprNode, AtomicExpr

property expr#
default_assumptions = {}#
class ValueNode(expr)[source]#

Bases: ExprNode

property expr#
default_assumptions = {}#
class PhysicalValueNode(expr)[source]#

Bases: ValueNode

default_assumptions = {}#
class LogicalValueNode(expr)[source]#

Bases: ValueNode

default_assumptions = {}#
class PhysicalBasisValue(expr)[source]#

Bases: PhysicalValueNode

default_assumptions = {}#
class LogicalBasisValue(expr)[source]#

Bases: LogicalValueNode

property expr#
default_assumptions = {}#
class PhysicalGeometryValue(expr)[source]#

Bases: PhysicalValueNode

default_assumptions = {}#
class LogicalGeometryValue(expr)[source]#

Bases: LogicalValueNode

default_assumptions = {}#
class BasisAtom(expr)[source]#

Bases: AtomicNode

Used to describe a temporary for the basis coefficient or in the kernel.

property expr#
property atom#
default_assumptions = {}#
class GeometryAtom(expr)[source]#

Bases: AtomicNode

property expr#
property atom#
default_assumptions = {}#
class GeometryExpr(expr, dtype='real')[source]#

Bases: Basic

property atom#
property expr#
default_assumptions = {}#
class IfNode(*args)[source]#

Bases: BaseNode

property args#

Returns a tuple of arguments of ‘self’.

Notes

Never use self._args, always use self.args. Only use _args in __new__ when creating a new function. Don’t override .args() from Basic (so that it’s easy to change the interface in the future if needed).

Examples

>>> from sympy import cot
>>> from sympy.abc import x, y
>>> cot(x).args
(x,)
>>> cot(x).args[0]
x
>>> (x*y).args
(x, y)
>>> (x*y).args[1]
y
default_assumptions = {}#
class WhileLoop(condition, body)[source]#

Bases: BaseNode

property condition#
property body#
default_assumptions = {}#
class Loop(iterable, index, *, stmts=None, mask=None, parallel=None, default=None, shared=None, private=None, firstprivate=None, lastprivate=None, reduction=None)[source]#

Bases: BaseNode

class to describe a dimensionless loop of an iterator over a generator.

Parameters:
iterable<list|iterator>

list of iterator object

index<IndexNode>

represent the dimensionless index used in the for loop

stmts<list|None>

list of body statements

mask<int|None>

the masked dimension where we fix the index in that dimension

parallel<bool|None>

specifies whether the loop should be executed in parallel or in serial

default: <str|None>

specifies the default behavior of the variables in a parallel region

shared<list|tuple|None>

specifies the shared variables in the parallel region

private: <list|tuple|None>

specifies the private variables in the parallel region

firstprivate: <list|tuple|None>

specifies the first private variables in the parallel region

lastprivate: <list|tuple|None>

specifies the last private variables in the parallel region

property iterable#
property index#
property stmts#
property mask#
property iterator#
property generator#
property parallel#
property default#
property shared#
property private#
property firstprivate#
property lastprivate#
property reduction#
get_geometry_stmts(mapping)[source]#
default_assumptions = {}#
class TensorIteration(iterator, generator)[source]#

Bases: BaseNode

property iterator#
property generator#
default_assumptions = {}#
class ProductIteration(iterator, generator)[source]#

Bases: BaseNode

property iterator#
property generator#
default_assumptions = {}#
class SplitArray(target, positions, lengths)[source]#

Bases: BaseNode

property target#
property positions#
property lengths#
default_assumptions = {}#
construct_logical_expressions(u, nderiv, lhs=None)[source]#
class GeometryExpressions(M, nderiv, dtype='real')[source]#

Bases: Basic

property arguments#
property expressions#
default_assumptions = {}#
class Block(body)[source]#

Bases: Basic

This class represents a Block of statements

property body#
default_assumptions = {}#
class ParallelBlock(default='private', private=(), shared=(), firstprivate=(), lastprivate=(), body=())[source]#

Bases: Block

property default#
property private#
property shared#
property firstprivate#
property lastprivate#
property body#
default_assumptions = {}#
construct_itergener(a, index)[source]#

Create the generator and the iterator based on a and the index

class Expression(*args)[source]#

Bases: Expr

The Expression class gives us the possibility to create specific instructions for some dimension, where the generated code is not in a vectorized form. For example, the class Loop generates 2 for loops in 2D and 3 in 3D, the expressions that are generated are the same for 2D and 3D, because they are written in a way that allows them to be applied in any dimension, with the fixed dimension expression we can specify the generated code for a specific dimension, so the generated code in the second dimension of the 2D loop is diffrent from the one in the first dimension of the 2D loop

default_assumptions = {}#
class AddNode(*args)[source]#

Bases: Expression

default_assumptions = {}#
class MulNode(*args)[source]#

Bases: Expression

default_assumptions = {}#
class IntDivNode(*args)[source]#

Bases: Expression

default_assumptions = {}#
class AndNode(*args)[source]#

Bases: Expression

default_assumptions = {}#
class NotNode(*args)[source]#

Bases: Expression

default_assumptions = {}#
class EqNode(*args)[source]#

Bases: Expression

default_assumptions = {}#
class StrictLessThanNode(*args)[source]#

Bases: Expression

default_assumptions = {}#