OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
nlineardynamic.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 nlineardynamic_h
36 #define nlineardynamic_h
37 
38 #include "../sm/EngineeringModels/structengngmodel.h"
39 #include "sparsemtrxtype.h"
40 #include "sparselinsystemnm.h"
41 #include "sparsenonlinsystemnm.h"
42 #include "timediscretizationtype.h"
43 
45 
46 #define _IFT_NonLinearDynamic_Name "nonlineardynamic"
47 #define _IFT_NonLinearDynamic_deltat "deltat"
48 #define _IFT_NonLinearDynamic_refloadmode "refloadmode"
49 #define _IFT_NonLinearDynamic_nonlocstiff "nonlocstiff"
50 #define _IFT_NonLinearDynamic_nonlocalext "nonlocalext"
51 #define _IFT_NonLinearDynamic_ddtScheme "ddtscheme"
52 #define _IFT_NonLinearDynamic_gamma "gamma"
53 #define _IFT_NonLinearDynamic_beta "beta"
54 #define _IFT_NonLinearDynamic_eta "eta"
55 #define _IFT_NonLinearDynamic_delta "delta"
56 
57 
58 namespace oofem {
59 
86 {
87 protected:
88  std :: unique_ptr< SparseMtrx > effectiveStiffnessMatrix, massMatrix;
89 
92 
93  int initFlag;
95  double gamma, beta;
96  double eta, delta;
97  double a0, a1, a2, a3, a4, a5, a6, a7;
98 
105 
110  std :: unique_ptr< SparseNonLinearSystemNM > nMethod;
112  double deltaT;
113 
114 public:
115  NonLinearDynamic(int i, EngngModel * _master = NULL);
116  virtual ~NonLinearDynamic();
117 
118  virtual void solveYourself();
119  virtual void solveYourselfAt(TimeStep *tStep);
120 
121  virtual void printOutputAt(FILE *file, TimeStep *tStep);
122  virtual void printDofOutputAt(FILE *stream, Dof *iDof, TimeStep *tStep);
123 
124  virtual void updateYourself(TimeStep *tStep);
125  virtual void updateComponent(TimeStep *tStep, NumericalCmpn, Domain *d);
126  virtual void updateAttributes(MetaStep *mStep);
127  virtual void initializeYourself(TimeStep *tStep);
128 
129  virtual double giveUnknownComponent(ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof);
130 
132  virtual TimeStep *giveNextStep();
134 
135  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode);
137 
138  virtual void updateDomainLinks();
139 
140  // Identification
141  virtual const char *giveInputRecordName() const { return _IFT_NonLinearDynamic_Name; }
142  virtual const char *giveClassName() const { return "NonLinearDynamic"; }
144  virtual int useNonlocalStiffnessOption() { return this->nonlocalStiffnessFlag; }
145  virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep) { return ( int ) mode; }
146  void timesMtrx(FloatArray &answer, FloatArray &vec, CharType type, Domain *domain, TimeStep *tStep);
147 
149 
150 #ifdef __OOFEG
151  virtual void showSparseMtrxStructure(int type, oofegGraphicContext &gc, TimeStep *tStep);
152 #endif
153 
154  virtual int estimateMaxPackSize(IntArray &commMap, DataStream &buff, int packUnpackType);
155 #ifdef __PARALLEL_MODE
156  virtual LoadBalancer *giveLoadBalancer();
158 #endif
159 
160 protected:
161  void assemble(SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma,
162  const UnknownNumberingScheme &, Domain *domain);
163 
164  void proceedStep(int di, TimeStep *tStep);
165  void determineConstants(TimeStep *tStep);
166 
167  virtual void packMigratingData(TimeStep *tStep);
168  virtual void unpackMigratingData(TimeStep *tStep);
169 };
170 } // end namespace oofem
171 #endif // nlineardynamic_h
virtual void initializeYourself(TimeStep *tStep)
Provides the opportunity to initialize state variables stored in element integration points according...
LinSystSolverType
The values of this type should be related not to specific solvers, but more to specific packages that...
NonLinearDynamic(int i, EngngModel *_master=NULL)
Class and object Domain.
Definition: domain.h:115
virtual const char * giveClassName() const
Returns class name of the receiver.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
enum fMode nonLinFormulation
Type of non linear formulation (total or updated formulation).
Definition: engngm.h:271
Class representing meta step.
Definition: metastep.h:62
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 class implements nonlinear dynamic engineering problem.
This base class is an abstraction for numerical algorithm.
Definition: nummet.h:80
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
SparseMtrxType sparseMtrxType
FloatArray previousAccelerationVector
FloatArray previousIncrementOfDisplacement
Class implementing an array of integers.
Definition: intarray.h:61
std::unique_ptr< SparseMtrx > massMatrix
virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep)
This method is responsible for computing unique dictionary id (ie hash value) from given valueModeTyp...
virtual void updateComponent(TimeStep *tStep, NumericalCmpn, Domain *d)
Updates components mapped to numerical method if necessary during solution process.
virtual int estimateMaxPackSize(IntArray &commMap, DataStream &buff, int packUnpackType)
Determines the space necessary for send/receive buffer.
virtual void updateAttributes(MetaStep *mStep)
Update receiver attributes according to step metaStep attributes.
std::unique_ptr< SparseMtrx > effectiveStiffnessMatrix
#define _IFT_NonLinearDynamic_Name
TimeDiscretizationType
Time discretization used by transient solvers.
virtual const char * giveInputRecordName() const
NumericalCmpn
Type representing numerical component.
Definition: numericalcmpn.h:46
Callback class for assembling specific types of matrices.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
virtual int useNonlocalStiffnessOption()
Returns nonzero if nonlocal stiffness option activated.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
LinSystSolverType solverType
FloatArray incrementOfDisplacement
void timesMtrx(FloatArray &answer, FloatArray &vec, CharType type, Domain *domain, TimeStep *tStep)
Abstract base class representing general load balancer.
Definition: loadbalancer.h:108
virtual LoadBalancer * giveLoadBalancer()
Returns reference to receiver&#39;s load balancer.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to output domain stream, for given time step.
virtual void packMigratingData(TimeStep *tStep)
Packs receiver data when rebalancing load.
Class representing vector of real numbers.
Definition: floatarray.h:82
TimeDiscretizationType initialTimeDiscretization
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
std::unique_ptr< SparseNonLinearSystemNM > nMethod
Numerical method used to solve the problem.
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual void unpackMigratingData(TimeStep *tStep)
Unpacks receiver data when rebalancing load.
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
virtual void showSparseMtrxStructure(int type, oofegGraphicContext &gc, TimeStep *tStep)
Shows the sparse structure of required matrix, type == 1 stiffness.
CharType
Definition: chartype.h:87
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver&#39;s numerical method.
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
FloatArray previousVelocityVector
void assemble(SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &, Domain *domain)
Assembles characteristic matrix of required type into given sparse matrix.
TimeDiscretizationType giveInitialTimeDiscretization()
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
void proceedStep(int di, TimeStep *tStep)
FloatArray previousTotalDisplacement
This class implements extension of EngngModel for structural models.
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 contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
FloatArray previousInternalForces
void determineConstants(TimeStep *tStep)
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
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 deltaT
Intrinsic time increment.
virtual double giveUnknownComponent(ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
virtual fMode giveFormulation()
Indicates type of non linear computation (total or updated formulation).
Class representing solution step.
Definition: timestep.h:80
virtual LoadBalancerMonitor * giveLoadBalancerMonitor()
Returns reference to receiver&#39;s load balancer monitor.
Abstract base class representing general load balancer monitor.
Definition: loadbalancer.h:68
virtual void printDofOutputAt(FILE *stream, Dof *iDof, TimeStep *tStep)
DOF printing routine.
virtual void solveYourself()
Starts solution process.

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