Nalu
Nalu: a generalized unstructured massively parallel low Mach flow code designed to support a variety of energy applications of interest (most notably Wind ECP) built on the Sierra Toolkit and Trilinos solver Tpetra/Epetra stack. The open source BSD, clause 3 license model has been chosen for the code base. See LICENSE for more information. http://NaluCFD.org
BucketLoop.h
Go to the documentation of this file.
1 /*------------------------------------------------------------------------*/
2 /* Copyright 2014 Sandia Corporation. */
3 /* This software is released under the license detailed */
4 /* in the file, LICENSE, which is located in the top-level NaluUnit */
5 /* directory structure */
6 /*------------------------------------------------------------------------*/
7 #ifndef BucketLoop_h
8 #define BucketLoop_h
9 
10 #include <stk_mesh/base/Bucket.hpp>
11 
12 namespace sierra { namespace nalu {
13 
14  template<class LOOP_BODY>
15  void bucket_loop(const stk::mesh::BucketVector& buckets, LOOP_BODY inner_loop_body)
16  {
17  for (const stk::mesh::Bucket* bptr : buckets) {
18  const stk::mesh::Bucket& bkt = *bptr;
19  for(size_t j=0; j<bkt.size(); ++j) {
20  inner_loop_body(bkt[j]);
21  }
22  }
23  }
24 
25 }}
26 
27 #endif
Definition: ABLForcingAlgorithm.C:26
std::vector< Bucket * > BucketVector
Definition: PromotedPartHelper.h:21
void bucket_loop(const stk::mesh::BucketVector &buckets, LOOP_BODY inner_loop_body)
Definition: BucketLoop.h:15