BELFEM 0.9.3
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_IF_InterpolationFunctionTemplate.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_CL_IF_INTERPOLATIONFUNCTIONTEMPLATE_HPP
13#define BELFEM_CL_IF_INTERPOLATIONFUNCTIONTEMPLATE_HPP
14
16#include "assert.hpp"
17
18namespace belfem
19{
20 namespace fem
21 {
22//------------------------------------------------------------------------------
30 template< GeometryType G, InterpolationType T, uint D, uint B >
32 {
33//------------------------------------------------------------------------------
34 public:
35//------------------------------------------------------------------------------
36
41
42//------------------------------------------------------------------------------
43
47 ~InterpolationFunctionTemplate() override = default;
48
49//------------------------------------------------------------------------------
50
55 void
56 param_coords( Matrix< real > & aXiHat ) const override
57 {
58 BELFEM_ERROR( false,
59 "illegal call to template function InterpolationFunctionTemplate::param_coords()" );
60 }
61
62//------------------------------------------------------------------------------
63
74 void
75 N( const Vector< real > & aXi,
76 Matrix< real > & aN ) const override
77 {
78 BELFEM_ERROR( false,
79 "illegal call to template function InterpolationFunctionTemplate::N()" );
80 }
81
82//------------------------------------------------------------------------------
83
95 void
96 dNdXi( const Vector< real > & aXi,
97 Matrix< real > & adNdXi ) const override
98 {
99 BELFEM_ERROR( false,
100 "illegal call to template function InterpolationFunctionTemplate::adNdXi()" );
101 }
102
103//------------------------------------------------------------------------------
104
116 void
118 Matrix< real > & ad2NdXi2 ) const override
119 {
120 BELFEM_ERROR( false,
121 "illegal call to template function InterpolationFunctionTemplate::ad2NdXi2()" );
122 }
123
124//------------------------------------------------------------------------------
125
129 uint
130 number_of_bases() const override
131 {
132 return B;
133 }
134
135//------------------------------------------------------------------------------
136
140 uint
141 number_of_dimensions() const override
142 {
143 return D;
144 }
145
146//------------------------------------------------------------------------------
147
152 interpolation_order() const override
153 {
154 BELFEM_ERROR( false,
155 "illegal call to template function InterpolationFunctionTemplate::interpolation_order()" );
156
158 }
159
160//------------------------------------------------------------------------------
161
166 interpolation_type() const override
167 {
168 return T;
169 }
170
171//------------------------------------------------------------------------------
172
177 geometry_type() const override
178 {
179 return G;
180 }
181
182//------------------------------------------------------------------------------
183
188 element_type() const override
189 {
190 BELFEM_ERROR( false,
191 "illegal call to template function InterpolationFunctionTemplate::element_type()" );
192
194 }
195
196//------------------------------------------------------------------------------
197
198 };
199
200//------------------------------------------------------------------------------
201 }
202}
203#endif //BELFEM_CL_IF_INTERPOLATIONFUNCTIONTEMPLATE_HPP
#define BELFEM_ERROR(aCheck,...)
Definition assert.hpp:264
InterpolationFunction()=default
trivial constructor
void param_coords(Matrix< real > &aXiHat) const override
returns a matrix containing the parameter coordinates of the nodes < number of dimensions x number of...
Definition cl_IF_InterpolationFunctionTemplate.hpp:56
InterpolationType interpolation_type() const override
returns the interpolation type
Definition cl_IF_InterpolationFunctionTemplate.hpp:166
InterpolationOrder interpolation_order() const override
returns the interpolation order
Definition cl_IF_InterpolationFunctionTemplate.hpp:152
uint number_of_bases() const override
returns the number of bases for this shape function
Definition cl_IF_InterpolationFunctionTemplate.hpp:130
void d2NdXi2(const Vector< real > &aXi, Matrix< real > &ad2NdXi2) const override
calculates the second derivative of the shape function in parameter space
Definition cl_IF_InterpolationFunctionTemplate.hpp:117
~InterpolationFunctionTemplate() override=default
trivial destructor
ElementType element_type() const override
returns the element type
Definition cl_IF_InterpolationFunctionTemplate.hpp:188
void dNdXi(const Vector< real > &aXi, Matrix< real > &adNdXi) const override
calculates the first derivative of the shape function in parameter space
Definition cl_IF_InterpolationFunctionTemplate.hpp:96
GeometryType geometry_type() const override
returns the geometry type
Definition cl_IF_InterpolationFunctionTemplate.hpp:177
uint number_of_dimensions() const override
returns the number of dimensions for this shape function
Definition cl_IF_InterpolationFunctionTemplate.hpp:141
void N(const Vector< real > &aXi, Matrix< real > &aN) const override
evaluates the shape function at a given point
Definition cl_IF_InterpolationFunctionTemplate.hpp:75
InterpolationFunctionTemplate()=default
trivial constructor
Definition cl_IFB_LINE3.hpp:21
@ D
Damping matrix (reserved for second-order).
Definition cl_TimestepMatrices.hpp:34
USER GUIDES:
Definition cl_Capacitor.cpp:16
InterpolationType
Definition Mesh_Enums.hpp:99
unsigned int uint
Definition typedefs.hpp:30
ElementType
Element types.
Definition Mesh_Enums.hpp:27
@ UNDEFINED
Definition Mesh_Enums.hpp:64
InterpolationOrder
Definition Mesh_Enums.hpp:85
@ UNDEFINED
Definition Mesh_Enums.hpp:93
GeometryType
Definition Mesh_Enums.hpp:70