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.
-
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