I have a geometry imported into MATLAB shown in the picture below.
For reference, the cube describes tissue bed and the cylindrical holes describe blood vessel with dirichlet pressure boundary conditions.
I am trying to specify c coefficients to change the properties in a spherical region within the cube,
with the coefficient inside and outside this spherical region set to different scalar values.
I know you cannot specify subdomains in the same way as in the 2D pde modeller, but I tried to use an "if statement" to spatially set c coefficients without much luck.
function c = c_region_3D(location,state)
%% Input variables for region which we want to alter
% sphere 1
a=1; % counter for all voxels within cube
if ((location.x(i)-xc_old1).^2 + (location.y(j)-yc_old1).^2 + (location.z(k)-zc_old1).^2<=(r_old).^2)==1
c(1,a) = 3.3929e-13;
c(1,a) = 4.4762e-13;
However, I only seem to be able to provide a c matrix with the length of one side of the cube - how do I therefore reference 3D points to specify the c coefficient in this region?