From 73926c88fbe18d7598f0a5a966f87d2337ffc348 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Tue, 17 Sep 2024 22:37:07 -0400 Subject: [PATCH] [bug] fix MeshID and typo in mmc2json, by andreafarina, close #96 --- mmclab/mmc2json.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mmclab/mmc2json.m b/mmclab/mmc2json.m index 0779235..7f5d821 100644 --- a/mmclab/mmc2json.m +++ b/mmclab/mmc2json.m @@ -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 @@ -77,6 +82,7 @@ elem = [elem, cfg.elemprop]; end if (~singlefile) + Mesh.MeshID = fname; savemmcmesh(fname, node, elem); else Mesh.MeshNode = single(node); @@ -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');