OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
feinterpol3d.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 "feinterpol3d.h"
36 #include "floatarray.h"
37 #include "gaussintegrationrule.h"
38 
39 namespace oofem {
41 {
42  OOFEM_ERROR("Not implemented in subclass.");
43  return 0;
44 }
45 
47 {
48  this->computeLocalEdgeMapping(answer, boundary);
49 }
50 
51 void FEInterpolation3d :: boundaryEdgeEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
52 {
53  this->edgeEvalN(answer, boundary, lcoords, cellgeo);
54 }
55 
57 {
58  return this->edgeGiveTransformationJacobian(boundary, lcoords, cellgeo);
59 }
60 
61 void FEInterpolation3d :: boundaryEdgeLocal2Global(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
62 {
63  this->edgeLocal2global(answer, boundary, lcoords, cellgeo);
64 }
65 
67 {
68  this->computeLocalSurfaceMapping(answer, boundary);
69 }
70 
71 void FEInterpolation3d :: boundaryEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
72 {
73  this->surfaceEvalN(answer, boundary, lcoords, cellgeo);
74 }
75 
76 double FEInterpolation3d :: boundaryEvalNormal(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
77 {
78  return this->surfaceEvalNormal(answer, boundary, lcoords, cellgeo);
79 }
80 
81 double FEInterpolation3d :: boundaryGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
82 {
83  return this->surfaceGiveTransformationJacobian(boundary, lcoords, cellgeo);
84 }
85 
86 void FEInterpolation3d :: boundaryLocal2Global(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
87 {
88  return this->surfaceLocal2global(answer, boundary, lcoords, cellgeo);
89 }
90 
91 void FEInterpolation3d :: computeEdgeMapping(IntArray &edgeNodes, IntArray &elemNodes, int iedge)
92 {
93  int size;
94  IntArray ln;
95  this->computeLocalEdgeMapping(ln, iedge);
96  size = ln.giveSize();
97  edgeNodes.resize(size);
98  for ( int i = 1; i <= size; i++ ) {
99  edgeNodes.at(i) = elemNodes.at( ln.at(i) );
100  }
101 }
102 
103 void FEInterpolation3d :: computeSurfaceMapping(IntArray &surfNodes, IntArray &elemNodes, int isurf)
104 {
105  int size;
106  IntArray ln;
107  this->computeLocalSurfaceMapping(ln, isurf);
108  size = ln.giveSize();
109  surfNodes.resize(size);
110  for ( int i = 1; i <= size; i++ ) {
111  surfNodes.at(i) = elemNodes.at( ln.at(i) );
112  }
113 }
114 
116 {
117  IntegrationRule *iRule = new GaussIntegrationRule(1, NULL);
118  int points = iRule->getRequiredNumberOfIntegrationPoints(_Line, order + this->order);
119  iRule->SetUpPointsOnLine(points, _Unknown);
120  return iRule;
121 }
122 
123 void FEInterpolation3d :: edgeEvaldNdxi(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
124 {
125  OOFEM_ERROR("Not implemented");
126 }
127 
128 void FEInterpolation3d :: surfaceEvaldNdx(FloatMatrix &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
129 {
130  OOFEM_ERROR("Not implemented");
131 }
132 
133 double FEInterpolation3d :: surfaceEvalNormal(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
134 {
135  OOFEM_ERROR("Not implemented");
136  return -1.0;
137 }
138 
140 {
141  this->computeLocalSurfaceMapping(answer, boundary);
142 }
143 
144 } // end namespace oofem
virtual void boundaryEdgeEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the basis functions on the requested boundary.
Definition: feinterpol3d.C:51
virtual void boundaryEdgeGiveNodes(IntArray &answer, int boundary)
Gives the boundary nodes for requested boundary number.
Definition: feinterpol3d.C:46
virtual void boundaryEdgeLocal2Global(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Maps the local boundary coordinates to global.
Definition: feinterpol3d.C:61
virtual double boundaryEvalNormal(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the normal on the requested boundary.
Definition: feinterpol3d.C:76
void computeSurfaceMapping(IntArray &surfNodes, IntArray &elemNodes, int isurf)
Definition: feinterpol3d.C:103
Class representing a general abstraction for cell geometry.
Definition: feinterpol.h:62
virtual double edgeGiveTransformationJacobian(int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the edge jacobian of transformation between local and global coordinates.
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual void computeLocalSurfaceMapping(IntArray &surfNodes, int isurf)=0
virtual void edgeEvaldNdxi(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of edge interpolation functions (shape functions) at given point...
Definition: feinterpol3d.C:123
virtual void edgeLocal2global(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates edge global coordinates from given local ones.
virtual double giveVolume(const FEICellGeometry &cellgeo) const
Computes the exact volume.
Definition: feinterpol3d.C:40
Abstract base class representing integration rule.
virtual void boundaryLocal2Global(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Maps the local boundary coordinates to global.
Definition: feinterpol3d.C:86
virtual void surfaceEvalN(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of edge interpolation functions (shape functions) at given point.
virtual void boundaryGiveNodes(IntArray &answer, int boundary)
Gives the boundary nodes for requested boundary number.
Definition: feinterpol3d.C:66
#define OOFEM_ERROR(...)
Definition: error.h:61
virtual double boundaryEdgeGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation Jacobian on the requested boundary.
Definition: feinterpol3d.C:56
void computeEdgeMapping(IntArray &edgeNodes, IntArray &elemNodes, int iedge)
Definition: feinterpol3d.C:91
void resize(int n)
Checks size of receiver towards requested bounds.
Definition: intarray.C:124
virtual double boundaryGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation Jacobian on the requested boundary.
Definition: feinterpol3d.C:81
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
virtual void surfaceEvaldNdx(FloatMatrix &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of edge interpolation functions (shape functions) at given point...
Definition: feinterpol3d.C:128
virtual double surfaceEvalNormal(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the normal out of the surface at given point.
Definition: feinterpol3d.C:133
virtual int getRequiredNumberOfIntegrationPoints(integrationDomain dType, int approxOrder)
Abstract service.
virtual void boundarySurfaceGiveNodes(IntArray &answer, int boundary)
Gives the boundary nodes for requested boundary number.
Definition: feinterpol3d.C:139
virtual int SetUpPointsOnLine(int, MaterialMode mode)
Sets up receiver&#39;s integration points on unit line integration domain.
virtual void edgeEvalN(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of edge interpolation functions (shape functions) at given point.
virtual void boundaryEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the basis functions on the requested boundary.
Definition: feinterpol3d.C:71
virtual double surfaceGiveTransformationJacobian(int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the edge jacobian of transformation between local and global coordinates.
virtual void surfaceLocal2global(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates edge global coordinates from given local ones.
int giveSize() const
Definition: intarray.h:203
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual IntegrationRule * giveBoundaryEdgeIntegrationRule(int order, int boundary)
Sets up a suitable integration rule for integrating over the requested boundary.
Definition: feinterpol3d.C:115
virtual void computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)=0
Class representing Gaussian-quadrature integration rule.

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