pymor.discretizers.skfem.cg

Classes

AdvectionOperator

BoundaryDirichletFunctional

DiffusionOperator

L2Functional

L2ProductOperator

SKFemBilinearFormOperator

SKFemLinearFormOperator

SKFemVisualizer

VectorL2Functional

Functions

discretize_stationary_cg

Discretizes a StationaryProblem with finite elements using scikit-fem.

class pymor.discretizers.skfem.cg.AdvectionOperator(basis, advection_function, dirichlet_dofs=None, dirichlet_clear_diag=False, solver=None, name=None)[source]

Bases: SKFemBilinearFormOperator

build_form(mu)[source]
class pymor.discretizers.skfem.cg.BoundaryDirichletFunctional(basis, dirichlet_data, dirichlet_dofs=None, name=None)[source]

Bases: NumpyMatrixBasedOperator

source: VectorSpace = NumpyVectorSpace(1)[source]

The source VectorSpace.

sparse = False[source]

True if the operator assembles into a sparse matrix.

False if the operator assembles into a dense matrix, None if unknown.

class pymor.discretizers.skfem.cg.DiffusionOperator(basis, diffusion_function, dirichlet_dofs=None, dirichlet_clear_diag=False, solver=None, name=None)[source]

Bases: SKFemBilinearFormOperator

build_form(mu)[source]
class pymor.discretizers.skfem.cg.L2Functional(basis, function, dirichlet_dofs=None, dirichlet_data=None, name=None)[source]

Bases: SKFemLinearFormOperator

build_form(mu)[source]
class pymor.discretizers.skfem.cg.L2ProductOperator(basis, dirichlet_dofs=None, dirichlet_clear_diag=False, coefficient_function=None, solver=None, name=None)[source]

Bases: SKFemBilinearFormOperator

build_form(mu)[source]
class pymor.discretizers.skfem.cg.SKFemBilinearFormOperator(basis, dirichlet_dofs=None, dirichlet_clear_diag=False, solver=None, name=None)[source]

Bases: NumpyMatrixBasedOperator

build_form(mu)[source]
sparse = True[source]

True if the operator assembles into a sparse matrix.

False if the operator assembles into a dense matrix, None if unknown.

class pymor.discretizers.skfem.cg.SKFemLinearFormOperator(basis, dirichlet_dofs=None, name=None)[source]

Bases: NumpyMatrixBasedOperator

source: VectorSpace = NumpyVectorSpace(1)[source]

The source VectorSpace.

sparse = False[source]

True if the operator assembles into a sparse matrix.

False if the operator assembles into a dense matrix, None if unknown.

class pymor.discretizers.skfem.cg.SKFemVisualizer(space, basis)[source]

Bases: ImmutableObject

visualize(U, **kwargs)[source]
class pymor.discretizers.skfem.cg.VectorL2Functional(basis, function, dirichlet_dofs=None, name=None)[source]

Bases: SKFemLinearFormOperator

build_form(mu)[source]
pymor.discretizers.skfem.cg.discretize_stationary_cg(analytical_problem, diameter=None, mesh_type=None, element=None, preassemble=True, solver=None)[source]

Discretizes a StationaryProblem with finite elements using scikit-fem.

Parameters:
  • analytical_problem – The StationaryProblem to discretize.

  • diameter – If not None, diameter is passed as an argument to the domain_discretizer.

  • mesh_type – If not None, a skfem.Mesh to be used for discretizing the domain of analytical_problem.

  • element – If not None, the skfem.Element to be used for building the finite element space. If None, mesh.elem() is used.

  • preassemble – If True, preassemble all operators in the resulting Model.

  • solver – The Solver to be used.

Returns:

  • m – The Model that has been generated.

  • data – Dictionary with the following entries:

    mesh:

    The generated skfem.Mesh.

    basis:

    The generated skfem.Basis.

    boundary_facets:

    Dict of boundary_facets of mesh per boundary type.

    dirichlet_dofs:

    DOFs of the skfem.Basis associated with the Dirichlet boundary.

    unassembled_m:

    In case preassemble is True, the generated Model before preassembling operators.