PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
pNeighborDeck.h
Go to the documentation of this file.
1/*
2 * -------------------------------------------
3 * Copyright (c) 2021 - 2024 Prashant K. Jha
4 * -------------------------------------------
5 * PeriDEM https://github.com/prashjha/PeriDEM
6 *
7 * Distributed under the Boost Software License, Version 1.0. (See accompanying
8 * file LICENSE)
9 */
10
11#ifndef INP_PNEIGHBORDECK_H
12#define INP_PNEIGHBORDECK_H
13
14#include "util/io.h"
15
16namespace inp {
17
22
24 std::string d_updateCriteria;
25
28 double d_sFactor;
29
33 double d_sTol;
34
37
42 : d_updateCriteria("simple_all"),
43 d_sFactor(1.),
44 d_sTol(0.),
46
54 std::string printStr(int nt = 0, int lvl = 0) const {
55
56 auto tabS = util::io::getTabS(nt);
57 std::ostringstream oss;
58 oss << tabS << "------- PNeighborDeck --------" << std::endl << std::endl;
59 oss << tabS << "Update criteria = " << d_updateCriteria << std::endl;
60 oss << tabS << "Search factor = " << d_sFactor << std::endl;
61 oss << tabS << "Search tolerance = " << d_sTol << std::endl;
62 oss << tabS << "Search update interval = " << d_neighUpdateInterval << std::endl;
63 oss << tabS << std::endl;
64
65 return oss.str();
66 }
67
74 void print(int nt = 0, int lvl = 0) const { std::cout << printStr(nt, lvl); }
75};
76
79} // namespace inp
80
81#endif // INP_PNEIGHBORDECK_H
Collection of methods and database related to input.
Definition mesh.h:20
std::string getTabS(int nt)
Returns tab spaces of given size.
Definition io.h:40
User-input data for particle neighbor search.
PNeighborDeck()
Constructor.
void print(int nt=0, int lvl=0) const
Prints the information about the object.
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
double d_sTol
Neighbor search tolerance.
std::string d_updateCriteria
Neighbor search update criteria (if any)
double d_sFactor
Neighbor search factor (search length is factor times biggest radius of particle)
size_t d_neighUpdateInterval
Neighbor update time interval (for contact)