OOFEM 3.0
Loading...
Searching...
No Matches
feinterpol1d.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 "feinterpol1d.h"
36#include "floatarray.h"
38#include <stdexcept>
39
40namespace oofem {
41
42
43void FEInterpolation1d :: boundaryEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
44{
45 answer.resize(1);
46 answer.at(1) = 1.;
47}
48
49IntArray FEInterpolation1d :: boundaryGiveNodes(int boundary, Element_Geometry_Type egt) const
50{
51 throw std::runtime_error("Not implemented");
52}
53
54double FEInterpolation1d :: boundaryEvalNormal(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
55{
56 OOFEM_ERROR("Not implemented");
57}
58
59double FEInterpolation1d :: boundaryGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
60{
61 return 1.;
62}
63
64void FEInterpolation1d :: boundaryLocal2Global(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
65{
66 answer = cellgeo.giveVertexCoordinates(boundary);
67}
68
69std::unique_ptr<IntegrationRule> FEInterpolation1d :: giveIntegrationRule(int order, Element_Geometry_Type egt) const
70{
71 auto iRule = std::make_unique<GaussIntegrationRule>(1, nullptr);
72 int points = iRule->getRequiredNumberOfIntegrationPoints(_Line, order + this->order);
73 iRule->SetUpPointsOnLine(points, _Unknown);
74 return std::move(iRule);
75}
76
77std::unique_ptr<IntegrationRule> FEInterpolation1d :: giveBoundaryIntegrationRule(int order, int boundary, Element_Geometry_Type egt) const
78{
79 auto iRule = std::make_unique<GaussIntegrationRule>(1, nullptr);
80 iRule->SetUpPoint(_Unknown);
81 return std::move(iRule);
82}
83
84std::unique_ptr<IntegrationRule> FEInterpolation1d :: giveBoundaryEdgeIntegrationRule(int order, int boundary, Element_Geometry_Type egt) const
85{
86 return this->giveIntegrationRule(order, egt);
87}
88} // end namespace oofem
virtual const FloatArray giveVertexCoordinates(int i) const =0
std::unique_ptr< IntegrationRule > giveIntegrationRule(int order, const Element_Geometry_Type) const override
void resize(Index s)
Definition floatarray.C:94
double & at(Index i)
Definition floatarray.h:202
#define OOFEM_ERROR(...)
Definition error.h:79

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