MFEM v4.10.0
Finite element discretization library
Loading...
Searching...
No Matches
fe_nurbs.hpp
Go to the documentation of this file.
1// Copyright (c) 2010-2026, Lawrence Livermore National Security, LLC. Produced
2// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3// LICENSE and NOTICE for details. LLNL-CODE-806117.
4//
5// This file is part of the MFEM library. For more information and source code
6// availability visit https://mfem.org.
7//
8// MFEM is free software; you can redistribute it and/or modify it under the
9// terms of the BSD-3 license. We welcome feedback and contributions, see file
10// CONTRIBUTING.md for details.
11
12#ifndef MFEM_FE_NURBS
13#define MFEM_FE_NURBS
14
15#include "fe_base.hpp"
16
17namespace mfem
18{
19
20class KnotVector;
21
22/// An arbitrary order and dimension NURBS element
24{
25protected:
26 mutable Array <const KnotVector*> kv;
27 mutable const int *ijk;
28 mutable int patch, elem;
29 mutable Vector weights;
30
31public:
32 /** @brief Construct NURBSFiniteElement with given
33 @param dim Reference space dimension
34 */
36 {
37 ijk = NULL;
38 patch = elem = -1;
39 kv.SetSize(dim);
40 }
41
42 /// Resets the patch and element data stored in the element
43 void Reset() const { patch = elem = -1; }
44 /// Set which IJK in patch should be evaluated
45 void SetIJK(const int *IJK) const { ijk = IJK; }
46 /// Get which patch is currently considered
47 int GetPatch() const { return patch; }
48 /// Set which patch should be evaluated
49 void SetPatch(int p) const { patch = p; }
50 /// Get which element is currently considered
51 int GetElement() const { return elem; }
52 /// Set which element should be evaluated
53 void SetElement(int e) const { elem = e; }
54 /// Get the knot vectors.
56 /// Get the weights.
57 Vector &Weights() const { return weights; }
58 /// Update the polynomial order according to the currently set knotvectors
59 /// Resizes all internal data members to have the correct size
60 /// related to the polynomial order
61 virtual void SetOrder() const { }
62
63 /// Returns the indices (i,j) in 2D or (i,j,k) in 3D of this element in the
64 /// tensor product ordering of the patch.
65 const int *GetIJK() const { return ijk; }
66};
67
68
69/// An arbitrary order 1D NURBS element on a segment
72{
73protected:
74 mutable Vector shape_x;
75
76public:
77 /// Construct the NURBS1DFiniteElement of order @a p
79 : ScalarFiniteElement(1, Geometry::SEGMENT, p + 1, p, FunctionSpace::Qk),
81 shape_x(p + 1) { }
82
83 void SetOrder() const override;
84 void CalcShape(const IntegrationPoint &ip, Vector &shape) const override;
85 void CalcDShape(const IntegrationPoint &ip,
86 DenseMatrix &dshape) const override;
87 void CalcHessian (const IntegrationPoint &ip,
88 DenseMatrix &hessian) const override;
89
91
92 /** Evaluate the dofs that are defined on this element.
93 Dofs that can not be evaluated will remain unmodified. */
94 void Project(Coefficient &coeff,
95 ElementTransformation &Trans, Vector &dofs) const override;
96
97 /** Evaluate the dofs that are defined on this element.
98 Dofs that can not be evaluated will remain unmodified. */
99 void Project(VectorCoefficient &vcoeff,
100 ElementTransformation &Trans, Vector &dofs) const override;
101};
102
103/// An arbitrary order 2D NURBS element on a square
105 public NURBSFiniteElement
106{
107protected:
110
111public:
112 /// Construct the NURBS2DFiniteElement of order @a p
114 : ScalarFiniteElement(2, Geometry::SQUARE, (p + 1)*(p + 1), p,
115 FunctionSpace::Qk),
117 u(dof), shape_x(p + 1), shape_y(p + 1), dshape_x(p + 1),
118 dshape_y(p + 1), d2shape_x(p + 1), d2shape_y(p + 1), du(dof,2)
119 { orders[0] = orders[1] = p; }
120
121 /// Construct the NURBS2DFiniteElement with x-order @a px and y-order @a py
122 NURBS2DFiniteElement(int px, int py)
123 : ScalarFiniteElement(2, Geometry::SQUARE, (px + 1)*(py + 1),
124 std::max(px, py), FunctionSpace::Qk),
126 u(dof), shape_x(px + 1), shape_y(py + 1), dshape_x(px + 1),
127 dshape_y(py + 1), d2shape_x(px + 1), d2shape_y(py + 1), du(dof,2)
128 { orders[0] = px; orders[1] = py; }
129
130 void SetOrder() const override;
131 void CalcShape(const IntegrationPoint &ip, Vector &shape) const override;
132 void CalcDShape(const IntegrationPoint &ip,
133 DenseMatrix &dshape) const override;
134 void CalcHessian (const IntegrationPoint &ip,
135 DenseMatrix &hessian) const override;
136
138
139 /** Evaluate the dofs that are defined on this element.
140 Dofs that can not be evaluated will remain unmodified. */
141 void Project(Coefficient &coeff,
142 ElementTransformation &Trans, Vector &dofs) const override;
143
144 /** Evaluate the dofs that are defined on this element.
145 Dofs that can not be evaluated will remain unmodified. */
146 void Project(VectorCoefficient &vcoeff,
147 ElementTransformation &Trans, Vector &dofs) const override;
148};
149
150/// An arbitrary order 3D NURBS element on a cube
152 public NURBSFiniteElement
153{
154protected:
159
160public:
161 /// Construct the NURBS3DFiniteElement of order @a p
163 : ScalarFiniteElement(3, Geometry::CUBE, (p + 1)*(p + 1)*(p + 1), p,
164 FunctionSpace::Qk),
166 u(dof), shape_x(p + 1), shape_y(p + 1), shape_z(p + 1),
167 dshape_x(p + 1), dshape_y(p + 1), dshape_z(p + 1),
168 d2shape_x(p + 1), d2shape_y(p + 1), d2shape_z(p + 1), du(dof,3)
169 { orders[0] = orders[1] = orders[2] = p; }
170
171 /// Construct the NURBS3DFiniteElement with x-order @a px and y-order @a py
172 /// and z-order @a pz
173 NURBS3DFiniteElement(int px, int py, int pz)
174 : ScalarFiniteElement(3, Geometry::CUBE, (px + 1)*(py + 1)*(pz + 1),
175 std::max(std::max(px,py),pz), FunctionSpace::Qk),
177 u(dof), shape_x(px + 1), shape_y(py + 1), shape_z(pz + 1),
178 dshape_x(px + 1), dshape_y(py + 1), dshape_z(pz + 1),
179 d2shape_x(px + 1), d2shape_y(py + 1), d2shape_z(pz + 1), du(dof,3)
180 { orders[0] = px; orders[1] = py; orders[2] = pz; }
181
182 void SetOrder() const override;
183 void CalcShape(const IntegrationPoint &ip, Vector &shape) const override;
184 void CalcDShape(const IntegrationPoint &ip,
185 DenseMatrix &dshape) const override;
186 void CalcHessian (const IntegrationPoint &ip,
187 DenseMatrix &hessian) const override;
188
190
191 /** Evaluate the dofs that are defined on this element.
192 Dofs that can not be evaluated will remain unmodified. */
193 void Project(Coefficient &coeff,
194 ElementTransformation &Trans, Vector &dofs) const override;
195
196 /** Evaluate the dofs that are defined on this element.
197 Dofs that can not be evaluated will remain unmodified. */
198 void Project(VectorCoefficient &vcoeff,
199 ElementTransformation &Trans, Vector &dofs) const override;
200};
201
202
203/** An arbitrary order H(div)-conforming 2D NURBS element on a square.
204 More details in the following papers:
205
206[1] Annalisa Buffa, Carlo De Falco, Giancarlo Sangalli
207"Isogeometric analysis: stable elements for the 2D Stokes equation."
208International Journal for Numerical Methods in Fluids 65 (11‐12) 1407-1422
209
210[2] John A Evans, Thomas JR Hughes
211"Isogeometric divergence-conforming B-splines for the unsteady Navier–Stokes equations."
212Journal of Computational Physics (241) 141-167
213*/
215 public NURBSFiniteElement
216{
217protected:
220 mutable Vector u;
222 mutable Array <const KnotVector*> kv1;
223
224public:
225 /// Construct the NURBS_HDiv2DFiniteElement of order @a p
227 : VectorFiniteElement(2, Geometry::SQUARE, 2*(p + 1)*(p + 2), p,
228 H_DIV,FunctionSpace::Qk),
230 shape_x(p + 1), shape_y(p + 1), dshape_x(p + 1),
231 dshape_y(p + 1), d2shape_x(p + 1), d2shape_y(p + 1),
232 shape1_x(p + 2), shape1_y(p + 2), dshape1_x(p + 2),
233 dshape1_y(p + 2), d2shape1_x(p + 2), d2shape1_y(p + 2),
234 u(dof), du(dof,2)
235 {
236 orders[0] = orders[1] = p;
237 kv1.SetSize(dim);
238 kv1[0] = nullptr;
239 kv1[1] = nullptr;
240 }
241
242 /// Construct the NURBS_HDiv2DFiniteElement with x-order @a px and y-order @a py
244 : VectorFiniteElement(2, Geometry::SQUARE,
245 (px + 2)*(py + 1)+(px + 1)*(py + 2),
246 std::max(px, py), H_DIV, FunctionSpace::Qk),
248 shape_x(px + 1), shape_y(py + 1), dshape_x(px + 1),
249 dshape_y(py + 1), d2shape_x(px + 1), d2shape_y(py + 1),
250 shape1_x(px + 2), shape1_y(py + 2), dshape1_x(px + 2),
251 dshape1_y(py + 2), d2shape1_x(px + 2), d2shape1_y(py + 2),
252 u(dof), du(dof,2)
253 {
254 orders[0] = px; orders[1] = py;
255 kv1.SetSize(dim);
256 kv1[0] = nullptr;
257 kv1[1] = nullptr;
258 }
259
260 void SetOrder() const override;
261
262 void CalcVShape(const IntegrationPoint &ip,
263 DenseMatrix &shape) const override;
264
265 /** @brief Evaluate the values of all shape functions of a *vector* finite
266 element in physical space at the point described by @a Trans. */
267 /** Each row of the result DenseMatrix @a shape contains the components of
268 one vector shape function. The size (#dof x SDim) of @a shape must be set
269 in advance, where SDim >= #dim is the physical space dimension as
270 described by @a Trans. */
272 DenseMatrix &shape) const override;
273
274 /** @brief Evaluate the divergence of all shape functions of a *vector*
275 finite element in reference space at the given point @a ip. */
276 /** The size (#dof) of the result Vector @a divshape must be set in advance.
277 */
278 void CalcDivShape(const IntegrationPoint &ip,
279 Vector &divshape) const override;
280
282
283 /** Evaluate the dofs that are defined on this element.
284 Dofs that can not be evaluated will remain unmodified. */
285 void Project(VectorCoefficient &vcoeff,
286 ElementTransformation &Trans, Vector &dofs) const override;
287
289};
290
291
292/** An arbitrary order H(div)-conforming 3D NURBS element on a cube
293 More details in the following papers:
294
295 [1] Annalisa Buffa, Carlo De Falco, Giancarlo Sangalli
296 "Isogeometric analysis: stable elements for the 2D Stokes equation."
297 International Journal for Numerical Methods in Fluids 65 (11‐12) 1407-1422
298
299 [2] John A Evans, Thomas JR Hughes
300 "Isogeometric divergence-conforming B-splines for the unsteady
301 Navier–Stokes equations."
302 Journal of Computational Physics (241) 141-167 */
304 public NURBSFiniteElement
305{
306protected:
313 mutable Vector u;
315 mutable Array <const KnotVector*> kv1;
316
317public:
318 /// Construct the NURBS_HDiv3DFiniteElement of order @a p
320 : VectorFiniteElement(3, Geometry::CUBE, 3*(p + 1)*(p + 1)*(p + 2),
321 p, H_DIV,FunctionSpace::Qk),
323 shape_x(p + 1), shape_y(p + 1), shape_z(p + 1),
324 dshape_x(p + 1), dshape_y(p + 1), dshape_z(p + 1),
325 d2shape_x(p + 1), d2shape_y(p + 1), d2shape_z(p + 1),
326 shape1_x(p + 2), shape1_y(p + 2), shape1_z(p + 2),
327 dshape1_x(p + 2), dshape1_y(p + 2),dshape1_z(p + 2),
328 d2shape1_x(p + 2), d2shape1_y(p + 2), d2shape1_z(p + 2),
329 u(dof), du(dof,3)
330 {
331 orders[0] = orders[1] = orders[2] = p;
332 kv1.SetSize(dim);
333 kv1[0] = nullptr;
334 kv1[1] = nullptr;
335 kv1[2] = nullptr;
336 }
337
338 /// Construct the NURBS_HDiv3DFiniteElement with x-order @a px, y-order @a py and z-order @a pz
339 NURBS_HDiv3DFiniteElement(int px, int py, int pz)
340 : VectorFiniteElement(3, Geometry::CUBE,
341 (px + 2)*(py + 1)*(pz + 1) +
342 (px + 1)*(py + 2)*(pz + 1) +
343 (px + 1)*(py + 1)*(pz + 2),
344 std::max(px, py), H_DIV, FunctionSpace::Qk),
346 shape_x(px + 1), shape_y(py + 1), shape_z(pz + 1),
347 dshape_x(px + 1), dshape_y(py + 1), dshape_z(pz + 1),
348 d2shape_x(px + 1), d2shape_y(py + 1), d2shape_z(pz + 1),
349 shape1_x(px + 2), shape1_y(py + 2), shape1_z(pz + 2),
350 dshape1_x(px + 2), dshape1_y(py + 2),dshape1_z(pz + 2),
351 d2shape1_x(px + 2), d2shape1_y(py + 2), d2shape1_z(pz + 2),
352 u(dof), du(dof,3)
353 {
354 orders[0] = px; orders[1] = py; orders[2] = pz;
355 kv1.SetSize(dim);
356 kv1[0] = nullptr;
357 kv1[1] = nullptr;
358 kv1[2] = nullptr;
359 }
360
361 void SetOrder() const override;
362
363 void CalcVShape(const IntegrationPoint &ip,
364 DenseMatrix &shape) const override;
365
366 /** @brief Evaluate the values of all shape functions of a *vector* finite
367 element in physical space at the point described by @a Trans. */
368 /** Each row of the result DenseMatrix @a shape contains the components of
369 one vector shape function. The size (#dof x SDim) of @a shape must be set
370 in advance, where SDim >= #dim is the physical space dimension as
371 described by @a Trans. */
373 DenseMatrix &shape) const override;
374
375 /** @brief Evaluate the divergence of all shape functions of a *vector*
376 finite element in reference space at the given point @a ip. */
377 /** The size (#dof) of the result Vector @a divshape must be set in advance.
378 */
379 void CalcDivShape(const IntegrationPoint &ip,
380 Vector &divshape) const override;
381
383
384 /** Evaluate the dofs that are defined on this element.
385 Dofs that can not be evaluated will remain unmodified. */
386 void Project(VectorCoefficient &vcoeff,
387 ElementTransformation &Trans, Vector &dofs) const override;
388
390};
391
392
393/** An arbitrary order H(curl)-conforming 2D NURBS element on a square
394 More details in the following paper:
395
396 [1] Annalisa Buffa, Giancarlo Sangalli, Rafael Vázquez
397 "Isogeometric analysis in electromagnetics: B-splines approximation."
398 Computer Methods in Applied Mechanics and Engineering (199) 1143-1152 */
400 public NURBSFiniteElement
401{
402protected:
405 mutable Vector u;
407 mutable Array <const KnotVector*> kv1;
408
409public:
410 /// Construct the NURBS_HCurl2DFiniteElement of order @a p
412 : VectorFiniteElement(2, Geometry::SQUARE, 2*(p + 1)*(p + 2), p,
415 shape_x(p + 1), shape_y(p + 1), dshape_x(p + 1),
416 dshape_y(p + 1), d2shape_x(p + 1), d2shape_y(p + 1),
417 shape1_x(p + 2), shape1_y(p + 2), dshape1_x(p + 2),
418 dshape1_y(p + 2), d2shape1_x(p + 2), d2shape1_y(p + 2),
419 u(dof), du(dof,2)
420 {
421 orders[0] = orders[1] = p;
422 kv1.SetSize(dim);
423 kv1[0] = nullptr;
424 kv1[1] = nullptr;
425 }
426
427 /// Construct the NURBS_HCurl2DFiniteElement with x-order @a px and y-order @a py
429 : VectorFiniteElement(2, Geometry::SQUARE,
430 (px + 1)*(py + 2)+(px + 2)*(py + 1),
431 std::max(px, py), H_CURL, FunctionSpace::Qk),
433 shape_x(px + 1), shape_y(py + 1), dshape_x(px + 1),
434 dshape_y(py + 1), d2shape_x(px + 1), d2shape_y(py + 1),
435 shape1_x(px + 2), shape1_y(py + 2), dshape1_x(px + 2),
436 dshape1_y(py + 2), d2shape1_x(px + 2), d2shape1_y(py + 2),
437 u(dof), du(dof,2)
438 {
439 orders[0] = px; orders[1] = py;
440 kv1.SetSize(dim);
441 kv1[0] = nullptr;
442 kv1[1] = nullptr;
443 }
444
445 void SetOrder() const override;
446
447 void CalcVShape(const IntegrationPoint &ip,
448 DenseMatrix &shape) const override;
449
450 /** @brief Evaluate the values of all shape functions of a *vector* finite
451 element in physical space at the point described by @a Trans. */
452 /** Each row of the result DenseMatrix @a shape contains the components of
453 one vector shape function. The size (#dof x SDim) of @a shape must be set
454 in advance, where SDim >= #dim is the physical space dimension as
455 described by @a Trans. */
457 DenseMatrix &shape) const override;
458
459 /** @brief Evaluate the curl of all shape functions of a *vector* finite
460 element in reference space at the given point @a ip. */
461 /** Each row of the result DenseMatrix @a curl_shape contains the components
462 of the curl of one vector shape function. The size (#dof x CDim) of
463 @a curl_shape must be set in advance, where CDim = 3 for #dim = 3 and
464 CDim = 1 for #dim = 2. */
465 void CalcCurlShape(const IntegrationPoint &ip,
466 DenseMatrix &curl_shape) const override;
467
469
470 /** Evaluate the dofs that are defined on this element.
471 Dofs that can not be evaluated will remain unmodified. */
472 void Project(VectorCoefficient &vcoeff,
473 ElementTransformation &Trans, Vector &dofs) const override;
474
476};
477
478
479/** An arbitrary order H(curl)-conforming 3D NURBS element on a cube
480 More details in the following paper:
481
482 [1] Annalisa Buffa, Giancarlo Sangalli, Rafael Vázquez
483 "Isogeometric analysis in electromagnetics: B-splines approximation."
484 Computer Methods in Applied Mechanics and Engineering (199) 1143-1152 */
486 public NURBSFiniteElement
487{
488protected:
495 mutable Vector u;
497 mutable Array <const KnotVector*> kv1;
498
499public:
500 /// Construct the NURBS_HCurl3DFiniteElement of order @a p
502 : VectorFiniteElement(3, Geometry::CUBE, 3*(p + 1)*(p + 2)*(p + 2), p,
505 shape_x(p + 1), shape_y(p + 1), shape_z(p + 1),
506 dshape_x(p + 1), dshape_y(p + 1), dshape_z(p + 1),
507 d2shape_x(p + 1), d2shape_y(p + 1), d2shape_z(p + 1),
508 shape1_x(p + 2), shape1_y(p + 2), shape1_z(p + 2),
509 dshape1_x(p + 2), dshape1_y(p + 2),dshape1_z(p + 2),
510 d2shape1_x(p + 2), d2shape1_y(p + 2), d2shape1_z(p + 2),
511 u(dof), du(dof,3)
512 {
513 orders[0] = orders[1] = orders[2] = p;
514 kv1.SetSize(dim);
515 kv1[0] = nullptr;
516 kv1[1] = nullptr;
517 kv1[2] = nullptr;
518 }
519
520 /// Construct the NURBS_HCurl3DFiniteElement with x-order @a px, y-order @a py and z-order @a pz
521 NURBS_HCurl3DFiniteElement(int px, int py, int pz)
522 : VectorFiniteElement(3, Geometry::CUBE,
523 (px + 1)*(py + 2)*(pz + 2) +
524 (px + 2)*(py + 1)*(pz + 2) +
525 (px + 2)*(py + 2)*(pz + 1),
526 std::max(std::max(px, py), pz), H_CURL, FunctionSpace::Qk),
528 shape_x(px + 1), shape_y(py + 1), shape_z(pz + 1),
529 dshape_x(px + 1), dshape_y(py + 1), dshape_z(pz + 1),
530 d2shape_x(px + 1), d2shape_y(py + 1), d2shape_z(pz + 1),
531 shape1_x(px + 2), shape1_y(py + 2), shape1_z(pz + 2),
532 dshape1_x(px + 2), dshape1_y(py + 2),dshape1_z(pz + 2),
533 d2shape1_x(px + 2), d2shape1_y(py + 2), d2shape1_z(pz + 2),
534 u(dof), du(dof,3)
535 {
536 orders[0] = px; orders[1] = py; orders[2] = pz;
537 kv1.SetSize(dim);
538 kv1[0] = nullptr;
539 kv1[1] = nullptr;
540 kv1[2] = nullptr;
541 }
542
543 void SetOrder() const override;
544
545 void CalcVShape(const IntegrationPoint &ip,
546 DenseMatrix &shape) const override;
547
548 /** @brief Evaluate the values of all shape functions of a *vector* finite
549 element in physical space at the point described by @a Trans. */
550 /** Each row of the result DenseMatrix @a shape contains the components of
551 one vector shape function. The size (#dof x SDim) of @a shape must be set
552 in advance, where SDim >= #dim is the physical space dimension as
553 described by @a Trans. */
555 DenseMatrix &shape) const override;
556
557 /** @brief Evaluate the curl of all shape functions of a *vector* finite
558 element in reference space at the given point @a ip. */
559 /** Each row of the result DenseMatrix @a curl_shape contains the components
560 of the curl of one vector shape function. The size (#dof x CDim) of
561 @a curl_shape must be set in advance, where CDim = 3 for #dim = 3 and
562 CDim = 1 for #dim = 2. */
563 void CalcCurlShape(const IntegrationPoint &ip,
564 DenseMatrix &curl_shape) const override;
565
567
568 /** Evaluate the dofs that are defined on this element.
569 Dofs that can not be evaluated will remain unmodified. */
570 void Project(VectorCoefficient &vcoeff,
571 ElementTransformation &Trans, Vector &dofs) const override;
572
574};
575
576} // namespace mfem
577
578#endif
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
Data type dense matrix using column-major storage.
Definition densemat.hpp:24
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
Definition densemat.hpp:125
int dof
Number of degrees of freedom.
Definition fe_base.hpp:303
int orders[Geometry::MaxDim]
Anisotropic orders.
Definition fe_base.hpp:305
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
Given a coefficient and a transformation, compute its projection (approximation) in the local finite ...
Definition fe_base.cpp:136
int dim
Dimension of reference space.
Definition fe_base.hpp:296
Describes the function space on each element.
Definition fe_base.hpp:276
Class for integration point with weight.
Definition intrules.hpp:35
An arbitrary order 1D NURBS element on a segment.
Definition fe_nurbs.hpp:72
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition fe_nurbs.cpp:31
NURBS1DFiniteElement(int p)
Construct the NURBS1DFiniteElement of order p.
Definition fe_nurbs.hpp:78
void SetOrder() const override
Definition fe_nurbs.cpp:22
void CalcHessian(const IntegrationPoint &ip, DenseMatrix &hessian) const override
Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the giv...
Definition fe_nurbs.cpp:64
void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const override
Definition fe_nurbs.cpp:87
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition fe_nurbs.cpp:45
An arbitrary order 2D NURBS element on a square.
Definition fe_nurbs.hpp:106
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition fe_nurbs.cpp:165
void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const override
Definition fe_nurbs.cpp:258
void SetOrder() const override
Definition fe_nurbs.cpp:128
NURBS2DFiniteElement(int px, int py)
Construct the NURBS2DFiniteElement with x-order px and y-order py.
Definition fe_nurbs.hpp:122
void CalcHessian(const IntegrationPoint &ip, DenseMatrix &hessian) const override
Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the giv...
Definition fe_nurbs.cpp:200
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition fe_nurbs.cpp:146
NURBS2DFiniteElement(int p)
Construct the NURBS2DFiniteElement of order p.
Definition fe_nurbs.hpp:113
An arbitrary order 3D NURBS element on a cube.
Definition fe_nurbs.hpp:153
void SetOrder() const override
Definition fe_nurbs.cpp:316
NURBS3DFiniteElement(int px, int py, int pz)
Definition fe_nurbs.hpp:173
void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const override
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
Definition fe_nurbs.cpp:364
void CalcHessian(const IntegrationPoint &ip, DenseMatrix &hessian) const override
Evaluate the Hessians of all shape functions of a scalar finite element in reference space at the giv...
Definition fe_nurbs.cpp:410
void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const override
Definition fe_nurbs.cpp:500
void CalcShape(const IntegrationPoint &ip, Vector &shape) const override
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
Definition fe_nurbs.cpp:340
NURBS3DFiniteElement(int p)
Construct the NURBS3DFiniteElement of order p.
Definition fe_nurbs.hpp:162
An arbitrary order and dimension NURBS element.
Definition fe_nurbs.hpp:24
void Reset() const
Resets the patch and element data stored in the element.
Definition fe_nurbs.hpp:43
Array< const KnotVector * > kv
Definition fe_nurbs.hpp:26
Array< const KnotVector * > & KnotVectors() const
Get the knot vectors.
Definition fe_nurbs.hpp:55
virtual void SetOrder() const
Definition fe_nurbs.hpp:61
void SetPatch(int p) const
Set which patch should be evaluated.
Definition fe_nurbs.hpp:49
Vector & Weights() const
Get the weights.
Definition fe_nurbs.hpp:57
int GetPatch() const
Get which patch is currently considered.
Definition fe_nurbs.hpp:47
NURBSFiniteElement(int dim)
Construct NURBSFiniteElement with given.
Definition fe_nurbs.hpp:35
void SetElement(int e) const
Set which element should be evaluated.
Definition fe_nurbs.hpp:53
int GetElement() const
Get which element is currently considered.
Definition fe_nurbs.hpp:51
const int * GetIJK() const
Definition fe_nurbs.hpp:65
void SetIJK(const int *IJK) const
Set which IJK in patch should be evaluated.
Definition fe_nurbs.hpp:45
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Array< const KnotVector * > kv1
Definition fe_nurbs.hpp:407
NURBS_HCurl2DFiniteElement(int p)
Construct the NURBS_HCurl2DFiniteElement of order p.
Definition fe_nurbs.hpp:411
void Project(VectorCoefficient &vcoeff, ElementTransformation &Trans, Vector &dofs) const override
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
void SetOrder() const override
NURBS_HCurl2DFiniteElement(int px, int py)
Construct the NURBS_HCurl2DFiniteElement with x-order px and y-order py.
Definition fe_nurbs.hpp:428
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
NURBS_HCurl3DFiniteElement(int p)
Construct the NURBS_HCurl3DFiniteElement of order p.
Definition fe_nurbs.hpp:501
void Project(VectorCoefficient &vcoeff, ElementTransformation &Trans, Vector &dofs) const override
void SetOrder() const override
NURBS_HCurl3DFiniteElement(int px, int py, int pz)
Construct the NURBS_HCurl3DFiniteElement with x-order px, y-order py and z-order pz.
Definition fe_nurbs.hpp:521
void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const override
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
Array< const KnotVector * > kv1
Definition fe_nurbs.hpp:497
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Definition fe_nurbs.cpp:617
NURBS_HDiv2DFiniteElement(int p)
Construct the NURBS_HDiv2DFiniteElement of order p.
Definition fe_nurbs.hpp:226
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition fe_nurbs.cpp:666
void SetOrder() const override
Definition fe_nurbs.cpp:580
NURBS_HDiv2DFiniteElement(int px, int py)
Construct the NURBS_HDiv2DFiniteElement with x-order px and y-order py.
Definition fe_nurbs.hpp:243
Array< const KnotVector * > kv1
Definition fe_nurbs.hpp:222
void Project(VectorCoefficient &vcoeff, ElementTransformation &Trans, Vector &dofs) const override
Definition fe_nurbs.cpp:695
void SetOrder() const override
Definition fe_nurbs.cpp:759
NURBS_HDiv3DFiniteElement(int px, int py, int pz)
Construct the NURBS_HDiv3DFiniteElement with x-order px, y-order py and z-order pz.
Definition fe_nurbs.hpp:339
Array< const KnotVector * > kv1
Definition fe_nurbs.hpp:315
void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const override
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
Definition fe_nurbs.cpp:879
void Project(VectorCoefficient &vcoeff, ElementTransformation &Trans, Vector &dofs) const override
Definition fe_nurbs.cpp:932
NURBS_HDiv3DFiniteElement(int p)
Construct the NURBS_HDiv3DFiniteElement of order p.
Definition fe_nurbs.hpp:319
void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const override
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Definition fe_nurbs.cpp:806
Class for finite elements with basis functions that return scalar values.
Definition fe_base.hpp:739
Base class for vector Coefficients that optionally depend on time and space.
Intermediate class for finite elements whose basis functions return vector values.
Definition fe_base.hpp:890
Vector data type.
Definition vector.hpp:82
int dim
Definition ex24.cpp:53
STL namespace.
real_t p(const Vector &x, real_t t)