OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
assemblercallback.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 assemblercallback_h
36 #define assemblercallback_h
37 
38 #include "valuemodetype.h"
39 #include "matresponsemode.h"
40 #include "chartype.h"
41 
42 namespace oofem {
43 class IntArray;
44 class FloatArray;
45 class FloatMatrix;
46 class Element;
47 class DofManager;
48 class TimeStep;
49 class NodalLoad;
50 class BodyLoad;
51 class BoundaryLoad;
52 class SurfaceLoad;
53 class EdgeLoad;
54 class UnknownNumberingScheme;
55 class SparseMtrx;
56 class ActiveBoundaryCondition;
57 
64 {
65 public:
66  virtual void vectorFromElement(FloatArray &vec, Element &element, TimeStep *tStep, ValueModeType mode) const;
67  virtual void vectorFromLoad(FloatArray &vec, Element &element, BodyLoad *load, TimeStep *tStep, ValueModeType mode) const;
68  virtual void vectorFromSurfaceLoad(FloatArray &vec, Element &element, SurfaceLoad *load, int boundary, TimeStep *tStep, ValueModeType mode) const;
69  virtual void vectorFromEdgeLoad(FloatArray &vec, Element &element, EdgeLoad *load, int edge, TimeStep *tStep, ValueModeType mode) const;
70  virtual void vectorFromNodeLoad(FloatArray &vec, DofManager &dman, NodalLoad *load, TimeStep *tStep, ValueModeType mode) const;
71  virtual void assembleFromActiveBC(FloatArray &answer, ActiveBoundaryCondition &bc, TimeStep* tStep, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorms) const;
72 
74  virtual void locationFromElement(IntArray &loc, Element &element, const UnknownNumberingScheme &s, IntArray *dofIds = nullptr) const;
76  virtual void locationFromElementNodes(IntArray &loc, Element &element, const IntArray &bNodes, const UnknownNumberingScheme &s, IntArray *dofIds = nullptr) const;
77 };
78 
84 {
85 public:
86  virtual void matrixFromElement(FloatMatrix &mat, Element &element, TimeStep *tStep) const;
87  virtual void matrixFromLoad(FloatMatrix &mat, Element &element, BodyLoad *load, TimeStep *tStep) const;
88  virtual void matrixFromSurfaceLoad(FloatMatrix &mat, Element &element, SurfaceLoad *load, int boundary, TimeStep *tStep) const;
89  virtual void matrixFromEdgeLoad(FloatMatrix &mat, Element &element, EdgeLoad *load, int edge, TimeStep *tStep) const;
90  virtual void assembleFromActiveBC(SparseMtrx &k, ActiveBoundaryCondition &bc, TimeStep* tStep, const UnknownNumberingScheme &s_r, const UnknownNumberingScheme &s_c) const;
91 
92  virtual void locationFromElement(IntArray &loc, Element &element, const UnknownNumberingScheme &s, IntArray *dofIds = nullptr) const;
93  virtual void locationFromElementNodes(IntArray &loc, Element &element, const IntArray &bNodes, const UnknownNumberingScheme &s, IntArray *dofIds = nullptr) const;
94 };
95 
96 
102 {
103 public:
104  virtual void vectorFromElement(FloatArray &vec, Element &element, TimeStep *tStep, ValueModeType mode) const;
105  virtual void vectorFromLoad(FloatArray &vec, Element &element, BodyLoad *load, TimeStep *tStep, ValueModeType mode) const;
106  virtual void vectorFromSurfaceLoad(FloatArray &vec, Element &element, SurfaceLoad *load, int boundary, TimeStep *tStep, ValueModeType mode) const;
107  virtual void vectorFromEdgeLoad(FloatArray &vec, Element &element, EdgeLoad *load, int edge, TimeStep *tStep, ValueModeType mode) const;
108  virtual void assembleFromActiveBC(FloatArray &answer, ActiveBoundaryCondition &bc, TimeStep* tStep, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorms) const;
109 };
110 
116 {
117 public:
118  virtual void vectorFromElement(FloatArray &vec, Element &element, TimeStep *tStep, ValueModeType mode) const;
119  virtual void vectorFromLoad(FloatArray &vec, Element &element, BodyLoad *load, TimeStep *tStep, ValueModeType mode) const;
120  virtual void vectorFromSurfaceLoad(FloatArray &vec, Element &element, SurfaceLoad *load, int boundary, TimeStep *tStep, ValueModeType mode) const;
121  virtual void vectorFromEdgeLoad(FloatArray &vec, Element &element, EdgeLoad *load, int edge, TimeStep *tStep, ValueModeType mode) const;
122  virtual void vectorFromNodeLoad(FloatArray &vec, DofManager &dman, NodalLoad *load, TimeStep *tStep, ValueModeType mode) const;
123  virtual void assembleFromActiveBC(FloatArray &answer, ActiveBoundaryCondition &bc, TimeStep* tStep, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorms) const;
124 };
125 
131 {
132 public:
133  virtual void vectorFromLoad(FloatArray &vec, Element &element, BodyLoad *load, TimeStep *tStep, ValueModeType mode) const;
134  virtual void vectorFromSurfaceLoad(FloatArray &vec, Element &element, SurfaceLoad *load, int boundary, TimeStep *tStep, ValueModeType mode) const;
135  virtual void vectorFromEdgeLoad(FloatArray &vec, Element &element, EdgeLoad *load, int edge, TimeStep *tStep, ValueModeType mode) const;
136  virtual void vectorFromNodeLoad(FloatArray &vec, DofManager &dman, NodalLoad *load, TimeStep *tStep, ValueModeType mode) const;
137 };
138 
144 {
145 public:
146  virtual void vectorFromElement(FloatArray &vec, Element &element, TimeStep *tStep, ValueModeType mode) const;
147 };
148 
154 {
155 public:
156  virtual void vectorFromElement(FloatArray &vec, Element &element, TimeStep *tStep, ValueModeType mode) const;
157 };
158 
159 
166 {
167 protected:
169  const FloatArray &vec;
170 
171 public:
172  MatrixProductAssembler(MatrixAssembler m, const FloatArray &vec): VectorAssembler(), mAssem(m), vec(vec) {}
173 
174  virtual void vectorFromElement(FloatArray &vec, Element &element, TimeStep *tStep, ValueModeType mode) const;
175  virtual void vectorFromLoad(FloatArray &vec, Element &element, BodyLoad *load, TimeStep *tStep, ValueModeType mode) const;
176  virtual void vectorFromSurfaceLoad(FloatArray &vec, Element &element, SurfaceLoad *load, int boundary, TimeStep *tStep, ValueModeType mode) const;
177  virtual void vectorFromEdgeLoad(FloatArray &vec, Element &element, EdgeLoad *load, int edge, TimeStep *tStep, ValueModeType mode) const;
178 };
179 
180 
186 {
187 protected:
190 
191 public:
192  TangentAssembler(MatResponseMode m = TangentStiffness): MatrixAssembler(), rmode(m) {}
193 
194  virtual void matrixFromElement(FloatMatrix &mat, Element &element, TimeStep *tStep) const;
195  virtual void matrixFromLoad(FloatMatrix &mat, Element &element, BodyLoad *load, TimeStep *tStep) const;
196  virtual void matrixFromSurfaceLoad(FloatMatrix &mat, Element &element, SurfaceLoad *load, int boundary, TimeStep *tStep) const;
197  virtual void matrixFromEdgeLoad(FloatMatrix &mat, Element &element, EdgeLoad *load, int edge, TimeStep *tStep) const;
198  virtual void assembleFromActiveBC(SparseMtrx &k, ActiveBoundaryCondition &bc, TimeStep* tStep, const UnknownNumberingScheme &s_r, const UnknownNumberingScheme &s_c) const;
199 };
200 
201 
207 {
208 public:
209  virtual void matrixFromElement(FloatMatrix &mat, Element &element, TimeStep *tStep) const;
210 };
211 
212 
218 {
219 protected:
221  double lumped;
222  double k, m;
223 
224 public:
225  EffectiveTangentAssembler(MatResponseMode mode, bool lumped, double k, double m);
226  virtual void matrixFromElement(FloatMatrix &mat, Element &element, TimeStep *tStep) const;
227  virtual void matrixFromLoad(FloatMatrix &mat, Element &element, BodyLoad *load, TimeStep *tStep) const;
228  virtual void matrixFromSurfaceLoad(FloatMatrix &mat, Element &element, SurfaceLoad *load, int boundary, TimeStep *tStep) const;
229  virtual void matrixFromEdgeLoad(FloatMatrix &mat, Element &element, EdgeLoad *load, int edge, TimeStep *tStep) const;
230  virtual void assembleFromActiveBC(SparseMtrx &k, ActiveBoundaryCondition &bc, TimeStep* tStep, const UnknownNumberingScheme &s_r, const UnknownNumberingScheme &s_c) const;
231 };
232 
233 }
234 #endif // assemblercallback_h
TangentAssembler(MatResponseMode m=TangentStiffness)
Class implementing a concentrated load (force, moment,...) that acts directly on a dof manager (node ...
Definition: nodalload.h:67
virtual void vectorFromElement(FloatArray &vec, Element &element, TimeStep *tStep, ValueModeType mode) const
Implementation for assembling forces computed by multiplication with a matrix.
Implementation for assembling internal forces vectors in standard monolithic, nonlinear FE-problems...
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
Class implementing element body load, acting over whole element volume (e.g., the dead weight)...
Definition: bodyload.h:49
Implementation for assembling tangent matrices in standard monolithic FE-problems.
Abstract base class for all finite elements.
Definition: element.h:145
Base class for dof managers.
Definition: dofmanager.h:113
Implementation for assembling the consistent mass matrix.
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
virtual void assembleFromActiveBC(FloatArray &answer, ActiveBoundaryCondition &bc, TimeStep *tStep, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorms) const
Callback class for assembling specific types of vectors.
Callback class for assembling specific types of matrices.
virtual void vectorFromSurfaceLoad(FloatArray &vec, Element &element, SurfaceLoad *load, int boundary, TimeStep *tStep, ValueModeType mode) const
Implementation for assembling external forces vectors in standard monolithic FE-problems.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
Abstract base class representing an edge load (force, momentum, ...) that acts directly on a edge bou...
Definition: boundaryload.h:200
Abstract base class for all active boundary conditions.
Definition: activebc.h:63
Implementation for assembling reference (external) forces vectors.
virtual void vectorFromNodeLoad(FloatArray &vec, DofManager &dman, NodalLoad *load, TimeStep *tStep, ValueModeType mode) const
virtual void locationFromElement(IntArray &loc, Element &element, const UnknownNumberingScheme &s, IntArray *dofIds=nullptr) const
Default implementation takes all the DOF IDs.
Class representing vector of real numbers.
Definition: floatarray.h:82
Abstract base class representing a surface load (force, momentum, ...) that acts directly on a surfac...
Definition: boundaryload.h:218
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
Implementation for assembling lumped mass matrix (diagonal components) in vector form.
virtual void vectorFromLoad(FloatArray &vec, Element &element, BodyLoad *load, TimeStep *tStep, ValueModeType mode) const
virtual void vectorFromEdgeLoad(FloatArray &vec, Element &element, EdgeLoad *load, int edge, TimeStep *tStep, ValueModeType mode) const
Implementation for assembling the intertia forces vector (i.e.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Callback class for assembling effective tangents composed of stiffness and mass matrix.
MatrixProductAssembler(MatrixAssembler m, const FloatArray &vec)
Class representing solution step.
Definition: timestep.h:80
virtual void locationFromElementNodes(IntArray &loc, Element &element, const IntArray &bNodes, const UnknownNumberingScheme &s, IntArray *dofIds=nullptr) const
Default implementation takes all the DOF IDs.

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