Remove unnecessary classes

This commit is contained in:
Richard Berger 2020-05-19 23:37:11 -04:00
parent c0acb3a438
commit 50d4cf210c
No known key found for this signature in database
GPG Key ID: A9E83994E0BA0CAB
3 changed files with 12 additions and 23 deletions

View File

@ -192,22 +192,12 @@ void data_lammps(LAMMPS_NS::LAMMPS *lmp, const TestConfig &cfg)
lmp->input->one("run 0 post no");
}
class AngleConfigReader : public TestConfigReader
{
public:
AngleConfigReader(TestConfig &config) : TestConfigReader(config) {
consumers["angle_style"] = &TestConfigReader::angle_style;
consumers["angle_coeff"] = &TestConfigReader::angle_coeff;
consumers["init_energy"] = &TestConfigReader::init_energy;
consumers["run_energy"] = &TestConfigReader::run_energy;
}
};
// read/parse yaml file
bool read_yaml_file(const char *infile, TestConfig &config)
{
auto reader = AngleConfigReader(config);
auto reader = TestConfigReader(config);
if (reader.parse_file(infile))
return false;

View File

@ -194,22 +194,11 @@ void data_lammps(LAMMPS_NS::LAMMPS *lmp, const TestConfig &cfg)
lmp->input->one("run 0 post no");
}
class BondConfigReader : public TestConfigReader
{
public:
BondConfigReader(TestConfig &config) : TestConfigReader(config) {
consumers["bond_style"] = &TestConfigReader::bond_style;
consumers["bond_coeff"] = &TestConfigReader::bond_coeff;
consumers["init_energy"] = &TestConfigReader::init_energy;
consumers["run_energy"] = &TestConfigReader::run_energy;
}
};
// read/parse yaml file
bool read_yaml_file(const char *infile, TestConfig &config)
{
auto reader = BondConfigReader(config);
auto reader = TestConfigReader(config);
if (reader.parse_file(infile))
return false;

View File

@ -40,6 +40,16 @@ TestConfigReader::TestConfigReader(TestConfig & config)
consumers["run_stress"] = &TestConfigReader::run_stress;
consumers["init_forces"] = &TestConfigReader::init_forces;
consumers["run_forces"] = &TestConfigReader::run_forces;
consumers["bond_style"] = &TestConfigReader::bond_style;
consumers["bond_coeff"] = &TestConfigReader::bond_coeff;
consumers["init_energy"] = &TestConfigReader::init_energy;
consumers["run_energy"] = &TestConfigReader::run_energy;
consumers["angle_style"] = &TestConfigReader::angle_style;
consumers["angle_coeff"] = &TestConfigReader::angle_coeff;
consumers["init_energy"] = &TestConfigReader::init_energy;
consumers["run_energy"] = &TestConfigReader::run_energy;
}
void TestConfigReader::prerequisites(const yaml_event_t & event) {