[MOAB-dev] r4240 - MOAB/trunk/tools/mbcoupler
smithrm at mcs.anl.gov
smithrm at mcs.anl.gov
Tue Oct 26 12:20:50 CDT 2010
Author: smithrm
Date: 2010-10-26 12:20:50 -0500 (Tue, 26 Oct 2010)
New Revision: 4240
Modified:
MOAB/trunk/tools/mbcoupler/ElemUtil.cpp
MOAB/trunk/tools/mbcoupler/ElemUtil.hpp
Log:
ElemUtil.hpp
o Added evaluate_scalar_field and integrate_scalar_field as virtual functions to Element::Map.
o Changed Element::Map::set_vertices to a virtual function.
ElemUtil.cpp
o Removed extraneous code I had added a while ago.
Modified: MOAB/trunk/tools/mbcoupler/ElemUtil.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/ElemUtil.cpp 2010-10-26 14:27:13 UTC (rev 4239)
+++ MOAB/trunk/tools/mbcoupler/ElemUtil.cpp 2010-10-26 17:20:50 UTC (rev 4240)
@@ -116,55 +116,7 @@
return J *= 0.125;
}
-/**\brief Shape function for linear tetrahedron */
-class LinearTetMap : public VolMap {
- public:
- LinearTetMap( const CartVect* corner_coords ) : corners(corner_coords) {}
- virtual CartVect center_xi() const;
- virtual CartVect evaluate( const CartVect& xi ) const;
- virtual Matrix3 jacobian( const CartVect& xi ) const;
- private:
- const CartVect* corners;
- static const double corner_xi[8][3];
-};
-const double LinearTetMap::corner_xi[8][3] = { { -1, -1, -1 },
- { 1, -1, -1 },
- { 0, 1, -1 },
- { 0, 1, -1 },
- { 0, 0, 1 },
- { 0, 0, 1 },
- { 0, 0, 1 },
- { 0, 0, 1 } };
-CartVect LinearTetMap::center_xi() const
- { return CartVect(0.0); }
-
-CartVect LinearTetMap::evaluate( const CartVect& xi ) const
-{
- CartVect x(0.0);
- for (unsigned i = 0; i < 8; ++i) {
- const double N_i = (1 + xi[0]*corner_xi[i][0])
- * (1 + xi[1]*corner_xi[i][1])
- * (1 + xi[2]*corner_xi[i][2]);
-
- if ((i == 0) || (i == 1))
- x += N_i * corners[i];
- else if (i == 2)
- x += N_i * corners[2];
- else
- x += N_i * corners[3];
- }
- x *= 0.125;
- return x;
-}
-
-Matrix3 LinearTetMap::jacobian( const CartVect& xi ) const
More information about the moab-dev
mailing list