OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
nonstationarytransportproblem.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef nonstationarytransportproblem_h
36 #define nonstationarytransportproblem_h
37 
38 #include "sparselinsystemnm.h"
39 #include "sparsemtrx.h"
40 #include "primaryfield.h"
42 #include "transportmaterial.h"
44 #include "linsystsolvertype.h"
45 
47 
48 #define _IFT_NonStationaryTransportProblem_Name "nonstationaryproblem"
49 #define _IFT_NonStationaryTransportProblem_initt "initt"
50 #define _IFT_NonStationaryTransportProblem_deltat "deltat"
51 #define _IFT_NonStationaryTransportProblem_deltatfunction "deltatfunction"
52 #define _IFT_NonStationaryTransportProblem_prescribedtimes "prescribedtimes"
53 #define _IFT_NonStationaryTransportProblem_alpha "alpha"
54 #define _IFT_NonStationaryTransportProblem_lumpedcapa "lumpedcapa"
55 #define _IFT_NonStationaryTransportProblem_changingproblemsize "changingproblemsize"
56 
57 
58 namespace oofem {
59 
60 
68 {
69 public:
70  virtual void vectorFromElement(FloatArray &vec, Element &element, TimeStep *tStep, ValueModeType mode) const;
71 };
72 
73 
79 {
80 protected:
81  double lumped;
82  double alpha;
83 
84 public:
85  MidpointLhsAssembler(bool lumped, double alpha);
86  virtual void matrixFromElement(FloatMatrix &mat, Element &element, TimeStep *tStep) const;
87 };
88 
89 
95 {
96 public:
97  virtual void matrixFromElement(FloatMatrix &mat, Element &element, TimeStep *tStep) const;
98 };
99 
100 
105 {
106 protected:
113 
115  std :: unique_ptr< SparseLinearSystemNM > linSolver;
116 
119 
121  double initT;
123  double deltaT;
124  double alpha;
125 
128 
131 
134 
137 
138 public:
140  NonStationaryTransportProblem(int i, EngngModel * _master);
143 
144  virtual void solveYourselfAt(TimeStep *tStep);
145  virtual void updateYourself(TimeStep *tStep);
146  virtual double giveUnknownComponent(ValueModeType, TimeStep *, Domain *, Dof *);
147  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode);
148  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode);
149 
150  virtual void updateDomainLinks();
151 
152  virtual TimeStep *giveNextStep();
153  virtual TimeStep *giveSolutionStepWhenIcApply(bool force = false);
154  virtual NumericalMethod *giveNumericalMethod(MetaStep *mStep);
155 
156  virtual IRResultType initializeFrom(InputRecord *ir);
157  virtual int checkConsistency();
158 
159  // identification
160  virtual const char *giveInputRecordName() const { return _IFT_NonStationaryTransportProblem_Name; }
161  virtual const char *giveClassName() const { return "NonStationaryTransportProblem"; }
162  virtual fMode giveFormulation() { return TL; }
163 
165  virtual int requiresUnknownsDictionaryUpdate() { return changingProblemSize; }
166  virtual bool requiresEquationRenumbering(TimeStep *) { return changingProblemSize; }
167  //Store solution vector to involved DoFs
168  //virtual void updateDofUnknownsDictionary(DofManager *dman, TimeStep *tStep);
169 
170  virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep);
171 
177  Function *giveDtFunction();
178 
182  double giveDeltaT(int n);
183 
187  double giveDiscreteTime(int n);
188 
189 #ifdef __CEMHYD_MODULE
190  void averageOverElements(TimeStep *tStep);
191 #endif
192 
193 protected:
194  virtual void assembleAlgorithmicPartOfRhs(FloatArray &rhs,
195  const UnknownNumberingScheme &s, TimeStep *tStep);
196 
201  virtual void applyIC(TimeStep *tStep);
202 
211  virtual void assembleDirichletBcRhsVector(FloatArray &answer, TimeStep *tStep, ValueModeType mode,
212  const UnknownNumberingScheme &s, Domain *d);
219  virtual void copyUnknownsInDictionary(ValueModeType mode, TimeStep *fromTime, TimeStep *toTime);
220 
225  virtual void updateInternalState(TimeStep *tStep);
226 };
227 } // end namespace oofem
228 #endif // nonstationarytransportproblem_h
LinSystSolverType
The values of this type should be related not to specific solvers, but more to specific packages that...
std::unique_ptr< SparseLinearSystemNM > linSolver
FloatArray discreteTimes
Specified times where the problem is solved.
Class and object Domain.
Definition: domain.h:115
Class representing meta step.
Definition: metastep.h:62
Total Lagrange.
Definition: fmode.h:44
This class represents stationary transport problem.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
long StateCounterType
StateCounterType type used to indicate solution state.
virtual void vectorFromElement(FloatArray &vec, Element &element, TimeStep *tStep, ValueModeType mode) const
This base class is an abstraction for numerical algorithm.
Definition: nummet.h:80
#define _IFT_NonStationaryTransportProblem_Name
Callback class for assembling element external forces:
Abstract base class for all finite elements.
Definition: element.h:145
virtual fMode giveFormulation()
Indicates type of non linear computation (total or updated formulation).
virtual const char * giveClassName() const
Returns class name of the receiver.
Callback class for assembling CBS pressure matrices.
bool changingProblemSize
Determines if there are change in the problem size (no application/removal of Dirichlet boundary cond...
Callback class for assembling specific types of vectors.
int dtFunction
Associated time function for time step increment.
Callback class for assembling specific types of matrices.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
This class represents linear nonstationary transport problem.
StateCounterType internalVarUpdateStamp
Contains last time stamp of internal variable update.
FloatArray bcRhs
Right hand side vector from boundary conditions.
int lumpedCapacityStab
If set then stabilization using lumped capacity will be used.
Callback class for assembling mid point effective tangents.
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
Abstract base class representing a function with vector input and output.
Definition: function.h:88
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual int requiresUnknownsDictionaryUpdate()
Allows to change number of equations during solution.
fMode
Type representing the type of formulation (total or updated) of non-linear computation.
Definition: fmode.h:42
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
virtual bool requiresEquationRenumbering(TimeStep *)
Returns true if equation renumbering is required for given solution step.
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
the oofem namespace is to define a context or scope in which all oofem names are defined.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
double initT
Initial time from which the computation runs. Default is zero.
Class representing solution step.
Definition: timestep.h:80

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011