OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
linearconstraintbc.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 linearconstraintbc_h
36 #define linearconstraintbc_h
37 
38 #include "activebc.h"
39 #include "floatarray.h"
40 #include "intarray.h"
41 #include "chartype.h"
42 #include "valuemodetype.h"
43 #include "dofmanager.h"
44 #include "error.h"
45 
46 #include <memory>
47 
48 #define _IFT_LinearConstraintBC_Name "linearconstraintbc"
49 
51 
52 #define _IFT_LinearConstraintBC_weights "weights"
53 #define _IFT_LinearConstraintBC_weightsfuncs "weightsltf"
54 #define _IFT_LinearConstraintBC_rhs "rhs"
55 #define _IFT_LinearConstraintBC_rhsfuncs "rhsltf"
56 #define _IFT_LinearConstraintBC_dofmans "dofmans"
57 #define _IFT_LinearConstraintBC_dofs "dofs"
58 #define _IFT_LinearConstraintBC_lhstype "lhstype"
59 #define _IFT_LinearConstraintBC_rhstype "rhstype"
60 
62 
63 namespace oofem {
74 class OOFEM_EXPORT LinearConstraintBC : public ActiveBoundaryCondition
75 {
76 protected:
79  double rhs;
80  int rhsTf;
83  std :: unique_ptr< DofManager > md;
84 
85 
86  // characteristicType of LHS and RHS contributions (this makes this bc trully general, as one can customize, to which
87  // characteristic component the contibution will be assembled)
90 
91 public:
92  LinearConstraintBC(int n, Domain * d);
94  virtual ~LinearConstraintBC();
95 
96  IRResultType initializeFrom(InputRecord *ir);
97  virtual const char *giveInputRecordName() const { return _IFT_LinearConstraintBC_Name; }
98  virtual void assemble(SparseMtrx &answer, TimeStep *tStep,
99  CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale = 1.0);
100  virtual void assembleVector(FloatArray &answer, TimeStep *tStep,
101  CharType type, ValueModeType mode,
102  const UnknownNumberingScheme &s, FloatArray *eNorms = NULL);
103 
104  virtual void giveLocationArrays(std :: vector< IntArray > &rows, std :: vector< IntArray > &cols,
105  CharType type, const UnknownNumberingScheme &r_s,
106  const UnknownNumberingScheme &c_s);
107 
109  virtual int giveNumberOfInternalDofManagers() { return 1; }
111  virtual DofManager *giveInternalDofManager(int i) { return this->md.get(); }
112 
113  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
114  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
115 
116  virtual const char *giveClassName() const { return "LinearConstraintBC"; }
117 
118 protected:
119  void giveLocArray(const UnknownNumberingScheme &r_s, IntArray &locr, int &lambdaeq);
120 };
121 } //end of oofem namespace
122 #endif // LinearConstraintBC_h
Class and object Domain.
Definition: domain.h:115
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
std::unique_ptr< DofManager > md
#define _IFT_LinearConstraintBC_Name
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
Base class for dof managers.
Definition: dofmanager.h:113
Class implementing an array of integers.
Definition: intarray.h:61
virtual int giveNumberOfInternalDofManagers()
Gives the number of internal dof managers.
virtual DofManager * giveInternalDofManager(int i)
Gives an internal dof manager from receiver.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
Abstract base class for all active boundary conditions.
Definition: activebc.h:63
Class representing vector of real numbers.
Definition: floatarray.h:82
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
CharType
Definition: chartype.h:87
Class representing the general Input Record.
Definition: inputrecord.h:101
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
virtual const char * giveClassName() const
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class implementing linear constraint on selected DOFs in the form , where is i-th degree of freedom ...
Class representing solution step.
Definition: timestep.h:80
virtual const char * giveInputRecordName() const

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