[cig-commits] r13982 - cs/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Wed Jan 28 09:05:12 PST 2009
Author: luis
Date: 2009-01-28 09:05:12 -0800 (Wed, 28 Jan 2009)
New Revision: 13982
Modified:
cs/cigma/trunk/src/cli_eval_cmd.cpp
Log:
Fix 'cigma eval' option (should be --function since we can pass more than just a field).
Also, note that if location is not specified, then we assume the target
array is called /values.
Modified: cs/cigma/trunk/src/cli_eval_cmd.cpp
===================================================================
--- cs/cigma/trunk/src/cli_eval_cmd.cpp 2009-01-28 17:05:11 UTC (rev 13981)
+++ cs/cigma/trunk/src/cli_eval_cmd.cpp 2009-01-28 17:05:12 UTC (rev 13982)
@@ -33,13 +33,13 @@
opts_section = "Eval Options: ";
opts.add_options()
- ("field,f", po::value<string>(&function), "Function <FUNC> to evaluate")
+ ("function,f", po::value<string>(&function), "Function <FUNC> to evaluate")
("points,p", po::value<string>(&points), "Input quadrature points <QPTS-IN>")
("output,o", po::value<string>(&values), "Output values of function <QVALS-OUT>")
;
opts2.add_options()
- ("field-mesh", po::value<string>(&mesh), "Path to associated mesh (if given a field)")
+ ("field-mesh", po::value<string>(&mesh), "Path to associated mesh (if given function is a field)")
("field-mesh-cell", po::value<string>(&cell), "...cell type for mesh")
("field-mesh-coords", po::value<string>(&nc), "...node coords for mesh")
("field-mesh-connect", po::value<string>(&eb), "...connectivity for mesh")
@@ -61,9 +61,9 @@
op.verbose = true;
}
- if (!vm.count("field"))
+ if (!vm.count("function"))
{
- string msg("No function was specified (use --field option)");
+ string msg("No function was specified (use --function option)");
throw cigma::Exception("EvalCmd::configure", msg, 1);
}
@@ -114,6 +114,11 @@
<< endl;
}
+ if (path.location() == "")
+ {
+ path.set_location("/values");
+ }
+
WriteArray(path, op.values, !vm.count("do-not-overwrite"));
return status;
More information about the CIG-COMMITS
mailing list