NLMech  0.1.0
neighborDeck.h
1 // Copyright (c) 2019 Prashant K. Jha
3 // Copyright (c) 2019 Patrick Diehl
4 //
5 // Distributed under the Boost Software License, Version 1.0. (See accompanying
6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 
9 #ifndef INP_NEIGHBORDECK_H
10 #define INP_NEIGHBORDECK_H
11 
12 #include "util/utilIO.h"
13 
14 namespace inp {
15 
22 struct NeighborDeck {
23 
26 
36 
41 
51  std::string printStr(int nt = 0, int lvl = 0) const {
52  auto tabS = util::io::getTabS(nt);
53  std::ostringstream oss;
54  oss << tabS << "------- NeighborDeck --------" << std::endl << std::endl;
55  oss << tabS << "Safety factor = " << d_safetyFactor << std::endl;
56  oss << tabS << "Add partially inside elements = " << d_addPartialElems
57  << std::endl;
58  oss << tabS << std::endl;
59 
60  return oss.str();
61  };
62 
70  void print(int nt = 0, int lvl = 0) const { std::cout << printStr(nt, lvl); };
71 };
72 
75 } // namespace inp
76 
77 #endif // INP_NEIGHBORDECK_H
Collection of methods and database related to input.
Definition: main.cpp:21
std::string getTabS(int nt)
Generate a string contaning nt tabs.
Definition: utilIO.h:26
Structure to read and store neighbor list related input data.
Definition: neighborDeck.h:22
bool d_addPartialElems
Flag to include partially inside nodes in neighbor list.
Definition: neighborDeck.h:35
double d_safetyFactor
Safety factor for neighbor list calculation.
Definition: neighborDeck.h:25
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing information about the instance of the object.
Definition: neighborDeck.h:51
NeighborDeck()
Constructor.
Definition: neighborDeck.h:40
void print(int nt=0, int lvl=0) const
Prints the information about the instance of the object.
Definition: neighborDeck.h:70