[cig-commits] r13500 - in cs/cigma/trunk: . src

luis at geodynamics.org luis at geodynamics.org
Tue Dec 9 18:12:41 PST 2008


Author: luis
Date: 2008-12-09 18:12:41 -0800 (Tue, 09 Dec 2008)
New Revision: 13500

Added:
   cs/cigma/trunk/src/fn_explicit.cpp
   cs/cigma/trunk/src/fn_explicit.h
Modified:
   cs/cigma/trunk/Makefile.am
   cs/cigma/trunk/src/Function.cpp
Log:
Added explicit function

Modified: cs/cigma/trunk/Makefile.am
===================================================================
--- cs/cigma/trunk/Makefile.am	2008-12-10 02:12:39 UTC (rev 13499)
+++ cs/cigma/trunk/Makefile.am	2008-12-10 02:12:41 UTC (rev 13500)
@@ -139,6 +139,8 @@
 	src/FunctionRegistry.cpp \
 	src/fn_zero.h \
 	src/fn_zero.cpp \
+	src/fn_explicit.h \
+	src/fn_explicit.cpp \
 	src/Field.h \
 	src/Field.cpp \
 	src/Residuals.h \

Modified: cs/cigma/trunk/src/Function.cpp
===================================================================
--- cs/cigma/trunk/src/Function.cpp	2008-12-10 02:12:39 UTC (rev 13499)
+++ cs/cigma/trunk/src/Function.cpp	2008-12-10 02:12:41 UTC (rev 13500)
@@ -14,6 +14,9 @@
     //
     static FunctionRegistry registry;
     return registry.getFunction(source);
+
+    // XXX: change char* to DataPath&
+    // XXX: if not found, try to instantiate Explicit, or load from shared library
 }
 
 // ----------------------------------------------------------------------------

Added: cs/cigma/trunk/src/fn_explicit.cpp
===================================================================
--- cs/cigma/trunk/src/fn_explicit.cpp	                        (rev 0)
+++ cs/cigma/trunk/src/fn_explicit.cpp	2008-12-10 02:12:41 UTC (rev 13500)
@@ -0,0 +1,15 @@
+#include "fn_explicit.h"
+using namespace cigma;
+
+ExplicitFunction::ExplicitFunction()
+{
+}
+
+ExplicitFunction::~ExplicitFunction()
+{
+}
+
+bool ExplicitFunction::eval(double *point, double *value)
+{
+    return false;
+}

Added: cs/cigma/trunk/src/fn_explicit.h
===================================================================
--- cs/cigma/trunk/src/fn_explicit.h	                        (rev 0)
+++ cs/cigma/trunk/src/fn_explicit.h	2008-12-10 02:12:41 UTC (rev 13500)
@@ -0,0 +1,28 @@
+#ifndef __EXPLICIT_FUNCTION_H__
+#define __EXPLICIT_FUNCTION_H__
+
+#include "Function.h"
+#include "core_array.h"
+
+namespace cigma
+{
+    class ExplicitFunction;
+}
+
+class cigma::ExplicitFunction : public cigma::Function
+{
+public:
+    ExplicitFunction();
+    ~ExplicitFunction();
+
+    int n_dim() const;
+    int n_rank() const;
+    bool eval(double *point, double *value);
+
+public:
+    cigma::array<double> points;
+    cigma::array<double> values;
+};
+
+
+#endif



More information about the CIG-COMMITS mailing list