[cig-commits] r13737 - cs/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Wed Dec 17 02:32:40 PST 2008
Author: luis
Date: 2008-12-17 02:32:39 -0800 (Wed, 17 Dec 2008)
New Revision: 13737
Modified:
cs/cigma/trunk/src/core_eval_op.cpp
cs/cigma/trunk/src/core_eval_op.h
Log:
Removed comments, added logging
Modified: cs/cigma/trunk/src/core_eval_op.cpp
===================================================================
--- cs/cigma/trunk/src/core_eval_op.cpp 2008-12-17 10:32:35 UTC (rev 13736)
+++ cs/cigma/trunk/src/core_eval_op.cpp 2008-12-17 10:32:39 UTC (rev 13737)
@@ -18,39 +18,25 @@
{
}
-
void EvalOp::configure()
{
TRI_LOG_STR("EvalOp::configure()");
if (!function)
{
+ TRI_LOG_STR(">> Configuring function to be evaluated");
function = Function::NewFunction(fn_info);
- /*
- if (fn_name != "")
+ if (!function)
{
- function = Function::New(fn_name.c_str());
+ string msg("Uninitialized function argument");
+ throw cigma::Exception("EvalOp::configure", msg);
}
- else
- {
- //function = ReadField(field_info);
- shared_ptr<Field> field(new Field);
- field->setDofsPath(field_info.p_field);
- field->setMeshPath(field_info.mesh_info.p_mesh);
- field->setCell(field_info.fe_info.q_info.cell_type_name); // XXX: inherit from mesh?
- function = field;
- }
- */
}
- if (!function)
- {
- string msg("Uninitialized function argument");
- throw cigma::Exception("EvalOp::configure", msg);
- }
if (!coords)
{
+ TRI_LOG_STR(">> Configuring evaluation points ");
coords = ReadNodeCoordinates(nc_path);
if (!coords)
{
@@ -62,16 +48,26 @@
if (fn_info.fn_name == "zero")
{
+ TRI_LOG_STR(">> Setting dimension and rank of 'zero'");
ZeroFn *fn = static_cast<ZeroFn*>(&(*function));
fn->setShape(coords->n_dim(), 1);
- }
- if (fn_info.fn_name == "one")
+ }
+ else if (fn_info.fn_name == "one")
{
UnitScalarFn *fn = static_cast<UnitScalarFn*>(&(*function));
fn->setDim(coords->n_dim());
+
+ TRI_LOG_STR(">> Setting dimension of 'one'");
+ TRI_LOG(fn->n_dim());
+ TRI_LOG(fn->n_rank());
}
+ TRI_LOG(function->n_dim());
+ TRI_LOG(function->n_rank());
+ TRI_LOG(coords->n_points());
+ TRI_LOG(coords->n_dim());
+
if (coords->n_dim() != function->n_dim())
{
std::ostringstream stream;
@@ -81,10 +77,8 @@
<< std::ends;
throw cigma::Exception("EvalOp::configure", stream.str(), 3);
}
-
}
-
int EvalOp::run()
{
TRI_LOG_STR("EvalOp::run()");
Modified: cs/cigma/trunk/src/core_eval_op.h
===================================================================
--- cs/cigma/trunk/src/core_eval_op.h 2008-12-17 10:32:35 UTC (rev 13736)
+++ cs/cigma/trunk/src/core_eval_op.h 2008-12-17 10:32:39 UTC (rev 13737)
@@ -24,9 +24,6 @@
int run();
public:
-
- //std::string fn_name;
- //FieldInfo field_info;
FunctionInfo fn_info;
DataPath nc_path;
More information about the CIG-COMMITS
mailing list