Skip to content

Commit

Permalink
[bug] fix MeshID and typo in mmc2json, by andreafarina, close #96
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Sep 18, 2024
1 parent fef5207 commit 73926c8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mmclab/mmc2json.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
% filestub_shapes.json: the domain shape file if cfg.shapes is defined
% filestub_pattern.bin: the domain shape file if cfg.pattern is defined
%
% if filestub ends with '.json', then mmc2json saves the mesh data
% in the single-file mode, and the mesh information is stored
% inside the "MeshNode" and "MeshElem" JSON keys inside the "Mesh"
% root-level object.
%
% Dependency:
% this function depends on the savejson/saveubjson functions from the
% Iso2Mesh toolbox (http://iso2mesh.sf.net) or JSONlab toolbox
Expand Down Expand Up @@ -77,6 +82,7 @@
elem = [elem, cfg.elemprop];
end
if (~singlefile)
Mesh.MeshID = fname;
savemmcmesh(fname, node, elem);
else
Mesh.MeshNode = single(node);
Expand Down Expand Up @@ -129,7 +135,7 @@
Session = copycfg(cfg, 'issavedet', Session, 'DoPartialPath');
Session = copycfg(cfg, 'issaveexit', Session, 'DoSaveExit');
Session = copycfg(cfg, 'issaveseed', Session, 'DoSaveSeed');
Session = copycfg(cfg, 'isnormalize', Session, 'DoNormalize');
Session = copycfg(cfg, 'isnormalized', Session, 'DoNormalize');
Session = copycfg(cfg, 'ismomentum', Session, 'DoDCS');
Session = copycfg(cfg, 'isspecular', Session, 'DoSpecular');
Session = copycfg(cfg, 'outputformat', Session, 'OutputFormat');
Expand Down

0 comments on commit 73926c8

Please sign in to comment.