fix functionality for applying to a multidimensional domain

Status Name Job ID Coverage
  Static Checks
canceled check_no_asserts #1372222

 
  Build Docker
canceled build_docker_from_cache #1372223

 
  Test
canceled test_mpi #1372225

canceled test_serial #1372224

 
  Demo Runs
canceled run_bernoulli #1372233

canceled run_curve_fitting #1372234

canceled run_getting_density #1372232

canceled run_getting_started_1 #1372228

canceled run_getting_started_2 #1372229

canceled run_getting_started_3 #1372230

canceled run_getting_started_mf #1372231

canceled run_ipynb0 #1372226

canceled run_ipynb1 #1372227

canceled run_meanfield #1372236

canceled run_nonlinearity_guide #1372237

canceled run_visual_vi #1372235