Debian Codegraph @

packages/stk/stk_unit_tests/stk_tools/mesh_tools/UnitTestCustomAura.hpp

raw
1 // Copyright 2002 - 2008, 2010, 2011 National Technology Engineering
2 // Solutions of Sandia, LLC (NTESS). Under the terms of Contract
3 // DE-NA0003525 with NTESS, the U.S. Government retains certain rights
4 // in this software.
5 //
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are
8 // met:
9 //
10 // * Redistributions of source code must retain the above copyright
11 // notice, this list of conditions and the following disclaimer.
12 //
13 // * Redistributions in binary form must reproduce the above
14 // copyright notice, this list of conditions and the following
15 // disclaimer in the documentation and/or other materials provided
16 // with the distribution.
17 //
18 // * Neither the name of NTESS nor the names of its contributors
19 // may be used to endorse or promote products derived from this
20 // software without specific prior written permission.
21 //
22 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 //
34
35 #pragma once
36
37 #include <stk_unit_test_utils/MeshFixture.hpp>
38 #include <stk_unit_test_utils/TextMesh.hpp>
39 #include <string>
40
41 namespace aura_unit_tests {
42
43 class FourQuadShellsInSequenceFixture : public stk::unit_test_util::MeshFixture {
44 public:
45 FourQuadShellsInSequenceFixture() {
46 reset_mesh();
47 setup_empty_mesh(stk::mesh::BulkData::NO_AUTO_AURA);
48 const std::vector<double> coordinates {
49 0.0, 0.0, 0.0,
50 1.0, 0.0, 0.0,
51 2.0, 0.0, 0.0,
52 3.0, 0.0, 0.0,
53 4.0, 0.0, 0.0,
54 0.0, 1.0, 0.0,
55 1.0, 1.0, 0.0,
56 2.0, 1.0, 0.0,
57 3.0, 1.0, 0.0,
58 4.0, 1.0, 0.0
59 };
60 std::string mesh_description =
61 "0,1,SHELL_QUAD_4,1,2,7,6,block_1\n"
62 "0,2,SHELL_QUAD_4,2,3,8,7,block_1\n"
63 "0,3,SHELL_QUAD_4,3,4,9,8,block_1\n"
64 "0,4,SHELL_QUAD_4,4,5,10,9,block_1";
65 if (this->get_parallel_size() == 2) {
66 mesh_description =
67 "0,1,SHELL_QUAD_4,1,2,7,6,block_1\n"
68 "0,2,SHELL_QUAD_4,2,3,8,7,block_1\n"
69 "0,3,SHELL_QUAD_4,3,4,9,8,block_1\n"
70 "1,4,SHELL_QUAD_4,4,5,10,9,block_1";
71 } else if (this->get_parallel_size() == 3) {
72 mesh_description =
73 "0,1,SHELL_QUAD_4,1,2,7,6,block_1\n"
74 "0,2,SHELL_QUAD_4,2,3,8,7,block_1\n"
75 "1,3,SHELL_QUAD_4,3,4,9,8,block_1\n"
76 "2,4,SHELL_QUAD_4,4,5,10,9,block_1";
77 } else if (this->get_parallel_size() == 4) {
78 mesh_description =
79 "0,1,SHELL_QUAD_4,1,2,7,6,block_1\n"
80 "1,2,SHELL_QUAD_4,2,3,8,7,block_1\n"
81 "2,3,SHELL_QUAD_4,3,4,9,8,block_1\n"
82 "3,4,SHELL_QUAD_4,4,5,10,9,block_1";
83 }
84 stk::unit_test_util::setup_text_mesh(
85 get_bulk(), stk::unit_test_util::get_full_text_mesh_desc(mesh_description, coordinates));
86 }
87
88 void print_local_node_comm(const int rank);
89 };
90
91 }
92