Xfem
The Xfem Plugin
Public Member Functions | Private Member Functions | List of all members
XfemProcess Class Reference

Basic class for the XFEM Process plugin object. More...

#include <xfemProcess.h>

Inheritance diagram for XfemProcess:
Inheritance graph
[legend]
Collaboration diagram for XfemProcess:
Collaboration graph
[legend]

Public Member Functions

 XfemProcess (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 Constructor. Will be called by the plugin loading code.
 
virtual ~XfemProcess ()
 Destructor.
 
virtual const char * pluginName () const
 
virtual const char * pluginType () const
 
virtual void loadFunctions (LuaTable &table)
 
virtual QStringList functionList () const
 
- Public Member Functions inherited from GmProcess
 GmProcess (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 
virtual const char * pluginCategory () const
 
virtual bool loadPrivateData (LuaTable &table)
 
virtual void printParameters (const GmLogCategory &logger)
 
- Public Member Functions inherited from GmPluginObject
 GmPluginObject (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 
QString id () const
 
QString description () const
 
QString pluginTypeName () const
 

Private Member Functions

GmProcessMethodRedirector< XfemProcess >::MethodRegistry * processMethodTable () const
 Returns the table storing the process exported function names / methods.
 
void xfemParseParameters (lua_State *L, XfemOptions *xfemOptions)
 
bool parseAttributeTable (lua_State *L, int index, QString fname, QStringList &attrList)
 Auxilliary function used to parse a table parameter describing attribute names. More...
 
int init (lua_State *L)
 The xfem.init() process implementation. More...
 
int step (lua_State *L)
 
int printSubElements (lua_State *L)
 The xfem.printSubElements() process implementation. More...
 
int printSubElementsGaussData (lua_State *L)
 The xfem.printSubElementsGaussData() process implementation. More...
 
int copyToElementMesh (lua_State *L)
 The xfem.copyToElementMesh() process implementation. More...
 
int geostatic (lua_State *L)
 Runs a Geostatic step to initialize the in-situ conditions.
 

Additional Inherited Members

- Protected Member Functions inherited from GmProcess
void registerFunctions (LuaTable &table, typename GmProcessMethodRedirector< T >::MethodRegistry *methods, bool enableLogging=true)
 
QStringList buildFunctionList (typename GmProcessMethodRedirector< T >::MethodRegistry *methods) const
 
- Protected Member Functions inherited from GmPluginObject
virtual const GmLogCategorylogger () const
 
GmSimulationDatasimulationData () const
 

Detailed Description

Basic class for the XFEM Process plugin object.

Member Function Documentation

◆ copyToElementMesh()

int XfemProcess::copyToElementMesh ( lua_State *  L)
private

The xfem.copyToElementMesh() process implementation.

Expects to receive as parameters: 1 - The mesh name or a Lua XFem mesh object with the source mesh 2 - The mesh name or a Lua element mesh object with the empty destination mesh 3 - The Xfem solver object. This is needed for interpolations, specially when splitFractures is true. This parameter can be NULL, mainlly for test purposes, and in that case, interpolations won't consider the enrichments. 4 - The name of the node value to be exported or a list with the names of values (state vars and/or attributes ). Can be nil. 5 - The name of the element value to be exported or a list with the names of values (cell attributes and/or Gauss attributes). Can be nil. 6 - A table with a set of copy options. Accepted flags are:

  • createMissing = true/false : Should we create missing attributes if tables 4 and/or 5 name an attribute that doesn't exists in the destination mesh?
  • splitFractures = true / false : Should we split the mesh along fracture borders?

◆ init()

int XfemProcess::init ( lua_State *  L)
private

The xfem.init() process implementation.

This function expects to receive as parameters in the Lua stack:

1) A string with the physical method id or a table with multiple method ids. All methods must share the same XFem mesh 2) A string with the solver id that will be used to solve the linear system 3) An optional pair of tables with print and solver options as described in GmpFemProcess::solve()

◆ parseAttributeTable()

bool XfemProcess::parseAttributeTable ( lua_State *  L,
int  index,
QString  fname,
QStringList attrList 
)
private

Auxilliary function used to parse a table parameter describing attribute names.

The parameter containing the values description should be in the Lua stack in the index position. It should be a string with the name of the value to or a list with the names of values. Can be nil.

If the parameter at index is nil or missing, the function returns false. On errors, the function does not return, throwing a message using lua_error()

Parameters
LThe Lua state
indexPosition in the stack with the value list description
fnameThe name of the called function, used on error messages
attrListList filled with value names

◆ printSubElements()

int XfemProcess::printSubElements ( lua_State *  L)
private

The xfem.printSubElements() process implementation.

Expects to receive as parameters on the Lua stack: 1 - A string with the mesh name or an XfemLuaMesh proxy object 2 - An optional table with print options. Each option is a boolean flag or numeric value associated to a table field. Available options are: 'line_numbers' – Should we print line numbers on the left margin? Default = true 'active_only' – Should we print only active cells? Default = true 'clip_title' – Should we clip column titles when the user gave us a width and the title is bigger than that? Default = true 'header_title' – Should we print a title in the header, for the entire table? Default = false 'trailler' – Should we add a closing trailler line to the table? Default = false 'cartesian' – Should we print cartesian coordinates for sub-element vertices instead of natural coordinates? Default = false. 'num_gauss' – Should we print a column with the number of Gauss points in the sub-element? Default = false. When filling this table, keep in mind that only options different from the default are needed. When an option is not present in the table its default value will be used.

◆ printSubElementsGaussData()

int XfemProcess::printSubElementsGaussData ( lua_State *  L)
private

The xfem.printSubElementsGaussData() process implementation.

Expects to receive as parameters on the Lua stack: 1 - A string with the mesh name or an XfemLuaMesh proxy object 2 - A string or a table with Gauss attributes. If empty, all data will be printed. The strings 'type', 'points', subnumber' and 'subtype' can be included in the table to request that, respectiveley, cell types, cell Gauss points, sub-element number and sub-element type should also be printed. If present, those should be the first entries of the table. Optionally, value names can have a suffix surrounded by () with the desired unit (ex: T(K) would ask for a temperature value named T and with values converted, if needed, to Kelvin degrees). 3 - An optional table with print options. Each option is a boolean flag or numeric value associated to a table field. Available options are: 'state' – The state number used to find values when the attribute/ state var has an associated history. Default = 0 (present state) If the state is invalid for an accessor, the default will be used for it. 'units' – Should we print units in column title? Default = true 'unit_line' – Should we print units in the header in a separate line? Default = false 'eval_functions' – Should we evaluate functions or do we print its name? Default = false 'def_nil' – Should we print default values as 'nil'? Default = false 'line_numbers' – Should we print line numbers on the left margin? Default = true 'active_only' – Should we print only active cells? Default = true 'clip_title' – Should we clip column titles when the user gave us a width and the title is bigger than that? Default = true 'header_title' – Should we print a title in the header, for the entire table? Default = false 'trailler' – Should we add a closing trailler line to the table? Default = false When filling this table, keep in mind that only options different from the default are needed. When an option is not present in the table its default value will be used. 4 - An optional table with column widths. If present, entry 'i' will define the column width for the attribute at entry 'i' in the attributes table (skiping special columns like those given by 'type', 'nodes', 'properties' and 'points' which currently can't have their sizes specified)


The documentation for this class was generated from the following files: