PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
anonymous_namespace{testDeckField.cpp}::SampleDeck Struct Reference

A deck with one field of each kind the tables have to handle. More...

Collaboration diagram for anonymous_namespace{testDeckField.cpp}::SampleDeck:

Static Public Member Functions

static const std::vector< inp::Field< SampleDeck > > & fields ()
 

Data Fields

std::size_t d_count = 2
 
double d_length = 1.5
 
std::string d_method = "central_difference"
 
bool d_write = true
 
double d_optional = -1.
 

Detailed Description

A deck with one field of each kind the tables have to handle.

Definition at line 54 of file testDeckField.cpp.

Member Function Documentation

◆ fields()

static const std::vector< inp::Field< SampleDeck > > & anonymous_namespace{testDeckField.cpp}::SampleDeck::fields ( )
inlinestatic

Definition at line 61 of file testDeckField.cpp.

61 {
62 static const std::vector<inp::Field<SampleDeck>> f = {
63 inp::field(&SampleDeck::d_count, "Count", std::size_t(2),
64 "How many of them", {{}, std::size_t(1), std::size_t(3)}),
65 inp::field(&SampleDeck::d_length, "Length", 1.5, "Length of the side"),
67 std::string("central_difference"), "Time discretization",
68 {{"central_difference", "velocity_verlet"}, {}, {}}),
69 inp::field(&SampleDeck::d_write, "Write", true, "Write the output"),
70 // Absent from the block when it is not positive, which is how the
71 // decks treat a value that another field supplies instead.
72 inp::field<SampleDeck, double>(
73 &SampleDeck::d_optional, "Optional", -1., "Set only when positive",
74 {}, [](const double &v) { return v > 0.; }),
75 };
76 return f;
77 }
Field< Deck > field(T Deck::*m, std::string key, T def, std::string doc, Accepts< T > accepts={}, std::function< bool(const T &)> emitIf=[](const T &) { return true;})
Declares a field that maps one key to one member.
Definition deckField.h:144

References d_count, d_length, d_method, d_optional, d_write, and inp::field().

Referenced by anonymous_namespace{testDeckField.cpp}::testAccepted(), anonymous_namespace{testDeckField.cpp}::testDefaultsAndSchema(), anonymous_namespace{testDeckField.cpp}::testKeysAreNamed(), anonymous_namespace{testDeckField.cpp}::testPrint(), anonymous_namespace{testDeckField.cpp}::testReadAndWrite(), and anonymous_namespace{testDeckField.cpp}::testValuesCheckedWhenBuilt().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ d_count

std::size_t anonymous_namespace{testDeckField.cpp}::SampleDeck::d_count = 2

◆ d_length

double anonymous_namespace{testDeckField.cpp}::SampleDeck::d_length = 1.5

Definition at line 56 of file testDeckField.cpp.

Referenced by fields().

◆ d_method

std::string anonymous_namespace{testDeckField.cpp}::SampleDeck::d_method = "central_difference"

Definition at line 57 of file testDeckField.cpp.

Referenced by fields().

◆ d_optional

double anonymous_namespace{testDeckField.cpp}::SampleDeck::d_optional = -1.

Definition at line 59 of file testDeckField.cpp.

Referenced by fields().

◆ d_write

bool anonymous_namespace{testDeckField.cpp}::SampleDeck::d_write = true

Definition at line 58 of file testDeckField.cpp.

Referenced by fields().


The documentation for this struct was generated from the following file: