I would like to use high-order basis functions in the forward solver. Unfortunately, I have some troubles with that. My code with explanations is provided below:
1) I am using Matlab 2016a PDE Toolbox to generate mesh:
4) I call “toastBasis” function: basis = toastBasis(mesh,grd,grd,bb,'LINEAR');
and get warnings: “Node without pixel support found”. What does this message mean? What is wrong?
5) Finally, I set up sources and detectors
nq = 16;
rad = 25; %mesh radius [mm]
for i=1:nq
phi_q = 2*pi*(i-1)/nq;
Q(i,:) = rad * [cos(phi_q) sin(phi_q)];
Q(i,:) = [24 0];
phi_m = 2*pi*(i-0.5)/nq;
M(i,:) = rad * [cos(phi_m) sin(phi_m)];
end
mesh.SetQM(Q,M);
hold on
plot(Q(:,1),Q(:,2),'ro','MarkerFaceColor','r');
plot(M(:,1),M(:,2),'bs','MarkerFaceColor','b');
% Create the source and boundary projection vectors
qvec = mesh.Qvec('Isotropic', 'Gaussian', 4);
mvec = mesh.Mvec('Gaussian', 2);
% Solve the FEM linear system
K = dotSysmat (mesh,mua,mus,ref,0);
and end up with a system matrix K which contains “inf” and “-inf” values.
What is wrong with my code? Could you help me to understand how to use high-order basis functions in Toast++?
Ok, first we should try to figure out the "node without pixel support" problem. This would be caused by the specified bounding box being smaller than the mesh extents. This might be caused by rounding errors. You could just try to create the basis mapper without explicitly specifying a bounding box. Toast then automatically calculates the bounding box from the mesh extents, I.e.
basis = toastBasis(mesh,grd);
The second problem of ending up with inf values in the system matrix may be a result of the first problem.
Can you let me know if this solves the problem? Otherwise I'll look into this in more detail.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Toast++ team,
I would like to use high-order basis functions in the forward solver. Unfortunately, I have some troubles with that. My code with explanations is provided below:
1) I am using Matlab 2016a PDE Toolbox to generate mesh:
2) The generated mesh is passed into Toast++ “toastMesh” function along with quadratic basis functions type:
3) I set up the scattering and absorption coefficients as follows:
4) I call “toastBasis” function:
basis = toastBasis(mesh,grd,grd,bb,'LINEAR');
and get warnings: “Node without pixel support found”. What does this message mean? What is wrong?
5) Finally, I set up sources and detectors
and end up with a system matrix K which contains “inf” and “-inf” values.
What is wrong with my code? Could you help me to understand how to use high-order basis functions in Toast++?
This is an info about my setup:
Mac OS X Yosemite 10.10.5
Matlab R2016a
Toast++ 2.0.0 with precompiled binaries downloaded from https://sourceforge.net/projects/toastpp/files/
Thank you very much for your help.
Ok, first we should try to figure out the "node without pixel support" problem. This would be caused by the specified bounding box being smaller than the mesh extents. This might be caused by rounding errors. You could just try to create the basis mapper without explicitly specifying a bounding box. Toast then automatically calculates the bounding box from the mesh extents, I.e.
basis = toastBasis(mesh,grd);
The second problem of ending up with inf values in the system matrix may be a result of the first problem.
Can you let me know if this solves the problem? Otherwise I'll look into this in more detail.