.. # split from OESpicoliFunctions.rst:613


.. oe:namespace:: OESpicoli

.. meta::
   :keywords: OESetSurfacePotentials

.. oe:function:: OESetSurfacePotentials

   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OESetSurfacePotentials(OESurface& surf,
                                     const OESystem::OEScalarGrid& grid)

   .. oe:language:: python

      .. oe:api:: python

         OESetSurfacePotentials(surf: OESurface, grid: OEScalarGrid) -> bool

   Linearly interpolates the values in the
   :ref:`OEScalarGrid <OESystem_OEScalarGrid>` ``grid`` onto the surface
   ``surf``. The scalar value associated with each vertex can then be
   accessed using the :oe:meth:`OESpicoli::OESurface::GetPotential` and
   :oe:meth:`OESpicoli::OESurface::GetPotentialElement` methods.

