svMultiPhysics
Loading...
Searching...
No Matches
nn_elem_nn_bnds.h
1// SPDX-FileCopyrightText: Copyright (c) Stanford University, The Regents of the University of California, and others.
2// SPDX-License-Identifier: BSD-3-Clause
3
4/// @brief Define a map type used to set the bounds of element shape functions.
5///
6/// Sets
7/// \code {.cpp}
8/// mesh.xib(2, com_mod.nsd); // Bounds on Gauss integration points in parametric space
9/// mesh.Nb2, mesh.eNoN); // Bounds on shape functions
10/// \endcode
11
12using SetElementShapeBoundsMapType = std::map<ElementType, std::function<void(int, mshType&)>>;
13
14SetElementShapeBoundsMapType set_element_shape_bounds_data = {
15
16 {ElementType::HEX8, [](int nsd, mshType& mesh) -> void {
17 for (int i = 0; i < nsd; i++) {
18 mesh.xib(0,i) = -1.0;
19 mesh.xib(1,i) = 1.0;
20 }
21 }
22 },
23
24 {ElementType::LIN1, [](int nsd, mshType& mesh) -> void {
25 std::cout << "[set_element_shape_bounds_data] **************************" << std::endl;
26 std::cout << "[set_element_shape_bounds_data] ERROR: LIN1 not supported." << std::endl;
27 std::cout << "[set_element_shape_bounds_data] **************************" << std::endl;
28 }
29 },
30
31 {ElementType::TET4, [](int nsd, mshType& mesh) -> void {
32 for (int i = 0; i < nsd; i++) {
33 mesh.xib(0,i) = 0.0;
34 }
35 }
36 },
37
38 {ElementType::TRI3, [](int nsd, mshType& mesh) -> void {
39 for (int i = 0; i < nsd; i++) {
40 mesh.xib(0,i) = 0.0;
41 }
42 }
43 },
44
45 {ElementType::WDG, [](int nsd, mshType& mesh) -> void {
46 mesh.xib(0,0) = 0.0;
47 mesh.xib(0,1) = 0.0;
48 }
49 },
50
51};
52
This is the container for a mesh or NURBS patch, those specific to NURBS are noted.
Definition ComMod.h:863