% TEST_MAXWELL_RING_G_NMNN: data function for Neumann boundary condition.

function g = test_maxwell_ring_g_nmnn (x, y, ind)

  [theta, r] = cart2pol (x, y);
  g = zeros ([2, size(x)]);
  switch (ind)
    case 1
      g(1,:,:) = sin(theta) .* (cos(x) - cos(y));
      g(2,:,:) = cos(theta) .* (cos(y) - cos(x));
    case 2
      g(1,:,:) = sin(theta) .* (cos(y) - cos(x));
      g(2,:,:) = cos(theta) .* (cos(x) - cos(y));
    case 3
      g(1,:,:) = cos(x) - cos(y);
    case 4
      g(2,:,:) = cos(y) - cos(x);
    otherwise
      error ('g_nmnn: unknown reference number')
  end

end


rafavzqz
github-repos/MATLAB/rafavzqz-geopdes/geopdes-3bfa57b1a38bd4da3148536c9f67cce81afce701/geopdes/inst/examples/maxwell/data_files/test_maxwell_ring_g_nmnn.m
geopdes
github-repos/MATLAB/rafavzqz-geopdes
3bfa57b1a38bd4da3148536c9f67cce81afce701