Remove unnecessary classes
This commit is contained in:
@ -192,22 +192,12 @@ void data_lammps(LAMMPS_NS::LAMMPS *lmp, const TestConfig &cfg)
|
|||||||
lmp->input->one("run 0 post no");
|
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
|
// read/parse yaml file
|
||||||
|
|
||||||
bool read_yaml_file(const char *infile, TestConfig &config)
|
bool read_yaml_file(const char *infile, TestConfig &config)
|
||||||
{
|
{
|
||||||
auto reader = AngleConfigReader(config);
|
auto reader = TestConfigReader(config);
|
||||||
if (reader.parse_file(infile))
|
if (reader.parse_file(infile))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@ -194,22 +194,11 @@ void data_lammps(LAMMPS_NS::LAMMPS *lmp, const TestConfig &cfg)
|
|||||||
lmp->input->one("run 0 post no");
|
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
|
// read/parse yaml file
|
||||||
|
|
||||||
bool read_yaml_file(const char *infile, TestConfig &config)
|
bool read_yaml_file(const char *infile, TestConfig &config)
|
||||||
{
|
{
|
||||||
auto reader = BondConfigReader(config);
|
auto reader = TestConfigReader(config);
|
||||||
if (reader.parse_file(infile))
|
if (reader.parse_file(infile))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@ -40,6 +40,16 @@ TestConfigReader::TestConfigReader(TestConfig & config)
|
|||||||
consumers["run_stress"] = &TestConfigReader::run_stress;
|
consumers["run_stress"] = &TestConfigReader::run_stress;
|
||||||
consumers["init_forces"] = &TestConfigReader::init_forces;
|
consumers["init_forces"] = &TestConfigReader::init_forces;
|
||||||
consumers["run_forces"] = &TestConfigReader::run_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) {
|
void TestConfigReader::prerequisites(const yaml_event_t & event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user