OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
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 - 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 "line2boundaryelement.h"
36 #include "node.h"
37 #include "dof.h"
38 #include "fei2dlinequad.h"
39 #include "gaussintegrationrule.h"
40 #include "crosssection.h"
41 #include "classfactory.h"
42 
43 namespace oofem {
44 REGISTER_Element(Line2BoundaryElement);
45 
46 FEI2dLineQuad Line2BoundaryElement :: fei(1, 2);
47 
49 {
50  this->numberOfDofMans = 3;
51  integrationRulesArray.resize( 0 );
52 }
53 
55 { }
56 
58 {
59  return & this->fei;
60 }
61 
62 void Line2BoundaryElement :: giveDofManDofIDMask(int i, IntArray &nodeDofIDMask) const
63 {
64  nodeDofIDMask = {V_u, V_v};
65 }
66 
68 {
69  switch ( it ) {
71  return static_cast< SpatialLocalizerInterface * >(this);
72 
73  default:
74  return FMElement :: giveInterface(it);
75  }
76 }
77 
79 {
80  FloatArray n, unknowns;
81  this->fei.evalN( answer, lcoords, FEIElementGeometryWrapper(this) );
82 
83  IntArray dofIDs;
84  this->giveElementDofIDMask(dofIDs);
85  this->computeVectorOf(dofIDs, mode, tStep, unknowns);
86 
87  answer.resize( dofIDs.giveSize() );
88  answer.zero();
89  for ( int i = 0; i < n.giveSize(); ++i ) {
90  for ( int j = 0; j < dofIDs.giveSize(); ++j ) {
91  answer(j) += n(i) * unknowns(i*dofIDs.giveSize() + j);
92  }
93  }
94 }
95 } // end namespace oofem
Class and object Domain.
Definition: domain.h:115
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
Definition: element.C:86
virtual ~Line2BoundaryElement()
Destructor.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
Class implementing an array of integers.
Definition: intarray.h:61
virtual void computeField(ValueModeType mode, TimeStep *tStep, const FloatArray &lcoords, FloatArray &answer)
Computes the unknown vector interpolated at the specified local coordinates.
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
Line2BoundaryElement(int n, Domain *d)
Constructor.
REGISTER_Element(LSpace)
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
Definition: fei2dlinequad.C:42
Wrapper around element definition to provide FEICellGeometry interface.
Definition: feinterpol.h:95
virtual void giveElementDofIDMask(IntArray &answer) const
Returns element dof mask for node.
Definition: element.h:498
Class representing vector of real numbers.
Definition: floatarray.h:82
This abstract class represent a general base element class for fluid dynamic problems.
Definition: fmelement.h:54
virtual FEInterpolation * giveInterpolation() const
Class Interface.
Definition: interface.h:82
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
virtual Interface * giveInterface(InterfaceType t)
Interface requesting service.
Definition: femcmpnn.h:179
The spatial localizer element interface associated to spatial localizer.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
Definition: element.h:170
InterfaceType
Enumerative type, used to identify interface type.
Definition: interfacetype.h:43
int giveSize() const
Definition: intarray.h:203
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class representing solution step.
Definition: timestep.h:80
virtual void giveDofManDofIDMask(int i, IntArray &nodeDofIDMask) const
Returns dofmanager dof mask for node.
int numberOfDofMans
Number of dofmanagers.
Definition: element.h:149
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631

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