OOFEM 3.0
Loading...
Searching...
No Matches
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 - 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 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
48namespace oofem {
49class EngngModel;
50class Element;
51class Node;
52
62
63struct modeStruct {
64 double am, ap;
65 std::unique_ptr<EngngModel> myEngngModel;
66 std :: vector<SurfaceDataStruct> SurfaceData;
67
68 /* Visual c++ 2017 compatibility */
69#ifdef _MSC_VER
70 modeStruct() {}
71 modeStruct(std::unique_ptr<EngngModel>& model) : myEngngModel(std::move(model)) {}
72 modeStruct(modeStruct&& B) : myEngngModel(std::move(B.myEngngModel)) { am = B.am; ap = B.ap; SurfaceData = B.SurfaceData; }
73 modeStruct(modeStruct& B) : myEngngModel(std::move(B.myEngngModel)) { am = B.am; ap = B.ap; SurfaceData = B.SurfaceData; }
74
75 modeStruct& operator= (modeStruct& other) {
76 myEngngModel = std::move(other.myEngngModel);
77 am = other.am;
78 ap = other.ap;
79 SurfaceData = other.SurfaceData;
80 return *this;
81 }
82#endif /* end of Visual c++ 2017 compatibility */
83
84
85
86};
87
89{
90private:
94 int order;
95 double TOL;
96 std :: string filename;
99
102
103 double bigNorm;
105
106 bool isCoeff(ActiveDof *dof);
107
108 std :: vector< modeStruct >modes;
109
112
114
115 void setBoundaryConditionOnDof(Dof *d, double value);
116
117 void setLoads(EngngModel &myEngngModel, int d);
118 void loadProblem();
119 void init();
120
121 void computeCorrectionFactors(modeStruct &myMode, IntArray &Dofs, double &am, double &ap);
122
130 void giveValueAtPoint(FloatArray &answer, const FloatArray &coords, IntArray &dofID, EngngModel &myEngngModel);
131
132 void giveCorrectedValueAtPoint(FloatArray &answer, const FloatArray &coords, IntArray &dofID, EngngModel &myEngngModel);
133
134 void splitBoundaryNodeIDs(modeStruct &mode, Element &e, IntArray &boundary, IntArray &pList, IntArray &mList, IntArray &zList, FloatMatrix &nodeValues);
135
136 void computeBaseFunctionValueAt(FloatArray &answer, const FloatArray &coords, IntArray &dofIDs, EngngModel &myEngngModel);
137
139
140 void copyDofManagersToSurfaceData(modeStruct &mode, IntArray nodeList, bool isPlus, bool isMinus, bool isZero);
141
142 void whichBoundary(const FloatArray &coord, bool &isPlus, bool &isMinus, bool &isZero);
143
144public:
147
148 void initializeFrom(InputRecord &ir) override;
149
150 bool requiresActiveDofs() override { return true; }
151 int giveNumberOfInternalDofManagers() override { return 1; }
152 DofManager *giveInternalDofManager(int i) override;
153
154 double giveUnknown(PrimaryField &field, ValueModeType mode, TimeStep *tStep, ActiveDof *dof) override;
155 double giveUnknown(ValueModeType mode, TimeStep *tStep, ActiveDof *dof) override;
156
157 bool hasBc(Dof *dof, TimeStep *tStep) override { return false; }
158
159 bool isPrimaryDof(ActiveDof *dof) override { return false; }
160
161 void computeDofTransformation(ActiveDof *dof, FloatArray &masterContribs) override;
162
163 int giveNumberOfMasterDofs(ActiveDof *dof) override;
164 Dof *giveMasterDof(ActiveDof *dof, int mdof) override;
165
166 const char *giveClassName() const override { return "SolutionbasedShapeFunction"; }
167 const char *giveInputRecordName() const override { return _IFT_SolutionbasedShapeFunction_Name; }
168
169 double checkIncompressibility(EngngModel &myEngngModel);
170};
171}
172
173#endif /* SOLUTIONBASEDSHAPEFUNCTION_H_ */
ActiveBoundaryCondition(int n, Domain *d)
Definition activebc.h:71
void computeCorrectionFactors(modeStruct &myMode, IntArray &Dofs, double &am, double &ap)
bool isPrimaryDof(ActiveDof *dof) override
void giveValueAtPoint(FloatArray &answer, const FloatArray &coords, IntArray &dofID, EngngModel &myEngngModel)
giveValueAtPoint
SolutionbasedShapeFunction(int n, Domain *d)
void setLoads(EngngModel &myEngngModel, int d)
bool hasBc(Dof *dof, TimeStep *tStep) override
void computeBaseFunctionValueAt(FloatArray &answer, const FloatArray &coords, IntArray &dofIDs, EngngModel &myEngngModel)
double checkIncompressibility(EngngModel &myEngngModel)
const char * giveInputRecordName() const override
const char * giveClassName() const override
void copyDofManagersToSurfaceData(modeStruct &mode, IntArray nodeList, bool isPlus, bool isMinus, bool isZero)
int giveNumberOfInternalDofManagers() override
Gives the number of internal dof managers.
void splitBoundaryNodeIDs(modeStruct &mode, Element &e, IntArray &boundary, IntArray &pList, IntArray &mList, IntArray &zList, FloatMatrix &nodeValues)
void giveCorrectedValueAtPoint(FloatArray &answer, const FloatArray &coords, IntArray &dofID, EngngModel &myEngngModel)
void setBoundaryConditionOnDof(Dof *d, double value)
void whichBoundary(const FloatArray &coord, bool &isPlus, bool &isMinus, bool &isZero)
#define OOFEM_EXPORT
Definition oofemcfg.h:7
#define _IFT_SolutionbasedShapeFunction_Name
std::unique_ptr< EngngModel > myEngngModel
std ::vector< SurfaceDataStruct > SurfaceData

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