Xfem
The Xfem Plugin
Loading...
Searching...
No Matches
xfemLuaMesh.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_MESH_H_
25#define _GEMA_XFEM_LUA_MESH_H_
26
27#include <gmLuaMesh.h>
28
29class XfemMesh;
30
33{
34public:
35 XfemLuaMesh(XfemMesh* mesh, const GmLogCategory& logger);
36
37 // See comments on the base class
38 virtual const char* typeName() const { return "xfemMesh"; }
39
40 virtual void fillMetatable(lua_State* L, int index);
41
43 virtual void* getClassMetatableID() { static int classID = 0; return &classID; }
44
45private:
46 int element (lua_State* L);
47 int numRegularSubElements (lua_State* L);
48 int numFractureSubElements (lua_State* L);
49 int subElement (lua_State* L);
50 int fractureSubElement (lua_State* L);
51 int clearSubElements (lua_State* L);
52 int addSubElement (lua_State* L);
53 int removeSubElement (lua_State* L);
54 int updateSubElementCoordinates (lua_State* L);
57 int enrichedGaussAttributeAccessor (lua_State* L);
58 int numNaturalFractures (lua_State* L);
59 int naturalFracture (lua_State* L);
60 int addNaturalFracture (lua_State* L);
61
62};
63
64#endif
65
GmMesh * mesh() const
A proxy class to export XfemMesh methods to the Lua environment.
Definition xfemLuaMesh.h:33
int numNaturalFractures(lua_State *L)
Returns the number of natural fractures associated with this mesh.
Definition xfemLuaMesh.cpp:388
int enrichedGaussAttributeAccessor(lua_State *L)
Returns an accessor object for querying enriched Gauss attributes or nil on error.
Definition xfemLuaMesh.cpp:352
XfemLuaMesh(XfemMesh *mesh, const GmLogCategory &logger)
Constructor.
Definition xfemLuaMesh.cpp:47
int clearSubElements(lua_State *L)
If an element is given as parameter, removes all sub-elements from that element. Otherwise,...
Definition xfemLuaMesh.cpp:187
int element(lua_State *L)
Returns an xfem element object given the element index inside the mesh.
Definition xfemLuaMesh.cpp:91
int enrichedElementFractureIntegrationRule(lua_State *L)
Returns the enriched element fracture integration rule for the given sub-element.
Definition xfemLuaMesh.cpp:325
int numFractureSubElements(lua_State *L)
Returns the number of fracture sub-elements of the given xfem element.
Definition xfemLuaMesh.cpp:120
int addNaturalFracture(lua_State *L)
Given a table or a vector with a list of point coordinates, creates a new fracture and adds it to the...
Definition xfemLuaMesh.cpp:418
int fractureSubElement(lua_State *L)
Returns an xfem fracture sub-element object given its father element and its index inside the father ...
Definition xfemLuaMesh.cpp:162
int updateSubElementCoordinates(lua_State *L)
Updates the set of coordinates from a subelement (keeping its type). Receives as parameters the fathe...
Definition xfemLuaMesh.cpp:265
int removeSubElement(lua_State *L)
Removes an existing sub-element from the enriched element given its father element and index.
Definition xfemLuaMesh.cpp:242
int numRegularSubElements(lua_State *L)
Returns the number of regular sub-elements of the given xfem element.
Definition xfemLuaMesh.cpp:108
int addSubElement(lua_State *L)
Adds a new subelement to the xfem element. Receives as parameters in the Lua stack the father element...
Definition xfemLuaMesh.cpp:210
int subElement(lua_State *L)
Returns an xfem sub-element object given its father element and its index inside the father.
Definition xfemLuaMesh.cpp:136
int naturalFracture(lua_State *L)
Returns a fracture object given its index in the mesh.
Definition xfemLuaMesh.cpp:400
virtual void fillMetatable(lua_State *L, int index)
Prepares the object metatable for calling methods.
Definition xfemLuaMesh.cpp:53
int enrichedElementRegularIntegrationRule(lua_State *L)
Returns the enriched element regular integration rule for the given element.
Definition xfemLuaMesh.cpp:300
virtual void * getClassMetatableID()
Returns an unique identifier to identify an user object as a XfemLuaMesh object.
Definition xfemLuaMesh.h:43
Basic class for a XFEM mesh. This is the basic mesh interface for xfem problems adding enrichment cap...
Definition xfemMesh.h:50