OOFEM 3.0
Loading...
Searching...
No Matches
line2boundaryelement.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
36#include "node.h"
37#include "dof.h"
38#include "fei2dlinequad.h"
40#include "crosssection.h"
41#include "classfactory.h"
42
43namespace oofem {
45
46FEI2dLineQuad Line2BoundaryElement :: fei(1, 2);
47
48Line2BoundaryElement :: Line2BoundaryElement(int n, Domain *aDomain) : FMElement(n, aDomain), SpatialLocalizerInterface(this)
49{
50 this->numberOfDofMans = 3;
51 integrationRulesArray.resize( 0 );
52}
53
54FEInterpolation *Line2BoundaryElement :: giveInterpolation() const
55{
56 return & this->fei;
57}
58
59void Line2BoundaryElement :: giveDofManDofIDMask(int i, IntArray &nodeDofIDMask) const
60{
61 nodeDofIDMask = {V_u, V_v};
62}
63
64Interface *Line2BoundaryElement :: giveInterface(InterfaceType it)
65{
66 switch ( it ) {
68 return static_cast< SpatialLocalizerInterface * >(this);
69
70 default:
71 return FMElement :: giveInterface(it);
72 }
73}
74
75void Line2BoundaryElement :: computeField(ValueModeType mode, TimeStep *tStep, const FloatArray &lcoords, FloatArray &answer)
76{
77 FloatArray n, unknowns;
78 this->fei.evalN( answer, lcoords, FEIElementGeometryWrapper(this) );
79
80 IntArray dofIDs;
81 this->giveElementDofIDMask(dofIDs);
82 this->computeVectorOf(dofIDs, mode, tStep, unknowns);
83
84 answer.resize( dofIDs.giveSize() );
85 answer.zero();
86 for ( int i = 0; i < n.giveSize(); ++i ) {
87 for ( int j = 0; j < dofIDs.giveSize(); ++j ) {
88 answer(j) += n(i) * unknowns(i*dofIDs.giveSize() + j);
89 }
90 }
91}
92} // end namespace oofem
#define REGISTER_Element(class)
virtual void giveElementDofIDMask(IntArray &answer) const
Definition element.h:510
int numberOfDofMans
Number of dofmanagers.
Definition element.h:136
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Definition element.C:103
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
Definition element.h:157
FMElement(int n, Domain *aDomain)
Definition fmelement.C:38
void resize(Index s)
Definition floatarray.C:94
Index giveSize() const
Returns the size of receiver.
Definition floatarray.h:261
void zero()
Zeroes all coefficients of receiver.
Definition floatarray.C:683
int giveSize() const
Definition intarray.h:211
SpatialLocalizerInterface(Element *element)
@ SpatialLocalizerInterfaceType

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