FemProcess
The GeMA Fem Process Plugin
gmpFemProcess.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_PLUGIN_FEM_PROCESS_H_
25 #define _GEMA_PLUGIN_FEM_PROCESS_H_
26 
27 #include <gmProcess.h>
28 #include <gmElementMesh.h>
29 
30 #include "gmpFemProcessConfig.h"
31 #include "gmpFemSolverOptions.h"
32 
33 class GmpFemPhysics;
34 class GmNumSolver;
35 
38 class GMP_FEM_PROCESS_API_EXPORT GmpFemProcess : public GmProcess
39 {
40 public:
41  GmpFemProcess(GmSimulationData* simulation, QString id, QString description, const GmLogCategory& logger);
42  virtual ~GmpFemProcess();
43 
44  // Comments on the base class
45  virtual const char* pluginName() const { return "FemProcess"; }
46 
47  // Comments on the base class
48  virtual const char* pluginType() const { return "fem"; }
49 
50  // Comments on the base class
51  virtual void loadFunctions(LuaTable& table) { registerFunctions<GmpFemProcess>(table, processMethodTable()); }
52 
53  // Comments on the base class
54  virtual QStringList functionList() const { return buildFunctionList<GmpFemProcess>(processMethodTable()); }
55 
56  static int parseSolverParameters(lua_State* L, GmSimulationData* simData, QString fname,
57  GmElementMesh*& emesh, QList<GmpFemPhysics*>& physics,
58  GmNumSolver*& solver, GmpFemSolverOptions* solverOptions);
59 
60 private:
61 
63 
64  int solve(lua_State* L);
65  int initLinearSolver(lua_State* L);
66  int linearStep(lua_State* L);
67  int linearResidual(lua_State* L);
68 
69  // Methods required by NLSolver
70  int NLSolveRun(lua_State* L);
71  int NLSolveInit(lua_State* L);
72  int NLSolveStep(lua_State* L);
73  int NLgeostatic(lua_State* L);
74 
75  // Methods required by NonLinearSolver
76  int solverInit(lua_State* L);
77  int solverStep(lua_State* L);
78  int geostatic(lua_State* L);
79 
80  int initTransientSolver(lua_State* L);
81  int transientStep(lua_State* L);
82 
83  int transientLinearStep(lua_State* L);
84  int transientLinearResidual(lua_State* L);
85 
86  int release(lua_State* L);
87  int update (lua_State* L);
88 };
89 
90 #endif
Definition: gmpFemSolverOptions.h:38
virtual const char * pluginType() const=0
virtual void loadFunctions(LuaTable &table)=0
virtual QStringList functionList() const=0
Basic class for the FEM Process plugin object.
Definition: gmpFemProcess.h:38
virtual const char * pluginName() const=0
Declaration of the GmpFemSolverOptions class.
Base interface class for FEM Physics type plugins.
Definition: gmpFemPhysics.h:44
Declaration of usefull configuration definitions for the plugin library.