Xfem
The Xfem Plugin
xfemLuaFracture.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_FRACTURE_H_
25 #define _GEMA_XFEM_LUA_FRACTURE_H_
26 
27 #include <gmLuaObject.h>
28 
29 class XfemFracture;
30 class XfemMesh;
31 
34 {
35 public:
36  XfemLuaFracture(XfemFracture* f, XfemMesh* m, const GmLogCategory& logger);
37 
38  // See comments on the base class
39  virtual const char* typeName() const { return "xfemFracture"; }
40 
41  virtual void fillMetatable(lua_State* L, int index);
42 
44  virtual void* getClassMetatableID() { static int classID = 0; return &classID; }
45 
46 private:
47  int numPoints (lua_State* L);
48  int pointCoordinate(lua_State* L);
49 
50  int numCrackPaths (lua_State* L);
51  int crackPath (lua_State* L);
52  int appendCrackPath(lua_State* L);
53  int splitCrackPath (lua_State* L);
54 
55  int numElemCutPos (lua_State* L);
56  int elemCutPos (lua_State* L);
57  int appendElemCutPos(lua_State* L);
58  int splitElemCutPos (lua_State* L);
59 
60 private:
63 };
64 
65 #endif
66 
A proxy class to export XfemFracture methods to the Lua environment.
Definition: xfemLuaFracture.h:33
XfemMesh * _mesh
The mesh that this fracture belongs to.
Definition: xfemLuaFracture.h:62
int crackPath(lua_State *L)
Returns three values with information about the element and the nodes of the given crack path.
Definition: xfemLuaFracture.cpp:111
int pointCoordinate(lua_State *L)
Returns a vector with the coordinate of the given point index.
Definition: xfemLuaFracture.cpp:85
virtual void * getClassMetatableID()
Returns an unique identifier to identify an user object as a XfemLuaFracture object.
Definition: xfemLuaFracture.h:44
int elemCutPos(lua_State *L)
Returns three values with information about the element and the edges of the given crack path.
Definition: xfemLuaFracture.cpp:212
int numElemCutPos(lua_State *L)
Returns the number of 'element cut positions' in the fracture.
Definition: xfemLuaFracture.cpp:203
virtual void fillMetatable(lua_State *L, int index)
Prepares the object metatable for calling methods.
Definition: xfemLuaFracture.cpp:50
Basic class for a XFEM mesh. This is the basic mesh interface for xfem problems adding enrichment cap...
Definition: xfemMesh.h:49
XfemLuaFracture(XfemFracture *f, XfemMesh *m, const GmLogCategory &logger)
Constructor.
Definition: xfemLuaFracture.cpp:41
XfemFracture * _fracture
The fracture 'wrapped' by this proxy object.
Definition: xfemLuaFracture.h:61
A simple class to represent a natural fracture.
Definition: xfemFracture.h:34
int numPoints(lua_State *L)
Returns the number of points of the fracture.
Definition: xfemLuaFracture.cpp:76
int appendElemCutPos(lua_State *L)
Given an element and two edge indices plus a boolean, appends (boolean = true) or prepends (false) th...
Definition: xfemLuaFracture.cpp:233
int splitElemCutPos(lua_State *L)
Given a crack path index, splits it in two on the given edge.
Definition: xfemLuaFracture.cpp:264
int splitCrackPath(lua_State *L)
Given a crack path index, splits it in two on the given vertex.
Definition: xfemLuaFracture.cpp:172
int numCrackPaths(lua_State *L)
Returns the number of 'crack paths' in the fracture.
Definition: xfemLuaFracture.cpp:102
int appendCrackPath(lua_State *L)
Given an element and two node indices plus a boolean, appends (boolean = true) or prepends (false) th...
Definition: xfemLuaFracture.cpp:132