OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
cdefnode2node.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 - 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 #include "Contact/cdefnode2node.h"
36 #include "Contact/celnode2node.h"
37 #include "domain.h"
38 #include "classfactory.h"
39 
40 namespace oofem {
43 
44 
46 
47 
50 {
51 
52  IRResultType result; // Required by IR_GIVE_FIELD macro
53 
54  IntArray masterNodes;
55  IntArray slaveNodes;
58  //this->epsN = 1.0e6;
59  //IR_GIVE_OPTIONAL_FIELD(ir, this->epsN, _IFT_ContactDefinitionNode2Node_PenaltyN);
60 
61  Domain *domain = this->giveContactManager()->giveDomain();
62  for( int i = 1; i<= masterNodes.giveSize(); i++ ) {
63  ContactElement *master = new Node2NodeContact( domain->giveDofManager(masterNodes.at(i)),
64  domain->giveDofManager(slaveNodes.at(i)));
65 
66  this->addContactElement(master);
67  }
68 
69  return IRRT_OK;
70 }
71 
72 
73 
74 
75 // Same version but with Lagrange multipliers
77 {
79 }
80 
81 
84 {
85  IRResultType result; // Required by IR_GIVE_FIELD macro
86 
87  IntArray masterNodes;
88  IntArray slaveNodes;
91 
92  Domain *domain = this->giveContactManager()->giveDomain();
93  for( int i = 1; i<= masterNodes.giveSize(); i++ ) {
94  ContactElement *master = new Node2NodeContactL( domain->giveDofManager(masterNodes.at(i)),
95  domain->giveDofManager(slaveNodes.at(i)) );
96 
97  this->addContactElement(master);
98  }
99 
100 
101 
102  return IRRT_OK;
103 }
104 
105 
106 
107 
108 
109 }
ContactManager * giveContactManager()
Class and object Domain.
Definition: domain.h:115
This class manages a none to node contact definition with enforcement using Lagrange multipliers...
Definition: cdefnode2node.h:95
virtual IRResultType initializeFrom(InputRecord *ir)
Definition: cdefnode2node.C:49
void addContactElement(ContactElement *cEl)
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
#define _IFT_ContactDefinitionNode2Node_SlaveNodes
Definition: cdefnode2node.h:45
virtual IRResultType initializeFrom(InputRecord *ir)
Definition: cdefnode2node.C:83
REGISTER_ContactDefinition(ContactDefinition)
#define _IFT_ContactDefinitionNode2Node_MasterNodes
Definition: cdefnode2node.h:44
This class manages all the contacts in a domain.
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Class representing the general Input Record.
Definition: inputrecord.h:101
This class manages a particular contact definition.
This class manages a particular contact definition.
Definition: cdefnode2node.h:66
int giveSize() const
Definition: intarray.h:203
the oofem namespace is to define a context or scope in which all oofem names are defined.
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
DofManager * giveDofManager(int n)
Service for accessing particular domain dof manager.
Definition: domain.C:314
virtual void setNumberOfConstraintEqToAdd(const int number)
ContactDefinitionNode2NodeL(ContactManager *cMan)
Constructor.
Definition: cdefnode2node.C:76

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