Xfem
The Xfem Plugin
xfemLuaSubElement.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4 ** All rights reserved.
5 **
6 ** This file is part of the "GeMA" software. It's use should respect
7 ** the terms in the license agreement that can be found together
8 ** with this source code.
9 ** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10 ** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11 ** A PARTICULAR PURPOSE.
12 **
13 ************************************************************************/
14 
24 #ifndef _GEMA_XFEM_LUA_SUBELEMENT_H_
25 #define _GEMA_XFEM_LUA_SUBELEMENT_H_
26 
27 #include <gmLuaObject.h>
28 
29 class XfemSubElement;
30 
33 {
34 public:
35  XfemLuaSubElement(const XfemSubElement* se, const GmLogCategory& logger);
36 
37  // See comments on the base class
38  virtual const char* typeName() const { return "xfemSubElement"; }
39 
40  virtual void fillMetatable(lua_State* L, int index);
41 
43  virtual void* getClassMetatableID() { static int classID = 0; return &classID; }
44 
46  const XfemSubElement* subElement() const { return _se; }
47 
48 private:
49  int type (lua_State* L);
50  int fracture (lua_State* L);
51  int nodeCoordinates(lua_State* L);
52  int firstGaussPoint(lua_State* L);
53  int numGaussPoints (lua_State* L);
54  int nodeIndex (lua_State* L);
55 
56 protected:
58 };
59 
60 
61 #endif
62 
virtual void fillMetatable(lua_State *L, int index)
Prepares the object metatable for calling methods.
Definition: xfemLuaSubElement.cpp:50
int fracture(lua_State *L)
Returns a boolean decribing if the sub-element represents a fracture or not.
Definition: xfemLuaSubElement.cpp:80
int numGaussPoints(lua_State *L)
Returns the number of Gauss points tied to this subelement.
Definition: xfemLuaSubElement.cpp:109
const XfemSubElement * subElement() const
Returns the wrapped sub-element.
Definition: xfemLuaSubElement.h:46
A proxy class to export XfemSubElement methods to the Lua environment.
Definition: xfemLuaSubElement.h:32
int type(lua_State *L)
Returns a string decribing the sub-element type ('quad4', 'quad9', 'tri3', etc)
Definition: xfemLuaSubElement.cpp:72
int nodeCoordinates(lua_State *L)
Returns a matrix object with sub-element natural node coordinates.
Definition: xfemLuaSubElement.cpp:88
const XfemSubElement * _se
The sub-element 'wrapped' by this proxy object.
Definition: xfemLuaSubElement.h:57
A class used to represent an enriched element subelement, defining an integration region inside the e...
Definition: xfemSubElement.h:38
XfemLuaSubElement(const XfemSubElement *se, const GmLogCategory &logger)
Constructor.
Definition: xfemLuaSubElement.cpp:42
int firstGaussPoint(lua_State *L)
Returns the index of this subelement first Gauss point inside the element set of Gauss/integration po...
Definition: xfemLuaSubElement.cpp:100
int nodeIndex(lua_State *L)
Given the sub-element's father element, a sub-element vertex index and a coordinate accessor,...
Definition: xfemLuaSubElement.cpp:122
virtual void * getClassMetatableID()
Returns an unique identifier to identify an user object as a XfemLuaSubElement object.
Definition: xfemLuaSubElement.h:43