[cig-commits] r13564 - cs/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Tue Dec 9 18:14:28 PST 2008
Author: luis
Date: 2008-12-09 18:14:27 -0800 (Tue, 09 Dec 2008)
New Revision: 13564
Modified:
cs/cigma/trunk/src/FunctionRegistry.cpp
cs/cigma/trunk/src/core_compare_op.cpp
cs/cigma/trunk/src/core_eval_op.cpp
cs/cigma/trunk/src/fn_zero.cpp
cs/cigma/trunk/src/fn_zero.h
Log:
Shortened ZeroFunction to ZeroFn
Modified: cs/cigma/trunk/src/FunctionRegistry.cpp
===================================================================
--- cs/cigma/trunk/src/FunctionRegistry.cpp 2008-12-10 02:14:25 UTC (rev 13563)
+++ cs/cigma/trunk/src/FunctionRegistry.cpp 2008-12-10 02:14:27 UTC (rev 13564)
@@ -14,7 +14,7 @@
//
// Initial set of functions
//
- shared_ptr<ZeroFunction> zero(new ZeroFunction());
+ shared_ptr<ZeroFn> zero(new ZeroFn());
this->addFunction("zero", zero);
shared_ptr<UnitScalarFn> one(new UnitScalarFn());
Modified: cs/cigma/trunk/src/core_compare_op.cpp
===================================================================
--- cs/cigma/trunk/src/core_compare_op.cpp 2008-12-10 02:14:25 UTC (rev 13563)
+++ cs/cigma/trunk/src/core_compare_op.cpp 2008-12-10 02:14:27 UTC (rev 13564)
@@ -28,6 +28,7 @@
void CompareOp::configure()
{
TRI_LOG_STR("CompareOp::configure");
+ TRI_LOG((bool)domain_info);
// Read integration mesh
if (!domain)
@@ -86,10 +87,10 @@
assert(domain->fe->cell);
assert(domain->fe->quadrature);
- if (dynamic_cast<cigma::ZeroFunction*>(&(*first)))
+ if (dynamic_cast<cigma::ZeroFn*>(&(*first)))
{
- cout << "First function is a cigma::ZeroFunction" << endl;
- ZeroFunction *fn = static_cast<ZeroFunction*>(&(*first));
+ cout << "First function is a cigma::ZeroFn" << endl;
+ ZeroFn *fn = static_cast<ZeroFn*>(&(*first));
fn->setShape(second->n_dim(), second->n_rank());
}
else if (dynamic_cast<cigma::UnitScalarFn*>(&(*first)))
@@ -99,10 +100,10 @@
fn->setDim(second->n_dim());
}
- if (dynamic_cast<cigma::ZeroFunction*>(&(*second)))
+ if (dynamic_cast<cigma::ZeroFn*>(&(*second)))
{
- cout << "Second function is a cigma::ZeroFunction" << endl;
- ZeroFunction *fn = static_cast<ZeroFunction*>(&(*second));
+ cout << "Second function is a cigma::ZeroFn" << endl;
+ ZeroFn *fn = static_cast<ZeroFn*>(&(*second));
fn->setShape(first->n_dim(), first->n_rank());
}
else if (dynamic_cast<cigma::UnitScalarFn*>(&(*second)))
Modified: cs/cigma/trunk/src/core_eval_op.cpp
===================================================================
--- cs/cigma/trunk/src/core_eval_op.cpp 2008-12-10 02:14:25 UTC (rev 13563)
+++ cs/cigma/trunk/src/core_eval_op.cpp 2008-12-10 02:14:27 UTC (rev 13564)
@@ -62,7 +62,7 @@
if (fn_info.fn_name == "zero")
{
- ZeroFunction *fn = static_cast<ZeroFunction*>(&(*function));
+ ZeroFn *fn = static_cast<ZeroFn*>(&(*function));
fn->setShape(coords->n_dim(), 1);
}
Modified: cs/cigma/trunk/src/fn_zero.cpp
===================================================================
--- cs/cigma/trunk/src/fn_zero.cpp 2008-12-10 02:14:25 UTC (rev 13563)
+++ cs/cigma/trunk/src/fn_zero.cpp 2008-12-10 02:14:27 UTC (rev 13564)
@@ -1,21 +1,21 @@
#include "fn_zero.h"
using namespace cigma;
-ZeroFunction::ZeroFunction() : dim(1), rank(1)
+ZeroFn::ZeroFn() : dim(1), rank(1)
{
}
-ZeroFunction::~ZeroFunction()
+ZeroFn::~ZeroFn()
{
}
-void ZeroFunction::setShape(int dim, int rank)
+void ZeroFn::setShape(int dim, int rank)
{
this->dim = dim;
this->rank = rank;
}
-bool ZeroFunction::eval(double *point, double *value)
+bool ZeroFn::eval(double *point, double *value)
{
for (int i = 0; i < rank; i++)
{
Modified: cs/cigma/trunk/src/fn_zero.h
===================================================================
--- cs/cigma/trunk/src/fn_zero.h 2008-12-10 02:14:25 UTC (rev 13563)
+++ cs/cigma/trunk/src/fn_zero.h 2008-12-10 02:14:27 UTC (rev 13564)
@@ -1,18 +1,18 @@
-#ifndef __ZERO_FUNCTION_H__
-#define __ZERO_FUNCTION_H__
+#ifndef __ZERO_FN_H__
+#define __ZERO_FN_H__
#include "Function.h"
namespace cigma
{
- class ZeroFunction;
+ class ZeroFn;
}
-class cigma::ZeroFunction : public cigma::Function
+class cigma::ZeroFn : public cigma::Function
{
public:
- ZeroFunction();
- ~ZeroFunction();
+ ZeroFn();
+ ~ZeroFn();
void setShape(int dim, int rank);
@@ -26,7 +26,7 @@
int rank;
};
-inline int cigma::ZeroFunction::n_dim() const { return dim; }
-inline int cigma::ZeroFunction::n_rank() const { return rank; }
+inline int cigma::ZeroFn::n_dim() const { return dim; }
+inline int cigma::ZeroFn::n_rank() const { return rank; }
#endif
More information about the CIG-COMMITS
mailing list