OOFEM 3.0
Loading...
Searching...
No Matches
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 - 2025 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"
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"
57
58namespace oofem {
59
60
68{
69public:
70 void vectorFromElement(FloatArray &vec, Element &element, TimeStep *tStep, ValueModeType mode) const override;
71};
72
73
79{
80protected:
81 double lumped;
82 double alpha;
83
84public:
85 MidpointLhsAssembler(bool lumped, double alpha);
86 void matrixFromElement(FloatMatrix &mat, Element &element, TimeStep *tStep) const override;
87};
88
89
95{
96public:
97 void matrixFromElement(FloatMatrix &mat, Element &element, TimeStep *tStep) const override;
98};
99
100
105{
106protected:
113
115 std :: unique_ptr< SparseLinearSystemNM > linSolver;
116
119
121 double initT = 0.;
123 double deltaT = 0.;
124 double alpha = 0.;
125
128
130 int dtFunction = 0;
131
134
137
138public:
140
141 void solveYourselfAt(TimeStep *tStep) override;
142 void updateYourself(TimeStep *tStep) override;
143 double giveUnknownComponent(ValueModeType, TimeStep *tStep, Domain *d, Dof *dof) override;
144 void saveContext(DataStream &stream, ContextMode mode) override;
145 void restoreContext(DataStream &stream, ContextMode mode) override;
146
147 void updateDomainLinks() override;
148
149 TimeStep *giveNextStep() override;
150 TimeStep *giveSolutionStepWhenIcApply(bool force = false) override;
152
153 void initializeFrom(InputRecord &ir) override;
154 int checkConsistency() override;
155
156 // identification
158 const char *giveClassName() const override { return "NonStationaryTransportProblem"; }
159 fMode giveFormulation() override { return TL; }
160
164 //Store solution vector to involved DoFs
165 //void updateDofUnknownsDictionary(DofManager *dman, TimeStep *tStep) override;
166
167 int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep) override;
168
175
179 double giveDeltaT(int n);
180
184 double giveDiscreteTime(int n);
185
186#ifdef __CEMHYD_MODULE
187 void averageOverElements(TimeStep *tStep);
188#endif
189
190protected:
192 const UnknownNumberingScheme &s, TimeStep *tStep);
193
198 virtual void applyIC(TimeStep *tStep);
199
208 virtual void assembleDirichletBcRhsVector(FloatArray &answer, TimeStep *tStep, ValueModeType mode,
209 const UnknownNumberingScheme &s, Domain *d);
216 virtual void copyUnknownsInDictionary(ValueModeType mode, TimeStep *fromTime, TimeStep *toTime);
217
222 virtual void updateInternalState(TimeStep *tStep);
223};
224} // end namespace oofem
225#endif // nonstationarytransportproblem_h
double giveDeltaT()
Returns time step size from the time step controlelr.
Definition engngm.h:424
void matrixFromElement(FloatMatrix &mat, Element &element, TimeStep *tStep) const override
void matrixFromElement(FloatMatrix &mat, Element &element, TimeStep *tStep) const override
MidpointLhsAssembler(bool lumped, double alpha)
FloatArray discreteTimes
Specified times where the problem is solved.
virtual void assembleDirichletBcRhsVector(FloatArray &answer, TimeStep *tStep, ValueModeType mode, const UnknownNumberingScheme &s, Domain *d)
int requiresUnknownsDictionaryUpdate() override
Allows to change number of equations during solution.
TimeStep * giveNextStep() override
Returns next time step (next to current step) of receiver.
int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep) override
double giveUnknownComponent(ValueModeType, TimeStep *tStep, Domain *d, Dof *dof) override
void restoreContext(DataStream &stream, ContextMode mode) override
NonStationaryTransportProblem(int i, EngngModel *_master)
const char * giveClassName() const override
Returns class name of the receiver.
std ::unique_ptr< SparseLinearSystemNM > linSolver
bool requiresEquationRenumbering(TimeStep *tStep) override
void saveContext(DataStream &stream, ContextMode mode) override
TimeStep * giveSolutionStepWhenIcApply(bool force=false) override
double initT
Initial time from which the computation runs. Default is zero.
int lumpedCapacityStab
If set then stabilization using lumped capacity will be used.
NumericalMethod * giveNumericalMethod(MetaStep *mStep) override
Returns reference to receiver's numerical method.
int dtFunction
Associated time function for time step increment.
virtual void copyUnknownsInDictionary(ValueModeType mode, TimeStep *fromTime, TimeStep *toTime)
bool changingProblemSize
Determines if there are change in the problem size (no application/removal of Dirichlet boundary cond...
virtual void assembleAlgorithmicPartOfRhs(FloatArray &rhs, const UnknownNumberingScheme &s, TimeStep *tStep)
FloatArray bcRhs
Right hand side vector from boundary conditions.
StationaryTransportProblem(int i, EngngModel *_master)
void vectorFromElement(FloatArray &vec, Element &element, TimeStep *tStep, ValueModeType mode) const override
long ContextMode
Definition contextmode.h:43
fMode
Definition fmode.h:42
@ TL
Total Lagrange.
Definition fmode.h:44
long StateCounterType
StateCounterType type used to indicate solution state.
#define _IFT_NonStationaryTransportProblem_Name

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011