class_docstr: Class to solve the boundary value problem (BVP) for exp.
class_docstr_tok: ["Class","to","solve","the","boundary","value","problem","(","BVP",")","for","exp","."]
docstr: Solve boundary value problem (BVP).
  
  Given an initial point and an end point, solve the geodesic equation
  via minimizing the energy function.
  
  Parameters
  ----------
  initial_point : array-like, shape=[n_vertices, 3]
      Initial point, i.e. initial discrete surface.
  end_point : array-like, shape=[n_vertices, 3]
      End point, i.e. end discrete surface.
  
  Returns
  -------
  geod : array-like, shape=[n_times, n_vertices, 3]
      Geodesic discretized on the times given as inputs.
docstr_tok: ["Solve","boundary","value","problem","(","BVP",")",".","Given","an","initial","point","and","an","end","point",",","solve","the","geodesic","equation","via","minimizing","the","energy","function",".","Parameters","--","--","--","--","--","initial_point",":","array-like",",","shape=","[","n_vertices",",","3","]","Initial","point",",","i.e",".","initial","discrete","surface",".","end_point",":","array-like",",","shape=","[","n_vertices",",","3","]","End","point",",","i.e",".","end","discrete","surface",".","Returns","--","--","--","-","geod",":","array-like",",","shape=","[","n_times",",","n_vertices",",","3","]","Geodesic","discretized","on","the","times","given","as","inputs","."]
code: def _bvp(self, space, initial_point, end_point):
      """Solve boundary value problem (BVP).
  
      Given an initial point and an end point, solve the geodesic equation
      via minimizing the energy function.
  
      Parameters
      ----------
      initial_point : array-like, shape=[n_vertices, 3]
          Initial point, i.e. initial discrete surface.
      end_point : array-like, shape=[n_vertices, 3]
          End point, i.e. end discrete surface.
  
      Returns
      -------
      geod : array-like, shape=[n_times, n_vertices, 3]
          Geodesic discretized on the times given as inputs.
      """
      times = gs.linspace(0.0, 1.0, self.n_steps)
      n_points = initial_point.shape[-2]
      step = end_point - initial_point
      geod = gs.array([initial_point + i * step for i in times])
      midpoints = geod[1 : self.n_steps - 1]
  
      initial_point = gs.expand_dims(initial_point, axis=0)
      end_point = gs.expand_dims(end_point, axis=0)
  
      def objective(midpoint):
          """Compute path energy of paths going through a midpoint.
  
          Parameters
          ----------
          midpoint : array-like, shape=[(self.n_steps-2) * n_points * 3]
              Midpoints of the path.
  
          Returns
          -------
          _ : array-like, shape=[...]
              Energy of the path going through this midpoint.
          """
          midpoint = gs.reshape(
              gs.array(midpoint), (self.n_steps - 2, n_points, 3)
          )
          paths = gs.concatenate(
              [
                  initial_point,
                  midpoint,
                  end_point,
              ],
              axis=0,
          )
          return space.metric.path_energy(paths)
  
      initial_geod = gs.flatten(midpoints)
      sol = self.optimizer.minimize(objective, initial_geod)
  
      solution_midpoint = gs.reshape(
          gs.array(sol.x), (self.n_steps - 2, n_points, 3)
      )
  
      geod = gs.concatenate(
          [
              initial_point,
              solution_midpoint,
              end_point,
          ],
          axis=0,
      )
  
      return geod
  
imports: import math
  import geomstats.backend
  from geomstats.geometry.euclidean import Euclidean
  from geomstats.geometry.manifold import Manifold
  from geomstats.geometry.riemannian_metric import RiemannianMetric
  from geomstats.numerics.optimizers import ScipyMinimize
label_desc: Use image node_id 3 for calling the _LogSolver obj's underlying member method code with example usage: obj._bvp(space, initial_point, end_point) and returns: geod, space