cantera/interfaces/matlab/toolbox/1D/@Domain1D/Domain1D.m
Ray Speth 2528df0f75 Reorganized source tree structure
These changes make it unnecessary to copy header files around during
the build process, which tends to confuse IDEs and debuggers. The
headers which comprise Cantera's external C++ interface are now in
the 'include' directory.

All of the samples and demos are now in the 'samples' subdirectory.
2012-02-12 02:27:14 +00:00

42 lines
1 KiB
Matlab
Executable file

function d = Domain1D(a, b, c, d, e)
% DOMAIN1D - Create a new one-dimensional domain.
%
d.dom_id = -1;
if nargin == 1
d.dom_id = domain_methods(0, a);
elseif nargin == 2
% a stagnation flow
if a == 1
if isa(b,'Solution')
d.dom_id = domain_methods(0, 1, thermo_hndl(b), kinetics_hndl(b), ...
trans_hndl(b), 1);
else
error('Wrong argument type. Expecting instance of class Solution.');
end
elseif a == 6
if isa(b,'Interface')
d.dom_id = domain_methods(0, 6, kinetics_hndl(b));
else
error('Wrong argument type. Expecting instance of class Interface.');
end
else
error('wrong object type');
end
elseif nargin == 3
if a == 1
if isa(b,'Solution')
d.dom_id = domain_methods(0, 1, thermo_hndl(b), kinetics_hndl(b), ...
trans_hndl(b), c);
else
error('Wrong argument type. Expecting instance of class Solution.');
end
else
error('unknown domain type');
end
end
if d.dom_id < 0
error(geterr);
end
d.domain_type = a;
d = class(d, 'Domain1D');