Xfem
The Xfem Plugin
Loading...
Searching...
No Matches
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
29class XfemSubElement;
30class GmMesh;
31
34{
35public:
36 XfemLuaSubElement(const XfemSubElement* se, GmMesh* mesh, const GmLogCategory& logger);
37
38 // See comments on the base class
39 virtual const char* typeName() const { return "xfemSubElement"; }
40
41 virtual void fillMetatable(lua_State* L, int index);
42
44 virtual void* getClassMetatableID() { static int classID = 0; return &classID; }
45
47 const XfemSubElement* subElement() const { return _se; }
48
49private:
50 int type (lua_State* L);
51 int fracture (lua_State* L);
52 int nodeCoordinates(lua_State* L);
53 int firstGaussPoint(lua_State* L);
54 int numGaussPoints (lua_State* L);
55 int nodeIndex (lua_State* L);
56
57protected:
59 GmMesh* _mesh;
60};
61
62
63#endif
64
A proxy class to export XfemSubElement methods to the Lua environment.
Definition xfemLuaSubElement.h:34
XfemLuaSubElement(const XfemSubElement *se, GmMesh *mesh, const GmLogCategory &logger)
Constructor.
Definition xfemLuaSubElement.cpp:43
int type(lua_State *L)
Returns a string decribing the sub-element type ('quad4', 'quad9', 'tri3', etc)
Definition xfemLuaSubElement.cpp:74
int fracture(lua_State *L)
Returns a boolean decribing if the sub-element represents a fracture or not.
Definition xfemLuaSubElement.cpp:82
int nodeCoordinates(lua_State *L)
Returns a matrix object with sub-element natural node coordinates.
Definition xfemLuaSubElement.cpp:90
virtual void fillMetatable(lua_State *L, int index)
Prepares the object metatable for calling methods.
Definition xfemLuaSubElement.cpp:52
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:102
int nodeIndex(lua_State *L)
Given the sub-element's father element, a sub-element vertex index and a coordinate accessor,...
Definition xfemLuaSubElement.cpp:124
const XfemSubElement * subElement() const
Returns the wrapped sub-element.
Definition xfemLuaSubElement.h:47
int numGaussPoints(lua_State *L)
Returns the number of Gauss points tied to this subelement.
Definition xfemLuaSubElement.cpp:111
virtual void * getClassMetatableID()
Returns an unique identifier to identify an user object as a XfemLuaSubElement object.
Definition xfemLuaSubElement.h:44
const XfemSubElement * _se
The sub-element 'wrapped' by this proxy object.
Definition xfemLuaSubElement.h:58
A class used to represent an enriched element subelement, defining an integration region inside the e...
Definition xfemSubElement.h:39