We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This seems to be working on my interp branch. However we need an example. And I need to think about tests for ortho.
[Cjd, den] = MS_elasticDB('jd') [Cdi, ~] = MS_elasticDB('di')
CjdR = MS_rot3(Cjd, 30, 30, 0);
% Element wise interpolation [~, ~, CV, ~] = MS_VRH([0.5 0.5], CjdR, 1, Cdi, 1)
% Proper interp Cint = MS_interpolate(CjdR, Cdi, 0.5)
MS_plot(Cdi, den) MS_plot(CjdR, den) MS_plot(Cint, den) MS_plot(CV, den)
The first (but not the next two) of these work, and I don't know if any should... Look OK using the same as above.
function test_MS_interpolate_values_ortho % Test the interpolator works for different % matrices without rotation [Col, ] = MS_elasticDB('olivine'); [Cens, ] = MS_elasticDB('enstatite'); [,,Cmix25,] = MS_VRH([0.25, 0.75], Col, 1.0, Cens, 1.0); [,,Cmix50,] = MS_VRH([0.5, 0.5], Col, 1.0, Cens, 1.0); [,,Cmix67,~] = MS_VRH([0.67, 0.33], Col, 1.0, Cens, 1.0); assertElementsAlmostEqual(MS_interpolate(Col, Cens, 0.5), Cmix50); assertElementsAlmostEqual(MS_interpolate(Cens, Col, 0.5), Cmix50); assertElementsAlmostEqual(MS_interpolate(Col, Cens, 0.25), Cmix25); assertElementsAlmostEqual(MS_interpolate(Col, Cens, 0.67), Cmix67); end
function test_MS_interpolate_values_ang_ortho_x % Test the interpolator works for different % matrices with rotation [Col, ] = MS_elasticDB('olivine'); [Cens, ] = MS_elasticDB('enstatite'); CensR = MS_rot3(Cens, 45, 0, 0); [,,Cmix50,~] = MS_VRH([0.5, 0.5], Col, 1.0, Cens, 1.0); Cmix50R = MS_rot3(Cmix50, 22.5, 0, 0); assertElementsAlmostEqual(MS_interpolate(Col, CensR, 0.5), Cmix50R); assertElementsAlmostEqual(MS_interpolate(CensR, Col, 0.5), Cmix50R); end
function test_MS_interpolate_values_ang_ortho_y % Test the interpolator works for different % matrices with rotation [Col, ] = MS_elasticDB('olivine'); [Cens, ] = MS_elasticDB('enstatite'); CensR = MS_rot3(Cens, 0, 45, 0); [,,Cmix50,~] = MS_VRH([0.5, 0.5], Col, 1.0, Cens, 1.0); Cmix50R = MS_rot3(Cmix50, 0, 22.5, 0); assertElementsAlmostEqual(MS_interpolate(Col, CensR, 0.5), Cmix50R); %assertElementsAlmostEqual(MS_interpolate(CensR, Col, 0.5), Cmix50R); end
function test_MS_interpolate_values_ang_ortho_z % Test the interpolator works for different % matrices with rotation [Col, ] = MS_elasticDB('olivine'); [Cens, ] = MS_elasticDB('enstatite'); CensR = MS_rot3(Cens, 0, 0, 45); [,,Cmix50,~] = MS_VRH([0.5, 0.5], Col, 1.0, Cens, 1.0); Cmix50R = MS_rot3(Cmix50, 0, 0, -22.5); assertElementsAlmostEqual(MS_interpolate(Col, CensR, 0.5), Cmix50R); %assertElementsAlmostEqual(MS_interpolate(CensR, Col, 0.5), Cmix50R); end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This seems to be working on my interp branch. However we need an example. And I need to think about tests for ortho.
Example
[Cjd, den] = MS_elasticDB('jd')
[Cdi, ~] = MS_elasticDB('di')
CjdR = MS_rot3(Cjd, 30, 30, 0);
% Element wise interpolation
[~, ~, CV, ~] = MS_VRH([0.5 0.5], CjdR, 1, Cdi, 1)
% Proper interp
Cint = MS_interpolate(CjdR, Cdi, 0.5)
MS_plot(Cdi, den)
MS_plot(CjdR, den)
MS_plot(Cint, den)
MS_plot(CV, den)
Tests
The first (but not the next two) of these work,
and I don't know if any should... Look OK using the
same as above.
function test_MS_interpolate_values_ortho
% Test the interpolator works for different
% matrices without rotation
[Col,
] = MS_elasticDB('olivine');,Cmix25,[Cens,
] = MS_elasticDB('enstatite');,[
] = MS_VRH([0.25, 0.75], Col, 1.0, Cens, 1.0);,[
,Cmix50,] = MS_VRH([0.5, 0.5], Col, 1.0, Cens, 1.0);[
,,Cmix67,~] = MS_VRH([0.67, 0.33], Col, 1.0, Cens, 1.0);assertElementsAlmostEqual(MS_interpolate(Col, Cens, 0.5), Cmix50);
assertElementsAlmostEqual(MS_interpolate(Cens, Col, 0.5), Cmix50);
assertElementsAlmostEqual(MS_interpolate(Col, Cens, 0.25), Cmix25);
assertElementsAlmostEqual(MS_interpolate(Col, Cens, 0.67), Cmix67);
end
function test_MS_interpolate_values_ang_ortho_x
% Test the interpolator works for different
% matrices with rotation
[Col,
] = MS_elasticDB('olivine');,Cmix50,~] = MS_VRH([0.5, 0.5], Col, 1.0, Cens, 1.0);[Cens,
] = MS_elasticDB('enstatite');,CensR = MS_rot3(Cens, 45, 0, 0);
[
Cmix50R = MS_rot3(Cmix50, 22.5, 0, 0);
assertElementsAlmostEqual(MS_interpolate(Col, CensR, 0.5), Cmix50R);
assertElementsAlmostEqual(MS_interpolate(CensR, Col, 0.5), Cmix50R);
end
function test_MS_interpolate_values_ang_ortho_y
% Test the interpolator works for different
% matrices with rotation
[Col,
] = MS_elasticDB('olivine');,Cmix50,~] = MS_VRH([0.5, 0.5], Col, 1.0, Cens, 1.0);[Cens,
] = MS_elasticDB('enstatite');,CensR = MS_rot3(Cens, 0, 45, 0);
[
Cmix50R = MS_rot3(Cmix50, 0, 22.5, 0);
assertElementsAlmostEqual(MS_interpolate(Col, CensR, 0.5), Cmix50R);
%assertElementsAlmostEqual(MS_interpolate(CensR, Col, 0.5), Cmix50R);
end
function test_MS_interpolate_values_ang_ortho_z
% Test the interpolator works for different
% matrices with rotation
[Col,
] = MS_elasticDB('olivine');,Cmix50,~] = MS_VRH([0.5, 0.5], Col, 1.0, Cens, 1.0);[Cens,
] = MS_elasticDB('enstatite');,CensR = MS_rot3(Cens, 0, 0, 45);
[
Cmix50R = MS_rot3(Cmix50, 0, 0, -22.5);
assertElementsAlmostEqual(MS_interpolate(Col, CensR, 0.5), Cmix50R);
%assertElementsAlmostEqual(MS_interpolate(CensR, Col, 0.5), Cmix50R);
end
The text was updated successfully, but these errors were encountered: