NimbleSM
NimbleSM is a solid mechanics simulation code for dynamic systems
Loading...
Searching...
No Matches
nimble_kokkos_block_material_interface.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 SRC_NIMBLE_KOKKOS_BLOCK_MATERIAL_INTERFACE_H_
45#define SRC_NIMBLE_KOKKOS_BLOCK_MATERIAL_INTERFACE_H_
46
48#include "nimble_data_utils.h"
49#include "nimble_kokkos_block.h"
50#include "nimble_kokkos_defs.h"
51#include "nimble_utils.h"
52
53namespace nimble {
54
55class ModelDataBase;
56class FieldIds;
57
58} // namespace nimble
59
60namespace nimble_kokkos {
61
62class ModelData;
63
64using ElemPointRangePolicy = Kokkos::MDRangePolicy<Kokkos::Rank<2>>;
66make_elem_point_range_policy(const int num_block_elems, const int num_points_per_elem)
67{
68 return ElemPointRangePolicy({0, 0}, {num_block_elems, num_points_per_elem});
69}
70
72{
73 public:
75 double time_n_,
76 double time_np1_,
77 const nimble::FieldIds& field_ids_,
78 const std::vector<nimble::BlockData>& blocks_,
79 nimble::ModelDataBase* model_data_);
80
81 ~BlockMaterialInterface() override = default;
82
83 void
84 ComputeStress() const override;
85
86 protected:
87 const double time_n;
88 const double time_np1;
91 std::vector<nimble::BlockData> blocks;
92};
93
94} // namespace nimble_kokkos
95
96#endif /* SRC_NIMBLE_KOKKOS_BLOCK_MATERIAL_INTERFACE_H_ */
Definition nimble_block_material_interface_base.h:76
Definition nimble_model_data_base.h:88
const double time_n
Definition nimble_kokkos_block_material_interface.h:87
const double time_np1
Definition nimble_kokkos_block_material_interface.h:88
const nimble::FieldIds & field_ids
Definition nimble_kokkos_block_material_interface.h:89
~BlockMaterialInterface() override=default
nimble_kokkos::ModelData * model_data
Definition nimble_kokkos_block_material_interface.h:90
std::vector< nimble::BlockData > blocks
Definition nimble_kokkos_block_material_interface.h:91
void ComputeStress() const override
Definition nimble_kokkos_block_material_interface.cc:139
BlockMaterialInterface(double time_n_, double time_np1_, const nimble::FieldIds &field_ids_, const std::vector< nimble::BlockData > &blocks_, nimble::ModelDataBase *model_data_)
Definition nimble_kokkos_block_material_interface.cc:123
Definition nimble_kokkos_model_data.h:72
Definition nimble_contact_manager.h:68
ElemPointRangePolicy make_elem_point_range_policy(const int num_block_elems, const int num_points_per_elem)
Definition nimble_kokkos_block_material_interface.h:66
Kokkos::MDRangePolicy< Kokkos::Rank< 2 > > ElemPointRangePolicy
Definition nimble_kokkos_block_material_interface.h:64
Definition kokkos_contact_manager.h:49
Definition nimble_model_data_base.h:66