Features of the numerical solution of boundary value problems on Python algorithmic programming language

The solution of most practical problems arising in the calculation of structures requires a numerical solution of boundary value problems. In the article, examples of solving specific boundary-value problems describe the capabilities of the modern object-oriented programming language Python. 1 Mathematical Python The Python language is programming language, simple for studying, promoting writing of the high-structured programs. One of primary benefits of this language as means for solution of edge tasks is, first of all, abundance of the libraries allowing to use in the most short time already existing library modules in own programs. One of attractive lines of this language is openness of implementations, there are language interpreters for many platforms. The most known reference implementation of language is CPython which is written in the C. Jython language is based on the Java programming language, in the course of broadcasting there is broadcast of the source code of the Python language in the Java language that promotes still bigger portability of programs. The special attention is deserved by the translator IronPython intended for integration of the Python programs with the applications created for the Microsoft.NET Framework platform. Also there is implementation of the Python language in the Python language (the PyPy interpreter including Jit the compiler). The described software is in free access and can be downloaded from the official sites. Important property of language is availability of the extensive literature mentioning as the description of language syntax, and the specific packets intended for solution of certain circle of tasks. The most known scopes of Python in the development area of scientific software is machine learning and data analysis, including possessing the discharged and badly structured structure. This language is obliged by the ability to processing of data bulks, first of all, to several libraries, specially created for fast data processing. Basis, so-called, "mathematical" Python number of the packets, most known in community Python, makes: NumPy, SciPy and Matplotlib, and also Pandas [1-3]. Originally the Python language did not reflect as language for numerical calculations, * Corresponding author: newfff@mail.ru


Mathematical Python
The Python language is programming language, simple for studying, promoting writing of the high-structured programs. One of primary benefits of this language as means for solution of edge tasks is, first of all, abundance of the libraries allowing to use in the most short time already existing library modules in own programs. One of attractive lines of this language is openness of implementations, there are language interpreters for many platforms. The most known reference implementation of language is CPython which is written in the C. Jython language is based on the Java programming language, in the course of broadcasting there is broadcast of the source code of the Python language in the Java language that promotes still bigger portability of programs. The special attention is deserved by the translator IronPython intended for integration of the Python programs with the applications created for the Microsoft.NET Framework platform. Also there is implementation of the Python language in the Python language (the PyPy interpreter including Jit the compiler). The described software is in free access and can be downloaded from the official sites.
Important property of language is availability of the extensive literature mentioning as the description of language syntax, and the specific packets intended for solution of certain circle of tasks. The most known scopes of Python in the development area of scientific software is machine learning and data analysis, including possessing the discharged and badly structured structure. This language is obliged by the ability to processing of data bulks, first of all, to several libraries, specially created for fast data processing.
Basis, so-called, "mathematical" Python number of the packets, most known in community Python, makes: NumPy, SciPy and Matplotlib, and also Pandas [1][2][3]. Originally the Python language did not reflect as language for numerical calculations, MATEC Web of Conferences 196, 01027 (2018) https://doi.org/10.1051/matecconf/201819601027 XXVII R-S-P Seminar 2018, Theoretical Foundation of Civil Engineering however availability of these packets allows to use it as means of calculations, somewhat similar to other packets of the matrix calculations-MATLAB and GNUOctave extending as on the basis of commercial, and free licenses.
The NumPy library allows to create arrays of any dimension and possesses set of the built-in functions operations for work with them. So, for example, transposing of matrix, or calculation of any function from all array cells does not require writing of the code including cycles that leads to considerable reduction as the most program code, and promotes bigger vektorizuyemost of calculations.
The packet of SciPy includes support of special functions, fast Fourier transform, operations of linear algebra, the subprogramme of solution of differential equations and search engine optimization, and also includes functions of interpolation and smoothing. Also inclusion of code C in the Python code of programs is supported.
Matplotlib allows to receive qualitative graphical representation of data, as in the form of two-dimensional, and three-dimensional diagrams. Further in article the results received with use of this packet in addition to which application of DISLIN library, or Chaco and Mayavi, Mayavi2 is possible are used.
In qualities of examples we will consider some solutions of boundary value problems with use of opportunities of the described libraries and features of the Python programming language. In article the solution of the following tasks is provided: The solution of the equation of Laplace on flat rectangular area describing distribution of temperatures (display of results of calculation will be made by means of graphic library Matplotlib).
Search of minimum of functionality of Dirikhle is carried out by variation and differential method, at solution arrays of required value are represented by means of Numpy library.

Solution of the equation of Laplace on flat rectangular area by method of finite differences
It is known that Laplace's equation describes many stationary processes (heat conductivity, diffusions, electrostatics).
Let's consider two-dimensional rectangular area on which borders distribution of temperature Figure 1 is set. Laplace's equation and boundary conditions for rectangular area have appearance: where 1 , dx dy  step on coordinate x and y . The enlarged flowchart of solution of problem of distribution of temperature is presented on Figure 2. Having executed iterations of method of Zeydel [4,5], on grid of 50х50 points in size, we will receive field distribution of temperatures which can be presented means of Matplotlib library in the form of two and three-dimensional diagrams provided in Table 1. Apparently from drawings, boundary conditions tasks are carried out with high accuracy. The Matplotlib library allows to make setup of the prevailing flowers of graphic display in very wide limits and gives to the user rich opportunities of choice of color forms of design of diagrams from the existing set. https://doi.org/10.1051/matecconf/201819601027 XXVII R-S-P Seminar 2018, Theoretical Foundation of Civil Engineering Table 1.

Three-dimensional schedule of a field of temperatures
When performing calculations in the Python language it is necessary to avoid explicit record of cycles on isolated points of area, as much as possible using possibilities of index cuts of NumPy library that allows to accelerate as much as possible process of calculations [3].

Search of a minimum of functionality of Dirikhle by a variation and differential method
Potential energy of a membrane to within the multiplier expressing its physical properties is expressed by multiple integral on area [6,7]: where:   the area occupied by a membrane; u  required function.
Position of balance of a membrane corresponds minimality condition of this functionality at the set boundary conditions. We will make the solution of a task by a variational-difference method with numerical calculation to each point of area of the decision, derivative of functionality. The finite difference analog of functionality has an appearance [6,7]: https://doi.org/10.1051/matecconf/201819601027 XXVII R-S-P Seminar 2018, Theoretical Foundation of Civil Engineering Results of the solution of a two-dimensional problem of minimization of functionality of Dirikhle are given in Table 2 under the set conditions on border. Table 2. Results of the solution of a boundary value problem for Dirikhle's functionality

The Isofield of u on a rectangular region
Three-dimensional graph of u