[cig-commits] r11720 - cs/benchmark/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Wed Apr 2 11:01:36 PDT 2008
Author: luis
Date: 2008-04-02 11:01:36 -0700 (Wed, 02 Apr 2008)
New Revision: 11720
Modified:
cs/benchmark/cigma/trunk/src/FE_Field.cpp
cs/benchmark/cigma/trunk/src/FE_Field.h
Log:
Updated FE_Field to account for removal of FE
Modified: cs/benchmark/cigma/trunk/src/FE_Field.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/FE_Field.cpp 2008-04-02 18:01:34 UTC (rev 11719)
+++ cs/benchmark/cigma/trunk/src/FE_Field.cpp 2008-04-02 18:01:36 UTC (rev 11720)
@@ -20,6 +20,20 @@
// ---------------------------------------------------------------------------
+void FE_Field::set_fe(QuadratureRule *rule)
+{
+ assert(rule != 0);
+ this->fe = rule;
+}
+
+void FE_Field::set_mesh(MeshPart *mesh)
+{
+ assert(mesh != 0);
+ this->meshPart = mesh;
+}
+
+// ---------------------------------------------------------------------------
+
void FE_Field::get_cell_dofs(int cellIndex, double *cellDofs)
{
assert(dofHandler != 0);
@@ -45,12 +59,9 @@
bool FE_Field::eval(double *point, double *value)
{
- assert(fe != 0);
assert(meshPart != 0);
-
- // get reference cell object from fe
+ assert(meshPart->cell != 0);
Cell *cell = meshPart->cell;
- assert(cell != 0);
// find the cell which contains given point
int e;
@@ -76,9 +87,9 @@
void FE_Field::tabulate_element(int e, double *values)
{
assert(fe != 0);
+ assert(fe->points != 0);
+ assert(fe->basis_tab != 0);
assert(meshPart != 0);
- assert(fe->meshPart == meshPart);
- assert(fe->points != 0);
Cell *cell = meshPart->cell;
assert(cell != 0);
@@ -87,11 +98,13 @@
assert(points != 0);
int nq = points->n_points();
+
// tabulate the function values
const int valdim = n_rank();
const int ndofs = cell->n_nodes();
double dofs[ndofs * valdim]; // XXX
+
get_cell_dofs(e, dofs); // XXX: do we split this function so that this call
// is independent from the following loop?
Modified: cs/benchmark/cigma/trunk/src/FE_Field.h
===================================================================
--- cs/benchmark/cigma/trunk/src/FE_Field.h 2008-04-02 18:01:34 UTC (rev 11719)
+++ cs/benchmark/cigma/trunk/src/FE_Field.h 2008-04-02 18:01:36 UTC (rev 11720)
@@ -4,7 +4,7 @@
#include "Field.h"
#include "DofHandler.h"
#include "MeshPart.h"
-#include "FE.h"
+#include "QuadratureRule.h"
namespace cigma
{
@@ -27,24 +27,25 @@
int n_dim() { return dim; }
int n_rank() { return rank; }
FieldType getType() { return FE_FIELD; }
+ MeshPart *getMesh() { return meshPart; }
public:
bool eval(double *point, double *value);
public:
- void set_quadrature_rule(QuadratureRule *rule);
+ void set_fe(QuadratureRule *rule);
+ void set_mesh(MeshPart *mesh);
void tabulate_element(int e, double *values);
public:
void get_cell_dofs(int cellIndex, double *cellDofs);
public:
-
int dim;
int rank;
DofHandler *dofHandler;
+ QuadratureRule *fe;
MeshPart *meshPart;
- FE *fe;
};
#endif
More information about the cig-commits
mailing list