Welcome to pyCollocation’s documentation!

Contents:

License

The MIT License (MIT)

Copyright (c) 2015 David R. Pugh

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pycollocation

pycollocation package

Submodules

pycollocation.boundary_value_problems module

pycollocation.differential_equations module

pycollocation.models module

pycollocation.orthogonal_polynomials module

pycollocation.solvers module

Objects imported here will live in the pycollocation.solvers namespace

class pycollocation.solvers.LeastSquaresSolver(basis_functions)[source]

Bases: pycollocation.solvers.solvers.Solver

Attributes

basis_functions Functions used to approximate the solution to a boundary value problem.

Methods

solve(basis_kwargs, boundary_points, ...) Solve a boundary value problem using the collocation method.
solve(basis_kwargs, boundary_points, coefs_array, nodes, problem, **solver_options)[source]

Solve a boundary value problem using the collocation method.

Parameters:

basis_kwargs : dict

Dictionary of keyword arguments used to build basis functions.

coefs_array : numpy.ndarray

Array of coefficients for basis functions defining the initial condition.

problem : bvp.TwoPointBVPLike

A two-point boundary value problem (BVP) to solve.

solver_options : dict

Dictionary of options to pass to the non-linear equation solver.

class pycollocation.solvers.Solver(basis_functions)[source]

Bases: pycollocation.solvers.solvers.SolverLike

Attributes

basis_functions Functions used to approximate the solution to a boundary value problem.

Methods

solve(basis_kwargs, boundary_points, ...) Solve a boundary value problem using the collocation method.
solve(basis_kwargs, boundary_points, coefs_array, nodes, problem, **solver_options)[source]

Solve a boundary value problem using the collocation method.

Parameters:

basis_kwargs : dict

Dictionary of keyword arguments used to build basis functions.

coefs_array : numpy.ndarray

Array of coefficients for basis functions defining the initial condition.

problem : bvp.TwoPointBVPLike

A two-point boundary value problem (BVP) to solve.

solver_options : dict

Dictionary of options to pass to the non-linear equation solver.

class pycollocation.solvers.Solution(basis_kwargs, functions, nodes, problem, residual_function, result)[source]

Bases: pycollocation.solvers.solutions.SolutionLike

Class representing the solution to a Boundary Value Problem (BVP).

Attributes

basis_kwargs
functions
nodes
problem
residual_function
result

Methods

evaluate_residual(points)
evaluate_solution(points)
normalize_residuals(points) Normalize residuals by the level of the variable.
evaluate_residual(points)[source]
evaluate_solution(points)[source]
normalize_residuals(points)[source]

Normalize residuals by the level of the variable.

class pycollocation.solvers.SolutionLike[source]

Bases: object

Attributes

basis_kwargs
functions
nodes
problem
residual_function
result
basis_kwargs
functions
nodes
problem
residual_function
result
class pycollocation.solvers.SolverLike[source]

Bases: object

Class describing the protocol the all SolverLike objects should satisfy.

Notes

Subclasses should implement solve method as described below.

Attributes

basis_functions Functions used to approximate the solution to a boundary value problem.

Methods

solve(basis_kwargs, boundary_points, ...) Solve a boundary value problem using the collocation method.
basis_functions

Functions used to approximate the solution to a boundary value problem.

Getter:Return the current basis functions.
Type:basis_functions.BasisFunctions
solve(basis_kwargs, boundary_points, coefs_array, nodes, problem, **solver_options)[source]

Solve a boundary value problem using the collocation method.

Parameters:

basis_kwargs : dict

Dictionary of keyword arguments used to build basis functions.

coefs_array : numpy.ndarray

Array of coefficients for basis functions defining the initial condition.

problem : bvp.TwoPointBVPLike

A two-point boundary value problem (BVP) to solve.

solver_options : dict

Dictionary of options to pass to the non-linear equation solver.

pycollocation.symbolics module

pycollocation.version module

pycollocation.visualizers module

Module contents

Objects imported here will live in the pycollocation namespace

Indices and tables