NimbleSM
NimbleSM is a solid mechanics simulation code for dynamic systems
Loading...
Searching...
No Matches
nimble_boundary_condition.h
Go to the documentation of this file.
1/*
2//@HEADER
3// ************************************************************************
4//
5// NimbleSM
6// Copyright 2018
7// National Technology & Engineering Solutions of Sandia, LLC (NTESS)
8//
9// Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government
10// retains certain rights in this software.
11//
12// Redistribution and use in source and binary forms, with or without
13// modification, are permitted provided that the following conditions are
14// met:
15//
16// 1. Redistributions of source code must retain the above copyright
17// notice, this list of conditions and the following disclaimer.
18//
19// 2. Redistributions in binary form must reproduce the above copyright
20// notice, this list of conditions and the following disclaimer in the
21// documentation and/or other materials provided with the distribution.
22//
23// 3. Neither the name of the Corporation nor the names of the
24// contributors may be used to endorse or promote products derived from
25// this software without specific prior written permission.
26//
27// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY EXPRESS OR IMPLIED
28// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
29// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
30// NO EVENT SHALL NTESS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
32// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37//
38// Questions? Contact David Littlewood (djlittl@sandia.gov)
39//
40// ************************************************************************
41//@HEADER
42*/
43
44#ifndef NIMBLE_BOUNDARY_CONDITION_H
45#define NIMBLE_BOUNDARY_CONDITION_H
46
48
49#ifdef NIMBLE_HAVE_DARMA
50#include "darma.h"
51#else
52#include <map>
53#include <string>
54#include <vector>
55#endif
56
57namespace nimble {
58
60{
61 public:
70
72
73 virtual ~BoundaryCondition() {}
74
75#ifdef NIMBLE_HAVE_DARMA
76 template <typename ArchiveType>
77 void
78 serialize(ArchiveType& ar)
79 {
82
83 if (ar.is_unpacking()) {
85 }
86 }
87#endif
88
89 bool
91 int dim,
92 std::string bc_string,
93 std::map<int, std::string> const& node_set_names,
94 std::map<int, std::string> const& side_set_names);
95
96 int dim_{0};
97 std::string node_set_name_{"unknown"};
98 int node_set_id_{-1};
99 std::string side_set_name_{"unknown"};
101 int coordinate_{-1};
102 double magnitude_{0.0};
104 bool has_expression_{false};
105 std::string expression_string_{""};
107};
108
109} // namespace nimble
110
111#endif // NIMBLE_BOUNDARY_CONDITION_H
virtual ~BoundaryCondition()
Definition nimble_boundary_condition.h:73
std::string node_set_name_
Definition nimble_boundary_condition.h:97
bool has_expression_
Definition nimble_boundary_condition.h:104
bool Initialize(int dim, std::string bc_string, std::map< int, std::string > const &node_set_names, std::map< int, std::string > const &side_set_names)
Definition nimble_boundary_condition.cc:66
Boundary_Condition_Type
Definition nimble_boundary_condition.h:63
@ PRESCRIBED_VELOCITY
Definition nimble_boundary_condition.h:66
@ PRESCRIBED_DISPLACEMENT
Definition nimble_boundary_condition.h:67
@ UNDEFINED
Definition nimble_boundary_condition.h:64
@ PRESCRIBED_TRACTION
Definition nimble_boundary_condition.h:68
@ INITIAL_VELOCITY
Definition nimble_boundary_condition.h:65
std::string expression_string_
Definition nimble_boundary_condition.h:105
int dim_
Definition nimble_boundary_condition.h:96
int side_set_id_
Definition nimble_boundary_condition.h:100
double magnitude_
Definition nimble_boundary_condition.h:102
BoundaryCondition()
Definition nimble_boundary_condition.h:71
int coordinate_
Definition nimble_boundary_condition.h:101
std::string side_set_name_
Definition nimble_boundary_condition.h:99
ExpressionParsing::BoundaryConditionFunctor expression_
Definition nimble_boundary_condition.h:106
Boundary_Condition_Type bc_type_
Definition nimble_boundary_condition.h:103
int node_set_id_
Definition nimble_boundary_condition.h:98
Definition kokkos_contact_manager.h:49
Definition nimble_expression_parser.h:698