mirror of
https://github.com/CHN-beta/ufo.git
synced 2024-10-22 19:58:44 +08:00
plot: rename Source to UnfoldedData
This commit is contained in:
parent
f1720c425d
commit
7cf384bf6c
@ -23,13 +23,13 @@ namespace ufo
|
||||
};
|
||||
std::vector<FigureConfigType> Figures;
|
||||
|
||||
struct SourceType : public UnfoldSolver::OutputType
|
||||
struct UnfoldedDataType : public UnfoldSolver::OutputType
|
||||
{
|
||||
SourceType(std::string filename);
|
||||
SourceType() = default;
|
||||
UnfoldedDataType(std::string filename);
|
||||
UnfoldedDataType() = default;
|
||||
};
|
||||
std::string SourceFilename;
|
||||
SourceType Source;
|
||||
std::string UnfoldedDataFilename;
|
||||
UnfoldedDataType UnfoldedData;
|
||||
|
||||
InputType(std::string config_file);
|
||||
};
|
||||
@ -56,7 +56,7 @@ namespace ufo
|
||||
static std::vector<std::reference_wrapper<const UnfoldSolver::OutputType::QpointDataType>> search_qpoints
|
||||
(
|
||||
const std::pair<Eigen::Vector3d, Eigen::Vector3d>& path,
|
||||
const decltype(InputType::SourceType::QpointData)& available_qpoints,
|
||||
const decltype(InputType::UnfoldedDataType::QpointData)& available_qpoints,
|
||||
double threshold, bool exclude_endpoint = false
|
||||
);
|
||||
// 根据搜索到的 q 点, 计算每个点的数值
|
||||
|
10
src/plot.cpp
10
src/plot.cpp
@ -2,7 +2,7 @@
|
||||
|
||||
namespace ufo
|
||||
{
|
||||
PlotSolver::InputType::SourceType::SourceType(std::string filename)
|
||||
PlotSolver::InputType::UnfoldedDataType::UnfoldedDataType(std::string filename)
|
||||
{
|
||||
static_cast<UnfoldSolver::OutputType&>(*this) = zpp_read<UnfoldSolver::OutputType>(filename);
|
||||
}
|
||||
@ -49,8 +49,8 @@ namespace ufo
|
||||
}
|
||||
}
|
||||
}
|
||||
SourceFilename = input["SourceFilename"].as<std::string>();
|
||||
Source = SourceType(SourceFilename);
|
||||
UnfoldedDataFilename = input["UnfoldedDataFilename"].as<std::string>();
|
||||
UnfoldedData = UnfoldedDataType(UnfoldedDataFilename);
|
||||
}
|
||||
const PlotSolver::OutputType& PlotSolver::OutputType::write(std::string filename, std::string format) const
|
||||
{
|
||||
@ -85,7 +85,7 @@ namespace ufo
|
||||
lines.emplace_back(path[i], path[i + 1]);
|
||||
qpoints.push_back(search_qpoints
|
||||
(
|
||||
lines.back(), Input_.Source.QpointData,
|
||||
lines.back(), Input_.UnfoldedData.QpointData,
|
||||
0.001, i != path.size() - 2
|
||||
));
|
||||
}
|
||||
@ -113,7 +113,7 @@ namespace ufo
|
||||
std::vector<std::reference_wrapper<const UnfoldSolver::OutputType::QpointDataType>> PlotSolver::search_qpoints
|
||||
(
|
||||
const std::pair<Eigen::Vector3d, Eigen::Vector3d>& path,
|
||||
const decltype(InputType::SourceType::QpointData)& available_qpoints,
|
||||
const decltype(InputType::UnfoldedDataType::QpointData)& available_qpoints,
|
||||
double threshold, bool exclude_endpoint
|
||||
)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user