Hi Thomas,
yes it's inefficient and has a problem that domain numbers will be reassigned after you finalize geometry.
I've found another way to solve the problem:
activate auto creation of selections for each block (each grid block will create all possible selections)
>> blk.set('createselection', 'on');
after finalizing geometry
>> model.geom('geom1').run;
you can access to domain number for each block by selection name:
>> blkDomainSelectionEntities = model.selection('geomtag_blocktag_dom').entities(3);
where geomtag is your geometry tag (like geom1)
and block tag is you block tag.
See 'COMSOL API for use with Java Reference Manual' -> Selections of Geometric Entities -> Named selections
Hope this will help.
yes it's inefficient and has a problem that domain numbers will be reassigned after you finalize geometry.
I've found another way to solve the problem:
activate auto creation of selections for each block (each grid block will create all possible selections)
>> blk.set('createselection', 'on');
after finalizing geometry
>> model.geom('geom1').run;
you can access to domain number for each block by selection name:
>> blkDomainSelectionEntities = model.selection('geomtag_blocktag_dom').entities(3);
where geomtag is your geometry tag (like geom1)
and block tag is you block tag.
See 'COMSOL API for use with Java Reference Manual' -> Selections of Geometric Entities -> Named selections
Hope this will help.