Skip to content

Commit

Permalink
[NF] add flag -d=nfDumpFlat to dump the flat model
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Dec 2, 2019
1 parent 2366380 commit d7cc1e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions OMCompiler/Compiler/NFFrontEnd/NFInst.mo
Expand Up @@ -185,6 +185,10 @@ algorithm

VerifyModel.verify(flat_model);

if Flags.isSet(Flags.NF_DUMP_FLAT) then
print("FlatModel:\n" + FlatModel.toString(flat_model) + "\n");
end if;

// Convert the flat model to a DAE.
(dae, daeFuncs) := ConvertDAE.convert(flat_model, funcs, name, InstNode.info(inst_cls));
end instClassInProgram;
Expand Down
2 changes: 2 additions & 0 deletions OMCompiler/Compiler/Util/Flags.mo
Expand Up @@ -547,6 +547,8 @@ constant DebugFlag DUMP_ASSC = DEBUG_FLAG(189, "dumpASSC", false,
Gettext.gettext("Dumps the conversion process of analytical to structural singularities."));
constant DebugFlag SPLIT_CONSTANT_PARTS_SYMJAC = DEBUG_FLAG(190, "symJacConstantSplit", false,
Gettext.gettext("Generates all symbolic Jacobians with splitted constant parts."));
constant DebugFlag NF_DUMP_FLAT = DEBUG_FLAG(191, "nfDumpFlat", false,
Gettext.gettext("Dumps the flat model structure before generating the DAE."));

public
// CONFIGURATION FLAGS
Expand Down
3 changes: 2 additions & 1 deletion OMCompiler/Compiler/Util/FlagsUtil.mo
Expand Up @@ -246,7 +246,8 @@ constant list<Flags.DebugFlag> allDebugFlags = {
Flags.NF_EXPAND_FUNC_ARGS,
Flags.DUMP_JL,
Flags.DUMP_ASSC,
Flags.SPLIT_CONSTANT_PARTS_SYMJAC
Flags.SPLIT_CONSTANT_PARTS_SYMJAC,
Flags.NF_DUMP_FLAT
};

protected
Expand Down

0 comments on commit d7cc1e9

Please sign in to comment.