NLMech  0.1.0
interiorFlagsDeck.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_INTERIORFLAGSDECK_H
10 #define INP_INTERIORFLAGSDECK_H
11 
12 #include "util/utilIO.h"
13 
14 namespace inp {
15 
26 
29 
33 
35  double d_noFailTol;
36 
38  std::vector<std::pair<std::string, std::vector<double>>> d_noFailRegions;
39 
45  d_noFailTol(0.){};
46 
56  std::string printStr(int nt = 0, int lvl = 0) const {
57  auto tabS = util::io::getTabS(nt);
58  std::ostringstream oss;
59  oss << tabS << "------- InteriorFlagsDeck --------" << std::endl << std::endl;
60  oss << tabS << "No-fail method active = " << d_noFailActive << std::endl;
61  oss << tabS << "Compute flags on-the-fly = " << d_computeAndNotStoreFlag << std::endl;
62  oss << tabS << "No-fail region tol = " << d_noFailTol <<
63  std::endl;
64  oss << tabS << std::endl;
65 
66  return oss.str();
67  };
68 
76  void print(int nt = 0, int lvl = 0) const { std::cout << printStr(nt, lvl); };
77 };
78 
81 } // namespace inp
82 
83 #endif // INP_INTERIORFLAGSDECK_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 input data for interior flags (no-fail region)
Definition: interiorFlagsDeck.h:25
double d_noFailTol
Tolerance to decide if the point is in interior/exterior.
Definition: interiorFlagsDeck.h:35
InteriorFlagsDeck()
Constructor.
Definition: interiorFlagsDeck.h:43
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing information about the instance of the object.
Definition: interiorFlagsDeck.h:56
bool d_computeAndNotStoreFlag
Flag which indicates if we compute the flag inline instead of storing it. This is effective only if d...
Definition: interiorFlagsDeck.h:32
void print(int nt=0, int lvl=0) const
Prints the information about the instance of the object.
Definition: interiorFlagsDeck.h:76
std::vector< std::pair< std::string, std::vector< double > > > d_noFailRegions
Specify multiple regions in which we set no-fail flag to true.
Definition: interiorFlagsDeck.h:38
bool d_noFailActive
Flag which indicates if no-fail region is active.
Definition: interiorFlagsDeck.h:28