FemProcess
The GeMA Fem Process Plugin
Loading...
Searching...
No Matches
gmpFemTransientSolver.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_TRANSIENTSOLVER_H_
25#define _GEMA_PLUGIN_FEM_TRANSIENTSOLVER_H_
26
27#include "gmpFemSolver.h"
28
31{
32public:
34 GmNumSolver* solver, bool nonlinear, const GmpFemSolverOptions& options, const GmLogCategory& logger);
35
36 virtual ~GmpFemTransientSolver();
37
38 virtual bool init();
39 bool runStep(double dt, bool updateDof = false);
40 bool runLinearStep(double dt, int iter, bool updateDof = false);
41
42 bool calcLinearResidual(double dt, double* rnorm, double* maxNodeDiff, double* avgNodeDiff);
43
45 bool nonlinear() const { return _nonlinear; }
46
47 virtual bool addStateItemsToGroup(GmStateDump* state, int groupId);
48
49protected:
50 virtual bool initElementSets(GmNumSolver* solver);
51 virtual bool cleanup();
52
53 bool step(double dt, int iter, bool updateDof, bool updateBcs);
54 bool istep(double dt, int iter, bool updateDof, bool updateBcs);
55 bool estep(double dt, bool updateDof,bool updateBcs);
56 bool prepareLinearSystem(double dt);
57 bool prepareExplicitLinearSystem(double dt);
58 bool GuyanReductionSolve();
59
60private:
61 bool _implicit;
64};
65
66#endif
Basic class for the FEM solving process.
Definition gmpFemSolver.h:52
Definition gmpFemSolverOptions.h:39
Basic class for solving a transient FEM problem.
Definition gmpFemTransientSolver.h:31
bool calcLinearResidual(double dt, double *rnorm, double *maxNodeDiff, double *avgNodeDiff)
When solving a non linear system by repeated iterations, this function aims to calculate the residual...
Definition gmpFemTransientSolver.cpp:417
GmVector _oldx
Previous state of the x vector used for non linear problems;.
Definition gmpFemTransientSolver.h:63
virtual bool addStateItemsToGroup(GmStateDump *state, int groupId)
Adds to 'state' the data items that should be saved for this FEM process. Should probably be overridd...
Definition gmpFemTransientSolver.cpp:685
bool prepareLinearSystem(double dt)
Fills the matrix K and the vector Fe with the linear system resulting from applying an implicit schem...
Definition gmpFemTransientSolver.cpp:489
bool runLinearStep(double dt, int iter, bool updateDof=false)
Execute the process. Should be used by non linear processes only.
Definition gmpFemTransientSolver.cpp:195
bool runStep(double dt, bool updateDof=false)
Execute the process. Should be used by linear processes only.
Definition gmpFemTransientSolver.cpp:163
virtual bool initElementSets(GmNumSolver *solver)
Reimplements GmpFemSolver::initElementSets() to include the C matrix in the set of calculated matrice...
Definition gmpFemTransientSolver.cpp:115
bool _implicit
Is this a implicit or explicit scheme ?
Definition gmpFemTransientSolver.h:61
bool nonlinear() const
Returns true if the solver is non linear.
Definition gmpFemTransientSolver.h:45
bool prepareExplicitLinearSystem(double dt)
Definition gmpFemTransientSolver.cpp:555
bool _nonlinear
Is this a non linear problem ?
Definition gmpFemTransientSolver.h:62
virtual ~GmpFemTransientSolver()
Destructor.
Definition gmpFemTransientSolver.cpp:64
bool istep(double dt, int iter, bool updateDof, bool updateBcs)
Worker function for both runStep() and runLinearStep()
Definition gmpFemTransientSolver.cpp:224
virtual bool cleanup()
Deallocates memory and sets allocated resources to NULL. As a convenience, returns false.
Definition gmpFemTransientSolver.cpp:105
GmpFemTransientSolver(GmElementMesh *mesh, GmSimulationData *simulation, const QVector< GmpFemPhysics * > &physics, GmNumSolver *solver, bool nonlinear, const GmpFemSolverOptions &options, const GmLogCategory &logger)
Constructor. Expects to receive as parameters the mesh we are acting upon, the list of physics object...
Definition gmpFemTransientSolver.cpp:55
virtual bool init()
Prepares the solver for assembling matrices by creating the assembler object and allocating the neede...
Definition gmpFemTransientSolver.cpp:72
arma::vec GmVector
Declaration of the GmpFemSolver class.