svMultiPhysics
Loading...
Searching...
No Matches
nn_elem_nn_bnds.h
1/* Copyright (c) Stanford University, The Regents of the University of California, and others.
2 *
3 * All Rights Reserved.
4 *
5 * See Copyright-SimVascular.txt for additional details.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining
8 * a copy of this software and associated documentation files (the
9 * "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sublicense, and/or sell copies of the Software, and to
12 * permit persons to whom the Software is furnished to do so, subject
13 * to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
19 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
22 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/// @brief Define a map type used to set the bounds of element shape functions.
32///
33/// Sets
34/// \code {.cpp}
35/// mesh.xib(2, com_mod.nsd); // Bounds on Gauss integration points in parametric space
36/// mesh.Nb2, mesh.eNoN); // Bounds on shape functions
37/// \endcode
38
39using SetElementShapeBoundsMapType = std::map<ElementType, std::function<void(int, mshType&)>>;
40
41SetElementShapeBoundsMapType set_element_shape_bounds_data = {
42
43 {ElementType::HEX8, [](int nsd, mshType& mesh) -> void {
44 for (int i = 0; i < nsd; i++) {
45 mesh.xib(0,i) = -1.0;
46 mesh.xib(1,i) = 1.0;
47 }
48 }
49 },
50
51 {ElementType::LIN1, [](int nsd, mshType& mesh) -> void {
52 std::cout << "[set_element_shape_bounds_data] **************************" << std::endl;
53 std::cout << "[set_element_shape_bounds_data] ERROR: LIN1 not supported." << std::endl;
54 std::cout << "[set_element_shape_bounds_data] **************************" << std::endl;
55 }
56 },
57
58 {ElementType::TET4, [](int nsd, mshType& mesh) -> void {
59 for (int i = 0; i < nsd; i++) {
60 mesh.xib(0,i) = 0.0;
61 }
62 }
63 },
64
65 {ElementType::TRI3, [](int nsd, mshType& mesh) -> void {
66 for (int i = 0; i < nsd; i++) {
67 mesh.xib(0,i) = 0.0;
68 }
69 }
70 },
71
72 {ElementType::WDG, [](int nsd, mshType& mesh) -> void {
73 mesh.xib(0,0) = 0.0;
74 mesh.xib(0,1) = 0.0;
75 }
76 },
77
78};
79
This is the container for a mesh or NURBS patch, those specific to NURBS are noted.
Definition ComMod.h:832