OOFEM 3.0
Loading...
Searching...
No Matches
prescribedmean.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#ifndef PRESCRIBEDMEAN_H
35#define PRESCRIBEDMEAN_H
36
37#include <cstdio>
38#include <cstdlib>
39#include <algorithm>
40#include <memory>
41
42#include "activebc.h"
43#include "node.h"
44#include "boundaryload.h"
45
46namespace oofem
47{
48
50
51#define _IFT_PrescribedMean_Name "prescribedmean"
52#define _IFT_PrescribedMean_DofID "dofid"
53#define _IFT_PrescribedMean_Mean "mean"
54#define _IFT_PrescribedMean_Edge "edge"
55
57
59{
60private:
61 std::unique_ptr<Node> lambdaDman;
62
63 double c;
64
65 static double domainSize;
66
67 int dofid;
68
69 void computeDomainSize();
70
72
76
77public:
78 PrescribedMean(int n, Domain * d) : ActiveBoundaryCondition(n, d), lambdaDman(std::make_unique<Node>(0, this->domain) ) {}
79 virtual ~PrescribedMean() {}
80
81 void initializeFrom(InputRecord &ir) override;
82
83 void assemble(SparseMtrx &answer, TimeStep *tStep, CharType type,
84 const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale = 1.0, void* lock=nullptr) override;
85
86 void assembleVector(FloatArray &answer, TimeStep *tStep,
87 CharType type, ValueModeType mode,
88 const UnknownNumberingScheme &s, FloatArray *eNorm=nullptr, void* lock=nullptr) override;
89
90 void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep,
91 CharType type, ValueModeType mode,
92 const UnknownNumberingScheme &s, FloatArray *eNorm=nullptr,
93 void* lock=nullptr);
94
95 void giveExternalForcesVector(FloatArray &answer, TimeStep *tStep,
96 CharType type, ValueModeType mode,
98 void* lock=nullptr);
99
100 int giveNumberOfInternalDofManagers() override { return 1; }
101
102 DofManager *giveInternalDofManager(int i) override { return lambdaDman.get(); }
103
104 const char *giveClassName() const override { return "PrescribedMean"; }
105 const char *giveInputRecordName() const override { return _IFT_PrescribedMean_Name; }
106};
107
108}
109
110#endif // PRESCRIBEDMEAN_H
ActiveBoundaryCondition(int n, Domain *d)
Definition activebc.h:71
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition femcmpnn.h:79
static double domainSize
const char * giveClassName() const override
const char * giveInputRecordName() const override
std::unique_ptr< Node > lambdaDman
PrescribedMean(int n, Domain *d)
int giveNumberOfInternalDofManagers() override
Gives the number of internal dof managers.
DofManager * giveInternalDofManager(int i) override
Gives an internal dof manager from receiver.
FloatArrayF< N > assemble(const FloatArrayF< M > &x, int const (&c)[M])
Assemble components into zero matrix.
#define OOFEM_EXPORT
Definition oofemcfg.h:7
#define _IFT_PrescribedMean_Name

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