  The Galerkin method is often employed for numerical integration of
evolutionary equations, such as the Navier-Stokes equation or the magnetic
induction equation. Application of the method requires solving an equation of
the form $P(Av-f)=0$ at each time step, where $v$ is an element of a
finite-dimensional space $V$ with a basis satisfying boundary conditions, $P$
is the orthogonal projection on this space and $A$ is a linear operator.
Usually the coefficients of $v$ expanded in the basis are found by calculating
the matrix of $PA$ acting on $V$ and solving the respective system of linear
equations. For physically realistic boundary conditions (such as the no-slip
boundary conditions for the velocity, or for a dielectric outside the fluid
volume for the magnetic field) the basis is often not orthogonal and solving
the problem can be computationally demanding. We propose an algorithm giving an
opportunity to reduce the computational cost for such a problem. Suppose there
exists a space $W$ that contains $V$, the difference between the dimensions of
$W$ and $V$ is small relative to the dimension of $V$, and solving the problem
$P(Aw-f)=0$, where $w$ is an element of $W$, requires less operations than
solving the original problem. The equation $P(Av-f)=0$ is then solved in two
steps: we solve the problem $P(Aw-f)=0$ in $W$, find a correction $h=v-w$ that
belongs to a complement to $V$ in $W$, and obtain the solution $w+h$. When the
dimension of the complement is small the proposed algorithm is more efficient
than the traditional one.
