Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Geomcsg returning all zero sparse matrix

Please login with a confirmed email address before reporting spam

Dear all,

I am working on a model in MATLAB and want to have a list of my subdomains and points to use later in the script. The geomcsg command can be used for this.

When I run the following script, the solid table, st, is produced well enough. However, the point table is giving me trouble. MATLAB only returns "All zero sparse: 46-by-0" instead of producing a list of the points.

Thanks!

Michael


% COMSOL Multiphysics Model M-file
% Generated by COMSOL 3.5a (COMSOL 3.5.0.603, $Date: 2008/12/03 17:02:19 $)

flclear fem

% COMSOL version
clear vrsn
vrsn.name = 'COMSOL 3.5';
vrsn.ext = 'a';
vrsn.major = 0;
vrsn.build = 603;
vrsn.rcs = '$Name: $';
vrsn.date = '$Date: 2008/12/03 17:02:19 $';
fem.version = vrsn;

% Geometry
g1=block3('.01','.005','.002','base','corner','pos',{'0','0','0'},'axis',{'0','0','1'},'rot','0');
g2=cylinder3('.003','.03','pos',{'0','0','.005'},'axis',{'0','1','0'},'rot','0');
g3=cylinder3('0.0030','0.04','pos',{'0.005','0','-0.003'},'axis',{'0','1','0'},'rot','0');
g4=cylinder3('0.0030','0.03','pos',{'0.0050','0.04','-0.003'},'axis',{'0','1','0'},'rot','0');
g5=block3('0.0401','0.07','0.022','base','corner','pos',{'0.005-(0.003^2/2)^.5','0','-0.003+(0.003^2/2)^.5-0.022'},'axis',{'0','0','1'},'rot','0');

draw.s.objs = {g1,g2,g3,g4,g5};
draw.s.name = {'g1','g1','g2','g2','g3'};
draw.s.tags = {'g1','g2','g3','g4','g5'};
fem.draw = draw;

% Analyzed geometry
clear s

s.objs = {g1,g2,g3,g4,g5};
s.name = {'g1','g1','g2','g2','g3'};
s.tags = {'g1','g2','g3','g4','g5'};

fem.draw=struct('s',s);
fem.geom=geomcsg(fem);
[g,st,pt]=geomcsg(fem);

% (Default values are not included)
fem.sdim = {'x','y','z'};
fem.frame = {'ref'};
fem.border = 1;
clear units;
units.basesystem = 'SI';
fem.units = units;

% (Default values are not included)

% Application mode 1
clear appl
appl.mode.class = 'SmeSolid3';
appl.module = 'SME';
appl.gporder = 4;
appl.cporder = 2;
appl.assignsuffix = '_smsld';
clear prop
prop.analysis='time';
appl.prop = prop;
fem.appl{1} = appl;
fem.frame = {'ref'};
fem.border = 1;
clear units;
units.basesystem = 'SI';
fem.units = units;

% ODE Settings
clear ode
clear units;
units.basesystem = 'SI';
ode.units = units;
fem.ode=ode;

% Multiphysics
fem=multiphysics(fem);

0 Replies Last Post 17.03.2010, 16:56 GMT-4
COMSOL Moderator

Hello Michael Parrott

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.