OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
solutionbasedshapefunction.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 SOLUTIONBASEDSHAPEFUNCTION_H_
36 #define SOLUTIONBASEDSHAPEFUNCTION_H_
37 
38 #include "activebc.h"
39 #include "dofiditem.h"
40 #include "floatarray.h"
41 
42 #define _IFT_SolutionbasedShapeFunction_Name "solutionbasedshapefunction"
43 #define _IFT_SolutionbasedShapeFunction_ShapeFunctionFile "shapefunctionfile"
44 #define _IFT_SolutionbasedShapeFunction_Externalset "externalset"
45 #define _IFT_SolutionbasedShapeFunction_UseCorrectionFactors "usecorrectionfactors"
46 #define _IFT_SolutionbasedShapeFunction_DumpSnapshots "dumpsnapshots"
47 
48 namespace oofem {
49 class EngngModel;
50 class Element;
51 class Node;
52 
54  bool isPlus;
55  bool isMinus;
57  bool isFree;
60  double value;
61 };
62 
63 struct modeStruct {
64  double am, ap;
66  std :: vector< SurfaceDataStruct * >SurfaceData;
67 };
68 
70 {
71 private:
75  int order;
76  double TOL;
77  std :: string filename;
79  bool isLoaded;
80 
83 
84  double bigNorm;
86 
87  bool isCoeff(ActiveDof *dof);
88 
89  std :: vector< modeStruct * >modes;
90 
91  void updateModelWithFactors(modeStruct *m);
93 
94  FloatArray maxCoord, minCoord;
95 
96  void setBoundaryConditionOnDof(Dof *d, double value);
97 
98  void setLoads(EngngModel *myEngngModel, int d);
99  void loadProblem();
100  void init();
101 
102  void computeCorrectionFactors(modeStruct &myMode, IntArray *Dofs, double *am, double *ap);
103 
111  void giveValueAtPoint(FloatArray &answer, const FloatArray &coords, IntArray &dofID, EngngModel &myEngngModel);
112 
113  void giveCorrectedValueAtPoint(FloatArray &answer, const FloatArray &coords, IntArray &dofID, EngngModel &myEngngModel);
114 
115  void splitBoundaryNodeIDs(modeStruct &mode, Element &e, IntArray &boundary, IntArray &pList, IntArray &mList, IntArray &zList, FloatMatrix &nodeValues);
116 
117  void computeBaseFunctionValueAt(FloatArray &answer, FloatArray &coords, IntArray &dofIDs, EngngModel &myEngngModel);
118 
119  void initializeSurfaceData(modeStruct *mode);
120 
121  void copyDofManagersToSurfaceData(modeStruct *mode, IntArray nodeList, bool isPlus, bool isMinus, bool isZero);
122 
123  void whichBoundary(FloatArray &coord, bool &isPlus, bool &isMinus, bool &isZero);
124 
125 public:
127  virtual ~SolutionbasedShapeFunction();
128 
129  virtual IRResultType initializeFrom(InputRecord *ir);
130 
131  virtual bool requiresActiveDofs() { return true; }
132  virtual int giveNumberOfInternalDofManagers() { return 1; }
133  virtual DofManager *giveInternalDofManager(int i);
134 
135  virtual double giveUnknown(PrimaryField &field, ValueModeType mode, TimeStep *tStep, ActiveDof *dof);
136  virtual double giveUnknown(ValueModeType mode, TimeStep *tStep, ActiveDof *dof);
137 
138  virtual bool hasBc(Dof *dof, TimeStep *tStep) { return false; }
139 
140  virtual bool isPrimaryDof(ActiveDof *dof) { return false; }
141 
142  virtual void computeDofTransformation(ActiveDof *dof, FloatArray &masterContribs);
143 
144  virtual int giveNumberOfMasterDofs(ActiveDof *dof);
145  virtual Dof *giveMasterDof(ActiveDof *dof, int mdof);
146 
147  virtual const char *giveClassName() const { return "SolutionbasedShapeFunction"; }
148  virtual const char *giveInputRecordName() const { return _IFT_SolutionbasedShapeFunction_Name; }
149 
150  double checkIncompressibility(EngngModel &myEngngModel);
151 };
152 }
153 
154 #endif /* SOLUTIONBASEDSHAPEFUNCTION_H_ */
#define _IFT_SolutionbasedShapeFunction_Name
Class and object Domain.
Definition: domain.h:115
virtual const char * giveInputRecordName() const
Abstract class representing field of primary variables (those, which are unknown and are typically as...
Definition: primaryfield.h:104
virtual const char * giveClassName() const
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
Abstract base class for all finite elements.
Definition: element.h:145
Base class for dof managers.
Definition: dofmanager.h:113
Class implementing an array of integers.
Definition: intarray.h:61
virtual bool hasBc(Dof *dof, TimeStep *tStep)
Returns the prescribed value of a dof (if any).
DofIDItem
Type representing particular dof type.
Definition: dofiditem.h:86
virtual int giveNumberOfInternalDofManagers()
Gives the number of internal dof managers.
Abstract base class for all active boundary conditions.
Definition: activebc.h:63
Class representing "slave" degree of freedom with an active boundary condition.
Definition: activedof.h:48
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual bool isPrimaryDof(ActiveDof *dof)
Checks to see if the dof is a primary DOF.
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual bool requiresActiveDofs()
Checks to see if active boundary condition requires special DOFs.
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class implementing node in finite element mesh.
Definition: node.h:87
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
std::vector< SurfaceDataStruct * > SurfaceData
Class representing solution step.
Definition: timestep.h:80

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