NimbleSM
NimbleSM is a solid mechanics simulation code for dynamic systems
Loading...
Searching...
No Matches
nimble_kokkos_defs.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_KOKKOS_DEFS_H
45#define NIMBLE_KOKKOS_DEFS_H
46
47#define NIMBLE_FUNCTION KOKKOS_FUNCTION
48#define NIMBLE_INLINE_FUNCTION KOKKOS_INLINE_FUNCTION
49
50#include "Kokkos_Core.hpp"
51
52namespace nimble_kokkos {
53
54// Define HOST execution space, memory space, and device
55#if defined(KOKKOS_ENABLE_QTHREADS)
56using kokkos_host_execution_space = Kokkos::Qthreads::execution_space;
57using kokkos_host_mirror_memory_space = Kokkos::Qthreads::memory_space;
58#elif defined(KOKKOS_ENABLE_CUDA_UVM)
59using kokkos_host_execution_space = Kokkos::Serial::execution_space;
60using kokkos_host_mirror_memory_space = Kokkos::CudaUVMSpace::memory_space;
61#else
62using kokkos_host_execution_space = Kokkos::Serial::execution_space;
63using kokkos_host_mirror_memory_space = Kokkos::Serial::memory_space;
64#endif
65using kokkos_host = Kokkos::Device<kokkos_host_execution_space, kokkos_host_mirror_memory_space>;
66
67// Define DEVICE execution space, memory space, and device
68#if defined(KOKKOS_ENABLE_QTHREADS)
69using kokkos_device_execution_space = Kokkos::Qthreads::execution_space;
70using kokkos_device_memory_space = Kokkos::Qthreads::memory_space;
71#elif defined(KOKKOS_ENABLE_CUDA_UVM)
72using kokkos_device_execution_space = Kokkos::Cuda::execution_space;
73using kokkos_device_memory_space = Kokkos::CudaUVMSpace::memory_space;
74#elif defined(KOKKOS_ENABLE_CUDA)
75using kokkos_device_execution_space = Kokkos::Cuda::execution_space;
76using kokkos_device_memory_space = Kokkos::Cuda::memory_space;
77#elif defined(KOKKOS_ENABLE_OPENMP)
78using kokkos_device_execution_space = Kokkos::OpenMP::execution_space;
79using kokkos_device_memory_space = Kokkos::OpenMP::memory_space;
80#else
81using kokkos_device_execution_space = Kokkos::Serial::execution_space;
82using kokkos_device_memory_space = Kokkos::Serial::memory_space;
83#endif
84using kokkos_device = Kokkos::Device<kokkos_device_execution_space, kokkos_device_memory_space>;
85
86using kokkos_layout = kokkos_device_execution_space::array_layout;
87
107
108inline std::ostream&
109operator<<(std::ostream& out, const FieldType f)
110{
111 switch (f) {
112 case FieldType::HostScalarNode: out << "HostScalarNode"; break;
113 case FieldType::DeviceScalarNode: out << "DeviceScalarNode"; break;
114 case FieldType::HostVectorNode: out << "HostVectorNode"; break;
115 case FieldType::DeviceVectorNode: out << "DeviceVectorNode"; break;
116 case FieldType::HostSymTensorIntPt: out << "HostSymTensorIntPt"; break;
117 case FieldType::DeviceSymTensorIntPt: out << "DeviceSymTensorIntPt"; break;
118 case FieldType::HostFullTensorIntPt: out << "HostFullTensorIntPt"; break;
119 case FieldType::DeviceFullTensorIntPt: out << "DeviceFullTensorIntPt"; break;
120 case FieldType::DeviceScalarIntPt: out << "DeviceScalarIntPt"; break;
121 case FieldType::DeviceVectorIntPt: out << "DeviceVectorIntPt"; break;
122 case FieldType::HostScalarElem: out << "HostScalarElem"; break;
123 case FieldType::DeviceScalarElem: out << "DeviceScalarElem"; break;
124 case FieldType::HostSymTensorElem: out << "HostSymTensorElem"; break;
125 case FieldType::DeviceSymTensorElem: out << "DeviceSymTensorElem"; break;
126 case FieldType::HostFullTensorElem: out << "HostFullTensorElem"; break;
127 case FieldType::DeviceFullTensorElem: out << "DeviceFullTensorElem"; break;
128 };
129 return out;
130}
131
133{
134 public:
136 type() const noexcept
137 {
138 return type_;
139 }
140
141 const std::string&
142 name() const noexcept
143 {
144 return name_;
145 }
146
147 FieldBase(const std::string& arg_name, const FieldType arg_type) : type_{arg_type}, name_{arg_name} {}
148
149 FieldBase() = default;
150
151 FieldBase(const FieldBase&) = default;
152 FieldBase(FieldBase&&) = default;
153
154 FieldBase&
155 operator=(const FieldBase&) = default;
156 FieldBase&
157 operator=(FieldBase&&) = default;
158
159 virtual ~FieldBase() = default;
160
161 static constexpr int NUM_NODES_IN_HEX = 8;
162 static constexpr int NUM_INTEGRATION_POINTS_IN_HEX = 8;
163
164 private:
165 FieldType type_{};
166 std::string name_{};
167};
168
169template <FieldType FType>
170class Field;
171
172template <>
174{
175 public:
176 // (node)
177 using View = Kokkos::View<double*, kokkos_host>;
178
179 Field(const std::string& name, int num_entries) : FieldBase(name, FieldType::HostScalarNode), data_(name, num_entries)
180 {
181 }
182
183 Field(View const& v) : FieldBase(v.label(), FieldType::HostScalarNode), data_(v) {}
184
185 View
186 data() const noexcept
187 {
188 return data_;
189 }
190
191 private:
192 View data_;
193};
194
195template <>
197{
198 public:
199 // (node)
200 using View = Kokkos::View<double*, kokkos_layout, kokkos_device>;
201 using AtomicView = Kokkos::View<double*, kokkos_layout, kokkos_device, Kokkos::MemoryTraits<Kokkos::Atomic>>;
202 using GatheredView = Kokkos::View<double* [NUM_NODES_IN_HEX], kokkos_layout, kokkos_device>;
203 using GatheredSubView = decltype(Kokkos::subview(*(GatheredView*)(0), (int)(0), Kokkos::ALL));
204
205 Field(const std::string& name, int num_entries)
206 : FieldBase(name, FieldType::DeviceScalarNode), data_(name, num_entries)
207 {
208 }
209
210 Field(View const& v) : FieldBase(v.label(), FieldType::DeviceScalarNode), data_(v) {}
211
212 View
213 data() const noexcept
214 {
215 return data_;
216 }
217
218 private:
219 View data_;
220};
221
222template <>
224{
225 public:
226 // (node, coordinate)
227 using View = Kokkos::View<double* [3], kokkos_layout, kokkos_host>;
228
229 Field(const std::string& name, int num_entries) : FieldBase(name, FieldType::HostVectorNode), data_(name, num_entries)
230 {
231 }
232
233 Field(View const& v) : FieldBase(v.label(), FieldType::HostVectorNode), data_(v) {}
234
235 View
236 data() const noexcept
237 {
238 return data_;
239 }
240
241 private:
242 View data_;
243};
244
245template <>
247{
248 public:
249 // (node, coordinate)
250 using View = Kokkos::View<double* [3], kokkos_layout, kokkos_device>;
251 using AtomicView = Kokkos::View<double* [3], kokkos_layout, kokkos_device, Kokkos::MemoryTraits<Kokkos::Atomic>>;
252 using GatheredView = Kokkos::View<double* [NUM_NODES_IN_HEX][3], kokkos_layout, kokkos_device>;
253 using GatheredSubView = decltype(Kokkos::subview(*(GatheredView*)(0), (int)(0), Kokkos::ALL, Kokkos::ALL));
254
255 Field(const std::string& name, int num_entries)
256 : FieldBase(name, FieldType::DeviceVectorNode), data_(name, num_entries)
257 {
258 }
259
260 Field(View const& v) : FieldBase(v.label(), FieldType::DeviceVectorNode), data_(v) {}
261
262 View
263 data() const noexcept
264 {
265 return data_;
266 }
267
268 private:
269 View data_;
270};
271
272template <>
274{
275 public:
276 // (elem, ipt, tensor_index)
277 using View = Kokkos::View<double* [NUM_INTEGRATION_POINTS_IN_HEX][6], kokkos_layout, kokkos_host>;
278
279 Field(const std::string& name, int num_entries)
280 : FieldBase(name, FieldType::HostSymTensorIntPt), data_(name, num_entries)
281 {
282 }
283
284 Field(View const& v) : FieldBase(v.label(), FieldType::HostSymTensorIntPt), data_(v) {}
285
286 View
287 data() const noexcept
288 {
289 return data_;
290 }
291
292 private:
293 View data_;
294};
295
296template <>
298{
299 public:
300 // (elem, ipt, tensor_index)
301 using View = Kokkos::View<double* [NUM_INTEGRATION_POINTS_IN_HEX][6], kokkos_layout, kokkos_device>;
302 using SubView = decltype(Kokkos::subview(*(View*)(0), (int)(0), Kokkos::ALL, Kokkos::ALL));
303 using SingleEntryView = decltype(Kokkos::subview(*(View*)(0), (int)(0), (int)(0), Kokkos::ALL));
304
305 Field(const std::string& name, int num_entries)
306 : FieldBase(name, FieldType::DeviceSymTensorIntPt), data_(name, num_entries)
307 {
308 }
309
310 Field(View const& v) : FieldBase(v.label(), FieldType::DeviceSymTensorIntPt), data_(v) {}
311
312 View
313 data() const noexcept
314 {
315 return data_;
316 }
317
318 private:
319 View data_;
320};
321
322template <>
324{
325 public:
326 // (elem, ipt, tensor_index)
327 using View = Kokkos::View<double* [NUM_INTEGRATION_POINTS_IN_HEX][9], kokkos_layout, kokkos_host>;
328
329 Field(const std::string& name, int num_entries)
330 : FieldBase(name, FieldType::HostFullTensorIntPt), data_(name, num_entries)
331 {
332 }
333
334 Field(View const& v) : FieldBase(v.label(), FieldType::HostFullTensorIntPt), data_(v) {}
335
336 View
337 data() const noexcept
338 {
339 return data_;
340 }
341
342 private:
343 View data_;
344};
345
346template <>
348{
349 public:
350 // (elem, ipt, tensor_index)
351 using View = Kokkos::View<double* [NUM_INTEGRATION_POINTS_IN_HEX][9], kokkos_layout, kokkos_device>;
352 using SubView = decltype(Kokkos::subview(*(View*)(0), (int)(0), Kokkos::ALL, Kokkos::ALL));
353 using SingleEntryView = decltype(Kokkos::subview(*(View*)(0), (int)(0), (int)(0), Kokkos::ALL));
354
355 Field(const std::string& name, int num_entries)
356 : FieldBase(name, FieldType::DeviceFullTensorIntPt), data_(name, num_entries)
357 {
358 }
359
360 Field(View const& v) : FieldBase(v.label(), FieldType::DeviceFullTensorIntPt), data_(v) {}
361
362 View
363 data() const noexcept
364 {
365 return data_;
366 }
367
368 private:
369 View data_;
370};
371
372template <>
374{
375 public:
376 // (elem, ipt, scalar)
377 using View = Kokkos::View<double* [NUM_INTEGRATION_POINTS_IN_HEX][1], kokkos_layout, kokkos_device>;
378 using SubView = decltype(Kokkos::subview(*(View*)(0), (int)(0), Kokkos::ALL, Kokkos::ALL));
379 using SingleEntryView = decltype(Kokkos::subview(*(View*)(0), (int)(0), (int)(0), Kokkos::ALL));
380
381 Field(const std::string& name, int num_entries)
382 : FieldBase(name, FieldType::DeviceFullTensorIntPt), data_(name, num_entries)
383 {
384 }
385
386 Field(View const& v) : FieldBase(v.label(), FieldType::DeviceFullTensorIntPt), data_(v) {}
387
388 View
389 data() const noexcept
390 {
391 return data_;
392 }
393
394 private:
395 View data_;
396};
397
398template <>
400{
401 public:
402 // (elem, ipt, vector_index)
403 using View = Kokkos::View<double* [NUM_INTEGRATION_POINTS_IN_HEX][3], kokkos_layout, kokkos_device>;
404 using SubView = decltype(Kokkos::subview(*(View*)(0), (int)(0), Kokkos::ALL, Kokkos::ALL));
405 using SingleEntryView = decltype(Kokkos::subview(*(View*)(0), (int)(0), (int)(0), Kokkos::ALL));
406
407 Field(const std::string& name, int num_entries)
408 : FieldBase(name, FieldType::DeviceFullTensorIntPt), data_(name, num_entries)
409 {
410 }
411
412 Field(View const& v) : FieldBase(v.label(), FieldType::DeviceFullTensorIntPt), data_(v) {}
413
414 View
415 data() const noexcept
416 {
417 return data_;
418 }
419
420 private:
421 View data_;
422};
423
424template <>
426{
427 public:
428 // (elem)
429 using View = Kokkos::View<double*, kokkos_host>;
430
431 Field(const std::string& name, int num_entries) : FieldBase(name, FieldType::HostScalarElem), data_(name, num_entries)
432 {
433 }
434
435 Field(View const& v) : FieldBase(v.label(), FieldType::HostScalarElem), data_(v) {}
436
437 View
438 data() const noexcept
439 {
440 return data_;
441 }
442
443 private:
444 View data_;
445};
446
447template <>
449{
450 public:
451 // (node)
452 using View = Kokkos::View<double*, kokkos_layout, kokkos_device>;
453 using SingleEntryView = decltype(Kokkos::subview(*(View*)(0), (int)(0)));
454
455 Field(const std::string& name, int num_entries)
456 : FieldBase(name, FieldType::DeviceScalarElem), data_(name, num_entries)
457 {
458 }
459
460 Field(View const& v) : FieldBase(v.label(), FieldType::DeviceScalarElem), data_(v) {}
461
462 View
463 data() const noexcept
464 {
465 return data_;
466 }
467
468 private:
469 View data_;
470};
471
472template <>
474{
475 public:
476 // (elem, ipt, tensor_index)
477 using View = Kokkos::View<double* [9], kokkos_layout, kokkos_host>;
478
479 Field(const std::string& name, int num_entries)
480 : FieldBase(name, FieldType::HostFullTensorElem), data_(name, num_entries)
481 {
482 }
483
484 Field(View const& v) : FieldBase(v.label(), FieldType::HostFullTensorElem), data_(v) {}
485
486 View
487 data() const noexcept
488 {
489 return data_;
490 }
491
492 private:
493 View data_;
494};
495
496template <>
498{
499 public:
500 // (elem, ipt, tensor_index)
501 using View = Kokkos::View<double* [9], kokkos_layout, kokkos_device>;
502 using SingleEntryView = decltype(Kokkos::subview(*(View*)(0), (int)(0), Kokkos::ALL));
503
504 Field(const std::string& name, int num_entries)
505 : FieldBase(name, FieldType::DeviceFullTensorElem), data_(name, num_entries)
506 {
507 }
508
509 Field(View const& v) : FieldBase(v.label(), FieldType::DeviceFullTensorElem), data_(v) {}
510
511 View
512 data() const noexcept
513 {
514 return data_;
515 }
516
517 private:
518 View data_;
519};
520
521template <>
523{
524 public:
525 // (elem, ipt, tensor_index)
526 using View = Kokkos::View<double* [6], kokkos_layout, kokkos_host>;
527
528 Field(const std::string& name, int num_entries)
529 : FieldBase(name, FieldType::HostSymTensorElem), data_(name, num_entries)
530 {
531 }
532
533 Field(View const& v) : FieldBase(v.label(), FieldType::HostSymTensorElem), data_(v) {}
534
535 View
536 data() const noexcept
537 {
538 return data_;
539 }
540
541 private:
542 View data_;
543};
544
545template <>
547{
548 public:
549 // (elem, ipt, tensor_index)
550 using View = Kokkos::View<double* [6], kokkos_layout, kokkos_device>;
551 using SingleEntryView = decltype(Kokkos::subview(*(View*)(0), (int)(0), Kokkos::ALL));
552
553 Field(const std::string& name, int num_entries)
554 : FieldBase(name, FieldType::DeviceSymTensorElem), data_(name, num_entries)
555 {
556 }
557
558 Field(View const& v) : FieldBase(v.label(), FieldType::DeviceSymTensorElem), data_(v) {}
559
560 View
561 data() const noexcept
562 {
563 return data_;
564 }
565
566 private:
567 View data_;
568};
569
577typedef Kokkos::View<int*, kokkos_host> HostIntegerArrayView;
578typedef Kokkos::View<int*, kokkos_host> HostElementConnectivityView; // TODO THIS SHOULD BE A 2D ARRAY, BUT IT'S
579 // TRICKY BECAUSE NUM NODES PER ELEMENT IS NOT
580 // KNOWN
581
606typedef Kokkos::View<int*, kokkos_device> DeviceIntegerArrayView;
607typedef Kokkos::View<int*, kokkos_device> DeviceElementConnectivityView;
608} // namespace nimble_kokkos
609
610// endif for NIMBLE_KOKKOS_DEFS_H
611#endif
Field(View const &v)
Definition nimble_kokkos_defs.h:509
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:504
decltype(Kokkos::subview(*(View *)(0),(int)(0), Kokkos::ALL)) SingleEntryView
Definition nimble_kokkos_defs.h:502
View data() const noexcept
Definition nimble_kokkos_defs.h:512
Kokkos::View< double *[9], kokkos_layout, kokkos_device > View
Definition nimble_kokkos_defs.h:501
decltype(Kokkos::subview(*(View *)(0),(int)(0), Kokkos::ALL, Kokkos::ALL)) SubView
Definition nimble_kokkos_defs.h:352
Field(View const &v)
Definition nimble_kokkos_defs.h:360
Kokkos::View< double *[NUM_INTEGRATION_POINTS_IN_HEX][9], kokkos_layout, kokkos_device > View
Definition nimble_kokkos_defs.h:351
View data() const noexcept
Definition nimble_kokkos_defs.h:363
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:355
decltype(Kokkos::subview(*(View *)(0),(int)(0),(int)(0), Kokkos::ALL)) SingleEntryView
Definition nimble_kokkos_defs.h:353
Kokkos::View< double *, kokkos_layout, kokkos_device > View
Definition nimble_kokkos_defs.h:452
decltype(Kokkos::subview(*(View *)(0),(int)(0))) SingleEntryView
Definition nimble_kokkos_defs.h:453
View data() const noexcept
Definition nimble_kokkos_defs.h:463
Field(View const &v)
Definition nimble_kokkos_defs.h:460
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:455
decltype(Kokkos::subview(*(View *)(0),(int)(0), Kokkos::ALL, Kokkos::ALL)) SubView
Definition nimble_kokkos_defs.h:378
View data() const noexcept
Definition nimble_kokkos_defs.h:389
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:381
Field(View const &v)
Definition nimble_kokkos_defs.h:386
Kokkos::View< double *[NUM_INTEGRATION_POINTS_IN_HEX][1], kokkos_layout, kokkos_device > View
Definition nimble_kokkos_defs.h:377
decltype(Kokkos::subview(*(View *)(0),(int)(0),(int)(0), Kokkos::ALL)) SingleEntryView
Definition nimble_kokkos_defs.h:379
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:205
Field(View const &v)
Definition nimble_kokkos_defs.h:210
View data() const noexcept
Definition nimble_kokkos_defs.h:213
decltype(Kokkos::subview(*(GatheredView *)(0),(int)(0), Kokkos::ALL)) GatheredSubView
Definition nimble_kokkos_defs.h:203
Kokkos::View< double *[NUM_NODES_IN_HEX], kokkos_layout, kokkos_device > GatheredView
Definition nimble_kokkos_defs.h:202
Kokkos::View< double *, kokkos_layout, kokkos_device, Kokkos::MemoryTraits< Kokkos::Atomic > > AtomicView
Definition nimble_kokkos_defs.h:201
Kokkos::View< double *, kokkos_layout, kokkos_device > View
Definition nimble_kokkos_defs.h:200
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:553
View data() const noexcept
Definition nimble_kokkos_defs.h:561
Field(View const &v)
Definition nimble_kokkos_defs.h:558
Kokkos::View< double *[6], kokkos_layout, kokkos_device > View
Definition nimble_kokkos_defs.h:550
decltype(Kokkos::subview(*(View *)(0),(int)(0), Kokkos::ALL)) SingleEntryView
Definition nimble_kokkos_defs.h:551
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:305
Field(View const &v)
Definition nimble_kokkos_defs.h:310
decltype(Kokkos::subview(*(View *)(0),(int)(0),(int)(0), Kokkos::ALL)) SingleEntryView
Definition nimble_kokkos_defs.h:303
Kokkos::View< double *[NUM_INTEGRATION_POINTS_IN_HEX][6], kokkos_layout, kokkos_device > View
Definition nimble_kokkos_defs.h:301
decltype(Kokkos::subview(*(View *)(0),(int)(0), Kokkos::ALL, Kokkos::ALL)) SubView
Definition nimble_kokkos_defs.h:302
View data() const noexcept
Definition nimble_kokkos_defs.h:313
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:407
decltype(Kokkos::subview(*(View *)(0),(int)(0),(int)(0), Kokkos::ALL)) SingleEntryView
Definition nimble_kokkos_defs.h:405
Field(View const &v)
Definition nimble_kokkos_defs.h:412
Kokkos::View< double *[NUM_INTEGRATION_POINTS_IN_HEX][3], kokkos_layout, kokkos_device > View
Definition nimble_kokkos_defs.h:403
View data() const noexcept
Definition nimble_kokkos_defs.h:415
decltype(Kokkos::subview(*(View *)(0),(int)(0), Kokkos::ALL, Kokkos::ALL)) SubView
Definition nimble_kokkos_defs.h:404
View data() const noexcept
Definition nimble_kokkos_defs.h:263
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:255
decltype(Kokkos::subview(*(GatheredView *)(0),(int)(0), Kokkos::ALL, Kokkos::ALL)) GatheredSubView
Definition nimble_kokkos_defs.h:253
Kokkos::View< double *[3], kokkos_layout, kokkos_device, Kokkos::MemoryTraits< Kokkos::Atomic > > AtomicView
Definition nimble_kokkos_defs.h:251
Kokkos::View< double *[3], kokkos_layout, kokkos_device > View
Definition nimble_kokkos_defs.h:250
Kokkos::View< double *[NUM_NODES_IN_HEX][3], kokkos_layout, kokkos_device > GatheredView
Definition nimble_kokkos_defs.h:252
Field(View const &v)
Definition nimble_kokkos_defs.h:260
View data() const noexcept
Definition nimble_kokkos_defs.h:487
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:479
Field(View const &v)
Definition nimble_kokkos_defs.h:484
Kokkos::View< double *[9], kokkos_layout, kokkos_host > View
Definition nimble_kokkos_defs.h:477
View data() const noexcept
Definition nimble_kokkos_defs.h:337
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:329
Field(View const &v)
Definition nimble_kokkos_defs.h:334
Kokkos::View< double *[NUM_INTEGRATION_POINTS_IN_HEX][9], kokkos_layout, kokkos_host > View
Definition nimble_kokkos_defs.h:327
View data() const noexcept
Definition nimble_kokkos_defs.h:438
Field(View const &v)
Definition nimble_kokkos_defs.h:435
Kokkos::View< double *, kokkos_host > View
Definition nimble_kokkos_defs.h:429
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:431
Kokkos::View< double *, kokkos_host > View
Definition nimble_kokkos_defs.h:177
Field(View const &v)
Definition nimble_kokkos_defs.h:183
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:179
View data() const noexcept
Definition nimble_kokkos_defs.h:186
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:528
View data() const noexcept
Definition nimble_kokkos_defs.h:536
Kokkos::View< double *[6], kokkos_layout, kokkos_host > View
Definition nimble_kokkos_defs.h:526
Field(View const &v)
Definition nimble_kokkos_defs.h:533
Kokkos::View< double *[NUM_INTEGRATION_POINTS_IN_HEX][6], kokkos_layout, kokkos_host > View
Definition nimble_kokkos_defs.h:277
Field(View const &v)
Definition nimble_kokkos_defs.h:284
View data() const noexcept
Definition nimble_kokkos_defs.h:287
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:279
View data() const noexcept
Definition nimble_kokkos_defs.h:236
Field(const std::string &name, int num_entries)
Definition nimble_kokkos_defs.h:229
Field(View const &v)
Definition nimble_kokkos_defs.h:233
Kokkos::View< double *[3], kokkos_layout, kokkos_host > View
Definition nimble_kokkos_defs.h:227
static constexpr int NUM_NODES_IN_HEX
Definition nimble_kokkos_defs.h:161
const std::string & name() const noexcept
Definition nimble_kokkos_defs.h:142
FieldBase(FieldBase &&)=default
virtual ~FieldBase()=default
FieldBase & operator=(FieldBase &&)=default
FieldType type() const noexcept
Definition nimble_kokkos_defs.h:136
FieldBase & operator=(const FieldBase &)=default
FieldBase(const FieldBase &)=default
FieldBase(const std::string &arg_name, const FieldType arg_type)
Definition nimble_kokkos_defs.h:147
static constexpr int NUM_INTEGRATION_POINTS_IN_HEX
Definition nimble_kokkos_defs.h:162
Definition nimble_kokkos_defs.h:170
Definition nimble_contact_manager.h:68
Field< FieldType::HostScalarElem >::View HostScalarElemView
Definition nimble_kokkos_defs.h:574
Field< FieldType::HostFullTensorElem >::View HostFullTensorElemView
Definition nimble_kokkos_defs.h:575
Field< FieldType::DeviceScalarElem >::SingleEntryView DeviceScalarElemSingleEntryView
Definition nimble_kokkos_defs.h:601
Field< FieldType::DeviceScalarElem >::View DeviceScalarElemView
Definition nimble_kokkos_defs.h:600
Field< FieldType::DeviceFullTensorIntPt >::SubView DeviceFullTensorIntPtSubView
Definition nimble_kokkos_defs.h:589
Kokkos::Device< kokkos_device_execution_space, kokkos_device_memory_space > kokkos_device
Definition nimble_kokkos_defs.h:84
std::ostream & operator<<(std::ostream &out, const FieldType f)
Definition nimble_kokkos_defs.h:109
Field< FieldType::DeviceSymTensorElem >::SingleEntryView DeviceSymTensorElemSingleEntryView
Definition nimble_kokkos_defs.h:605
Field< FieldType::DeviceFullTensorElem >::SingleEntryView DeviceFullTensorElemSingleEntryView
Definition nimble_kokkos_defs.h:603
Field< FieldType::DeviceSymTensorIntPt >::SingleEntryView DeviceSymTensorIntPtSingleEntryView
Definition nimble_kokkos_defs.h:593
Kokkos::Device< kokkos_host_execution_space, kokkos_host_mirror_memory_space > kokkos_host
Definition nimble_kokkos_defs.h:65
Field< FieldType::HostScalarNode >::View HostScalarNodeView
Definition nimble_kokkos_defs.h:570
Field< FieldType::HostVectorNode >::View HostVectorNodeView
Definition nimble_kokkos_defs.h:571
Field< FieldType::DeviceVectorIntPt >::View DeviceVectorIntPtView
Definition nimble_kokkos_defs.h:597
Field< FieldType::DeviceVectorIntPt >::SubView DeviceVectorIntPtSubView
Definition nimble_kokkos_defs.h:598
Field< FieldType::DeviceScalarIntPt >::View DeviceScalarIntPtView
Definition nimble_kokkos_defs.h:594
Field< FieldType::DeviceVectorNode >::View DeviceVectorNodeView
Definition nimble_kokkos_defs.h:585
Field< FieldType::HostSymTensorElem >::View HostSymTensorElemView
Definition nimble_kokkos_defs.h:576
Kokkos::View< int *, kokkos_host > HostElementConnectivityView
Definition nimble_kokkos_defs.h:578
Kokkos::Serial::execution_space kokkos_device_execution_space
Definition nimble_kokkos_defs.h:81
Field< FieldType::DeviceVectorIntPt >::SingleEntryView DeviceVectorIntPtSingleEntryView
Definition nimble_kokkos_defs.h:599
Field< FieldType::DeviceSymTensorIntPt >::View DeviceSymTensorIntPtView
Definition nimble_kokkos_defs.h:591
Field< FieldType::DeviceScalarNode >::GatheredView DeviceScalarNodeGatheredView
Definition nimble_kokkos_defs.h:583
kokkos_device_execution_space::array_layout kokkos_layout
Definition nimble_kokkos_defs.h:86
Field< FieldType::HostFullTensorIntPt >::View HostFullTensorIntPtView
Definition nimble_kokkos_defs.h:572
Kokkos::View< int *, kokkos_device > DeviceElementConnectivityView
Definition nimble_kokkos_defs.h:607
Field< FieldType::DeviceVectorNode >::GatheredSubView DeviceVectorNodeGatheredSubView
Definition nimble_kokkos_defs.h:587
Field< FieldType::DeviceScalarNode >::GatheredSubView DeviceScalarNodeGatheredSubView
Definition nimble_kokkos_defs.h:584
Field< FieldType::DeviceFullTensorElem >::View DeviceFullTensorElemView
Definition nimble_kokkos_defs.h:602
Field< FieldType::DeviceSymTensorIntPt >::SubView DeviceSymTensorIntPtSubView
Definition nimble_kokkos_defs.h:592
Field< FieldType::DeviceScalarIntPt >::SubView DeviceScalarIntPtSubView
Definition nimble_kokkos_defs.h:595
Field< FieldType::DeviceScalarNode >::View DeviceScalarNodeView
Definition nimble_kokkos_defs.h:582
Kokkos::Serial::memory_space kokkos_host_mirror_memory_space
Definition nimble_kokkos_defs.h:63
Field< FieldType::DeviceSymTensorElem >::View DeviceSymTensorElemView
Definition nimble_kokkos_defs.h:604
Kokkos::View< int *, kokkos_device > DeviceIntegerArrayView
Definition nimble_kokkos_defs.h:606
FieldType
Definition nimble_kokkos_defs.h:89
@ DeviceFullTensorIntPt
Definition nimble_kokkos_defs.h:97
@ DeviceFullTensorElem
Definition nimble_kokkos_defs.h:105
@ DeviceScalarElem
Definition nimble_kokkos_defs.h:101
@ DeviceSymTensorElem
Definition nimble_kokkos_defs.h:103
@ DeviceScalarIntPt
Definition nimble_kokkos_defs.h:98
@ DeviceScalarNode
Definition nimble_kokkos_defs.h:91
@ HostSymTensorElem
Definition nimble_kokkos_defs.h:102
@ DeviceVectorNode
Definition nimble_kokkos_defs.h:93
@ DeviceSymTensorIntPt
Definition nimble_kokkos_defs.h:95
@ HostScalarNode
Definition nimble_kokkos_defs.h:90
@ HostVectorNode
Definition nimble_kokkos_defs.h:92
@ HostFullTensorElem
Definition nimble_kokkos_defs.h:104
@ HostSymTensorIntPt
Definition nimble_kokkos_defs.h:94
@ HostScalarElem
Definition nimble_kokkos_defs.h:100
@ HostFullTensorIntPt
Definition nimble_kokkos_defs.h:96
@ DeviceVectorIntPt
Definition nimble_kokkos_defs.h:99
Field< FieldType::DeviceScalarIntPt >::SingleEntryView DeviceScalarIntPtSingleEntryView
Definition nimble_kokkos_defs.h:596
Field< FieldType::DeviceFullTensorIntPt >::SingleEntryView DeviceFullTensorIntPtSingleEntryView
Definition nimble_kokkos_defs.h:590
Field< FieldType::DeviceVectorNode >::GatheredView DeviceVectorNodeGatheredView
Definition nimble_kokkos_defs.h:586
Kokkos::Serial::memory_space kokkos_device_memory_space
Definition nimble_kokkos_defs.h:82
Kokkos::View< int *, kokkos_host > HostIntegerArrayView
Definition nimble_kokkos_defs.h:577
Kokkos::Serial::execution_space kokkos_host_execution_space
Definition nimble_kokkos_defs.h:62
Field< FieldType::DeviceFullTensorIntPt >::View DeviceFullTensorIntPtView
Definition nimble_kokkos_defs.h:588
Field< FieldType::HostSymTensorIntPt >::View HostSymTensorIntPtView
Definition nimble_kokkos_defs.h:573