OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
transienttransportproblem.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 transienttransportproblem_h
36 #define transienttransportproblem_h
37 
38 #include "engngm.h"
39 #include "sparselinsystemnm.h"
40 #include "sparsemtrx.h"
41 
42 #include <memory>
43 
45 
46 #define _IFT_TransientTransportProblem_Name "transienttransport"
47 #define _IFT_TransientTransportProblem_alpha "alpha"
48 #define _IFT_TransientTransportProblem_deltaT "deltat"
49 #define _IFT_TransientTransportProblem_dtFunction "dtfunction"
50 #define _IFT_TransientTransportProblem_prescribedTimes "prescribedtimes"
51 #define _IFT_TransientTransportProblem_keepTangent "keeptangent"
52 #define _IFT_TransientTransportProblem_lumped "lumped"
53 #define _IFT_TransientTransportProblem_exportFields "exportfields"
54 
55 
56 namespace oofem {
57 class SparseNonLinearSystemNM;
58 class PrimaryField;
59 class Function;
60 
66 {
67 protected:
69  std :: unique_ptr< PrimaryField > field;
70 
71  std :: unique_ptr< SparseMtrx > effectiveMatrix;
72 
76 
78  std :: unique_ptr< SparseNonLinearSystemNM > nMethod;
79 
80  double alpha;
83  double deltaT;
85  bool lumped;
86 
88 
89 public:
91  TransientTransportProblem(int i, EngngModel * _master);
94 
95  virtual void solveYourselfAt(TimeStep *tStep);
96  virtual void updateComponent(TimeStep *tStep, NumericalCmpn cmpn, Domain *d);
97  virtual double giveUnknownComponent(ValueModeType mode, TimeStep *tStep, Domain *d, Dof *dof);
100 
101  virtual void applyIC();
102 
103  virtual int requiresUnknownsDictionaryUpdate();
104  virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep);
105  virtual void updateDomainLinks();
106 
108  double giveDeltaT(int n);
109  double giveDiscreteTime(int iStep);
110 
111  virtual TimeStep *giveNextStep();
112  virtual TimeStep *giveSolutionStepWhenIcApply(bool force = false);
114 
116 
117  virtual bool requiresEquationRenumbering(TimeStep *tStep);
118  virtual int forceEquationNumbering();
119 
120  virtual void updateYourself(TimeStep *tStep);
121 
122  virtual int checkConsistency();
123  virtual FieldPtr giveField (FieldType key, TimeStep *);
124  // identification
125  virtual const char *giveInputRecordName() const { return _IFT_TransientTransportProblem_Name; }
126  virtual const char *giveClassName() const { return "TransientTransportProblem"; }
127  virtual fMode giveFormulation() { return TL; }
128 };
129 } // end namespace oofem
130 #endif // transienttransportproblem_h
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
virtual double giveUnknownComponent(ValueModeType mode, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
std::shared_ptr< Field > FieldPtr
Definition: field.h:72
Class and object Domain.
Definition: domain.h:115
FieldType
Physical type of field.
Definition: field.h:60
Class representing meta step.
Definition: metastep.h:62
Total Lagrange.
Definition: fmode.h:44
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
This base class is an abstraction for numerical algorithm.
Definition: nummet.h:80
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver&#39;s numerical method.
virtual void updateComponent(TimeStep *tStep, NumericalCmpn cmpn, Domain *d)
Updates components mapped to numerical method if necessary during solution process.
std::unique_ptr< PrimaryField > field
virtual int checkConsistency()
Allows programmer to test some receiver&#39;s internal data, before computation begins.
virtual bool requiresEquationRenumbering(TimeStep *tStep)
Returns true if equation renumbering is required for given solution step.
virtual ~TransientTransportProblem()
Destructor.
virtual fMode giveFormulation()
Indicates type of non linear computation (total or updated formulation).
Class implementing an array of integers.
Definition: intarray.h:61
TransientTransportProblem(int i, EngngModel *_master)
Constructor.
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
NumericalCmpn
Type representing numerical component.
Definition: numericalcmpn.h:46
Solves general nonlinear transient transport problems.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep)
This method is responsible for computing unique dictionary id (ie hash value) from given valueModeTyp...
virtual FieldPtr giveField(FieldType key, TimeStep *)
Returns the smart pointer to requested field, Null otherwise.
std::unique_ptr< SparseMtrx > effectiveMatrix
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual int forceEquationNumbering()
Forces equation renumbering on all domains associated to engng model.
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
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 TimeStep * giveSolutionStepWhenIcApply(bool force=false)
Returns the solution step when Initial Conditions (IC) apply.
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
virtual const char * giveClassName() const
Returns class name of the receiver.
std::unique_ptr< SparseNonLinearSystemNM > nMethod
Numerical method used to solve the problem.
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual int requiresUnknownsDictionaryUpdate()
Indicates if EngngModel requires Dofs dictionaries to be updated.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
virtual const char * giveInputRecordName() const
Class representing solution step.
Definition: timestep.h:80
#define _IFT_TransientTransportProblem_Name
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.

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:32 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011