[cig-commits] r13553 - cs/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Tue Dec 9 18:14:09 PST 2008
Author: luis
Date: 2008-12-09 18:14:08 -0800 (Tue, 09 Dec 2008)
New Revision: 13553
Modified:
cs/cigma/trunk/src/cli_compare_cmd.cpp
cs/cigma/trunk/src/cli_compare_cmd.h
cs/cigma/trunk/src/cli_eval_cmd.cpp
cs/cigma/trunk/src/cli_eval_cmd.h
cs/cigma/trunk/src/cli_extract_cmd.cpp
cs/cigma/trunk/src/cli_extract_cmd.h
Log:
More detailed command line options
Modified: cs/cigma/trunk/src/cli_compare_cmd.cpp
===================================================================
--- cs/cigma/trunk/src/cli_compare_cmd.cpp 2008-12-10 02:14:06 UTC (rev 13552)
+++ cs/cigma/trunk/src/cli_compare_cmd.cpp 2008-12-10 02:14:08 UTC (rev 13553)
@@ -38,14 +38,22 @@
other.add_options()
("freq,f", po::value<int>(&(op.freq)), "Output frequency of timer")
- ("threshold", po::value<double>(&threshold), "Threshold residual")
- ("rule,r", po::value<string>(&rule), "Integration rule")
- ("mesh,m", po::value<string>(&mesh), "Path to integration mesh")
+ ("threshold", po::value<double>(&threshold), "Threshold value for global residual")
("first-mesh", po::value<string>(&mesh1), "Mesh for first field")
+ ("first-mesh-cell", po::value<string>(&cell1), "...cell type for first mesh")
+ ("first-mesh-coords", po::value<string>(&nc1), "...node coordinates for first mesh")
+ ("first-mesh-connect", po::value<string>(&eb1), "...connectivity for first mesh")
("second-mesh", po::value<string>(&mesh2), "Mesh for second field")
- ("mesh-cell", po::value<string>(&cell), "Cell type of integration mesh")
- ("first-mesh-cell", po::value<string>(&cell1), "Cell type for first mesh")
- ("second-mesh-cell", po::value<string>(&cell2), "Cell type for second mesh")
+ ("second-mesh-cell", po::value<string>(&cell2), "...cell type for second mesh")
+ ("second-mesh-coords", po::value<string>(&nc2), "...node coordinates for second mesh")
+ ("second-mesh-connect", po::value<string>(&eb2), "...connectivity for second mesh")
+ ("mesh,m", po::value<string>(&mesh), "Path to integration mesh")
+ ("mesh-cell", po::value<string>(&cell), "...cell type of integration mesh")
+ ("mesh-coords", po::value<string>(&nc), "...node coordinates of integration mesh")
+ ("mesh-connect", po::value<string>(&eb), "...connectivity of integration mesh")
+ ("rule,r", po::value<string>(&rule), "Integration rule (points and weights)")
+ ("rule-weights", po::value<string>(&qw), "...integration weights on reference cell")
+ ("rule-points", po::value<string>(&qx), "...integration points on reference cell")
;
args.add("first", 1);
@@ -107,13 +115,46 @@
}
}
+ /*
op.first_name = first;
op.second_name = second;
op.domain_info.mesh_info.p_mesh = DataPath(mesh);
op.domain_info.p_field = (op.domain_info.mesh_info).get_nc_path();
op.domain_info.fe_info.q_info.cell_type_name = cell;
+ */
+ op.first_info.fn_name = first;
+ op.first_info.field_info.p_field = DataPath(first);
+ op.first_info.field_info.mesh_info.p_mesh = DataPath(mesh1);
+ op.first_info.field_info.mesh_info.p_nc = DataPath(nc1);
+ op.first_info.field_info.mesh_info.p_eb = DataPath(eb1);
+ op.first_info.field_info.mesh_info.cell_type_name = cell1;
+ op.first_info.field_info.fe_info.q_info.p_quadrature = DataPath(qr1);
+ op.first_info.field_info.fe_info.q_info.p_weights = DataPath(qw1);
+ op.first_info.field_info.fe_info.q_info.p_points = DataPath(qx1);
+ op.first_info.field_info.fe_info.q_info.cell_type_name = cell1;
+
+ op.second_info.fn_name = second;
+ op.second_info.field_info.p_field = DataPath(second);
+ op.second_info.field_info.mesh_info.p_mesh = DataPath(mesh2);
+ op.second_info.field_info.mesh_info.p_nc = DataPath(nc2);
+ op.second_info.field_info.mesh_info.p_eb = DataPath(eb2);
+ op.second_info.field_info.mesh_info.cell_type_name = cell2;
+ op.second_info.field_info.fe_info.q_info.p_quadrature = DataPath(qr2);
+ op.second_info.field_info.fe_info.q_info.p_weights = DataPath(qw2);
+ op.second_info.field_info.fe_info.q_info.p_points = DataPath(qx2);
+ op.second_info.field_info.fe_info.q_info.cell_type_name = cell2;
+
+ op.domain_info.mesh_info.p_mesh = DataPath(mesh);
+ op.domain_info.mesh_info.p_nc = DataPath(nc);
+ op.domain_info.mesh_info.p_eb = DataPath(eb);
+ op.domain_info.mesh_info.cell_type_name = cell;
+ op.domain_info.fe_info.q_info.p_quadrature = DataPath(rule);
+ op.domain_info.fe_info.q_info.p_weights = DataPath(qw);
+ op.domain_info.fe_info.q_info.p_points = DataPath(qx);
+ op.domain_info.fe_info.q_info.cell_type_name = cell;
+
op.configure();
}
Modified: cs/cigma/trunk/src/cli_compare_cmd.h
===================================================================
--- cs/cigma/trunk/src/cli_compare_cmd.h 2008-12-10 02:14:06 UTC (rev 13552)
+++ cs/cigma/trunk/src/cli_compare_cmd.h 2008-12-10 02:14:08 UTC (rev 13553)
@@ -23,9 +23,9 @@
public:
- std::string mesh, cell, rule;
- std::string first, mesh1, cell1;
- std::string second, mesh2, cell2;
+ std::string mesh, nc, eb, rule, qw, qx, cell;
+ std::string first, mesh1, nc1, eb1, qr1, qw1, qx1, cell1;
+ std::string second, mesh2, nc2, eb2, qr2, qw2, qx2, cell2;
std::string outputfile;
double threshold;
Modified: cs/cigma/trunk/src/cli_eval_cmd.cpp
===================================================================
--- cs/cigma/trunk/src/cli_eval_cmd.cpp 2008-12-10 02:14:06 UTC (rev 13552)
+++ cs/cigma/trunk/src/cli_eval_cmd.cpp 2008-12-10 02:14:08 UTC (rev 13553)
@@ -38,6 +38,13 @@
("output,o", po::value<string>(&values), "Output values of function <QVALS-OUT>")
;
+ other.add_options()
+ ("field-mesh", po::value<string>(&mesh), "Path to associated mesh (if given 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")
+ ;
+
args.add("function", 1);
args.add("points", 1);
}
@@ -81,9 +88,18 @@
throw cigma::Exception("EvalCmd::configure", msg, 1);
}
- op.fn_name = this->function;
+ // configure function argument
+ op.fn_info.fn_name = this->function;
+ op.fn_info.field_info.p_field = DataPath(this->function);
+ op.fn_info.field_info.mesh_info.p_mesh = DataPath(this->mesh);
+ op.fn_info.field_info.mesh_info.p_nc = DataPath(this->nc);
+ op.fn_info.field_info.mesh_info.p_eb = DataPath(this->eb);
+ op.fn_info.field_info.mesh_info.cell_type_name = this->cell;
+
+ // configure points argument
op.nc_path = DataPath(this->points);
+ // load objects
op.configure();
}
Modified: cs/cigma/trunk/src/cli_eval_cmd.h
===================================================================
--- cs/cigma/trunk/src/cli_eval_cmd.h 2008-12-10 02:14:06 UTC (rev 13552)
+++ cs/cigma/trunk/src/cli_eval_cmd.h 2008-12-10 02:14:08 UTC (rev 13553)
@@ -22,9 +22,8 @@
public:
- std::string function;
- std::string points;
- std::string values;
+ std::string function, mesh, nc, eb, cell;
+ std::string points, values;
EvalOp op;
Modified: cs/cigma/trunk/src/cli_extract_cmd.cpp
===================================================================
--- cs/cigma/trunk/src/cli_extract_cmd.cpp 2008-12-10 02:14:06 UTC (rev 13552)
+++ cs/cigma/trunk/src/cli_extract_cmd.cpp 2008-12-10 02:14:08 UTC (rev 13553)
@@ -38,12 +38,17 @@
opts_section = "Extract Options: ";
opts.add_options()
("mesh,m", po::value<string>(&mesh), "mesh file (or path)")
- ("rule,r", po::value<string>(&rule), "use a specific quadrature rule")
+ ("rule,r", po::value<string>(&rule), "use a specific quadrature rule (points and weights)")
("output,o", po::value<string>(&points), "Output HDF5 file for quadrature points")
;
other.add_options()
- ("rule-order", po::value<unsigned int>(&rule_order), "use a specific quadrature order")
+ //("rule-order", po::value<unsigned int>(&rule_order), "use a specific quadrature order")
+ ("mesh-cell", po::value<string>(&cell), "cell type of mesh")
+ ("mesh-coords", po::value<string>(&nc), "node coordinates for mesh")
+ ("mesh-connect", po::value<string>(&eb), "connectivity for mesh")
+ ("rule-weights", po::value<string>(&qw), "integration weights on reference cell")
+ ("rule-points", po::value<string>(&qx), "integration points on reference cell")
;
args.add("mesh", 1);
@@ -69,23 +74,6 @@
if (vm.count("verbose"))
{
- /*
- if (vm.count("rule"))
- {
- cout << "Rule: " << rule << endl;
- }
- if (vm.count("rule-order"))
- {
- cout << "Quadrature Order: " << rule_order << endl;
- }
- if (vm.count("mesh"))
- {
- cout << "Input Mesh: " << mesh << endl;
- }
- if (vm.count("output"))
- {
- cout << "Output Points: " << points << endl;
- } // */
op.verbose = true;
}
@@ -103,8 +91,14 @@
op.mesh_info.p_mesh = DataPath(mesh);
+ op.mesh_info.p_nc = DataPath(nc);
+ op.mesh_info.p_eb = DataPath(eb);
+ op.mesh_info.cell_type_name = cell;
- op.quadrature_info.cell_type_name = rule;
+ op.quadrature_info.p_quadrature = DataPath(rule);
+ op.quadrature_info.p_weights = DataPath(qw);
+ op.quadrature_info.p_points = DataPath(qx);
+ op.quadrature_info.cell_type_name = cell;
op.configure();
}
Modified: cs/cigma/trunk/src/cli_extract_cmd.h
===================================================================
--- cs/cigma/trunk/src/cli_extract_cmd.h 2008-12-10 02:14:06 UTC (rev 13552)
+++ cs/cigma/trunk/src/cli_extract_cmd.h 2008-12-10 02:14:08 UTC (rev 13553)
@@ -25,9 +25,8 @@
public:
- std::string mesh;
- std::string rule;
- unsigned int rule_order;
+ std::string mesh, nc, eb;
+ std::string rule, qw, qx, cell;
std::string points;
ExtractOp op;
More information about the CIG-COMMITS
mailing list