OOFEM 3.0
Loading...
Searching...
No Matches
slavenode.C
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#include "slavenode.h"
36#include "slavedof.h"
37#include "floatarray.h"
38#include "intarray.h"
40#include "classfactory.h"
41#include "domain.h"
42#include "paramkey.h"
43#include "parametermanager.h"
44
45namespace oofem {
47
50
51void SlaveNode :: initializeFrom(InputRecord &ir, int priority)
52{
53 ParameterManager &ppm = this->giveDomain()->dofmanPPM;
54
55 Node :: initializeFrom(ir, priority);
56
59}
60
61
62void SlaveNode :: postInitialize()
63{
64 ParameterManager &ppm = this->giveDomain()->dofmanPPM;
65
66 Node :: postInitialize();
68
69 if ( masterWeights.giveSize() == 0 ) {
70 masterWeights.resize( masterDofManagers.giveSize() );
71 masterWeights.add( 1 / ( double ) masterDofManagers.giveSize() );
72 } else if ( masterDofManagers.giveSize() != masterWeights.giveSize() ) {
73 throw ComponentInputException(IPK_SlaveNode_weights.getName(), ComponentInputException::ComponentType::ctDofManager, this->number, "master dof managers and weights size mismatch.");
74 }
75
76 // initialize slave dofs (inside check of consistency of receiver and master dof)
77 for ( Dof *dof: *this ) {
78 SlaveDof *sdof = dynamic_cast< SlaveDof * >(dof);
79 if ( sdof ) {
81 }
82 }
83 // clean up
84 this->masterWeights.clear();
85}
86
87
88void SlaveNode :: updateLocalNumbering(EntityRenumberingFunctor &f)
89{
90 for ( int i = 1; i <= masterDofManagers.giveSize(); ++i ) {
92 }
93
94 DofManager :: updateLocalNumbering(f);
95}
96} // end namespace oofem
#define REGISTER_DofManager(class)
Domain * giveDomain() const
Definition femcmpnn.h:97
int number
Component number.
Definition femcmpnn.h:77
void initialize(const IntArray &masterNodes, const IntArray &mstrDofID, const FloatArray &mstrContribution)
Definition slavedof.C:52
FloatArray masterWeights
Common dof weights for each master node.
Definition slavenode.h:63
static ParamKey IPK_SlaveNode_masterDofManagers
Definition slavenode.h:65
static ParamKey IPK_SlaveNode_weights
Definition slavenode.h:66
IntArray masterDofManagers
Master nodes for all dofs.
Definition slavenode.h:61
#define PM_ELEMENT_ERROR_IFNOTSET(_pm, _componentnum, _paramkey)
#define PM_UPDATE_PARAMETER(_val, _pm, _ir, _componentnum, _paramkey, _prio)

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