11 namespace BoundaryCondition
16 const unsigned int simulationBoxSizeX,
17 const unsigned int simulationBoxSizeY,
18 const unsigned int simulationBoxSizeZ)
24 "No boundary condition configured.");
29 if( config.
read<std::string>(
"type") !=
"Lees-Edwards"
31 !config.
has(
"shearRate"))
35 "Boundary condition configuration malformed.");
38 std::cout <<
"Warning: This style of boundary condition configuration ";
39 std::cout <<
"is deprecated.\n";
42 newConfig.
set(
"LeesEdwards.shearRate", config.
read<
FP>(
"shearRate"));
45 simulationBoxSizeX, simulationBoxSizeY, simulationBoxSizeZ);
52 "Boundary condition configuration malformed.");
56 if(config.
has(
"LeesEdwards"))
60 simulationBoxSizeX, simulationBoxSizeY, simulationBoxSizeZ);
65 "Unknown boundary condition configured.");
const Setting getSetting(const std::string &name) const
Returns the setting object with the given name.
static BoundaryCondition::Base * getInstance(const Configuration::Setting &config, const unsigned int simulationBoxSizeX, const unsigned int simulationBoxSizeY, const unsigned int simulationBoxSizeZ)
Returns a newly constructed boundary condition instance.
std::size_t getChildCount() const
Returns the number of direct child settings in this setting.
Represents the configuration of the simulation.
#define OPENMPCD_THROW(ExceptionType, message)
Throws the given ExceptionType, passing the given message along with file and line number information...
Lees-Edwards boundary conditions.
bool has(const std::string &settingName) const
Returns whether a setting with the given name exists.
const Setting getSetting(const std::string &name) const
Returns the setting object with the given name.
void set(const std::string &setting, const ValueType value)
Sets a setting's value.
double FP
Default floating point type.
Represents a setting in the configuration.
Represents an invalid configuration.
Base class for boundary condition.
void read(const std::string &name, ValueType *const value) const
Reads the specified setting and stores it at the given location.