tmp update
This commit is contained in:
12
lbsi/lbsi.h
12
lbsi/lbsi.h
@@ -62,7 +62,7 @@ public:
|
||||
double epsilon);
|
||||
void ReadConstrainNodes(std::string filename, gctl::text_descriptor &desc);
|
||||
void WriteTargetNodes(std::string filename, const gctl::text_descriptor &desc);
|
||||
void InitTargetNodes(std::string para);
|
||||
void InitTargetNodes(std::string para, gctl::text_descriptor &desc);
|
||||
void CalKernel();
|
||||
void CalKernel(const data_point &tar_node);
|
||||
void UpdateTarVec(size_t idx, bool if_global = true);
|
||||
@@ -106,7 +106,7 @@ void LBSI::Routine(std::string in_name, std::string tar_name,
|
||||
}
|
||||
|
||||
ReadConstrainNodes(in_name, desc);
|
||||
InitTargetNodes(tar_name);
|
||||
InitTargetNodes(tar_name, desc);
|
||||
|
||||
unsigned int k_size = kernel_size;
|
||||
if (k_size <= 1)
|
||||
@@ -233,8 +233,9 @@ void LBSI::Routine(std::string in_name, std::string tar_name,
|
||||
|
||||
void LBSI::ReadConstrainNodes(std::string filename, gctl::text_descriptor &desc)
|
||||
{
|
||||
desc.file_name_ = filename;
|
||||
gctl::_2d_vector table_data;
|
||||
gctl::read_text2vector2d(filename, table_data, desc);
|
||||
gctl::read_text2vector2d(desc, table_data);
|
||||
|
||||
if (table_data.size() <= 1)
|
||||
{
|
||||
@@ -303,13 +304,14 @@ void LBSI::WriteTargetNodes(std::string filename, const gctl::text_descriptor &d
|
||||
return;
|
||||
}
|
||||
|
||||
void LBSI::InitTargetNodes(std::string para)
|
||||
void LBSI::InitTargetNodes(std::string para, gctl::text_descriptor &desc)
|
||||
{
|
||||
// try to use the para as a file name
|
||||
if (access(para.c_str(), F_OK) != -1)
|
||||
{
|
||||
desc.file_name_ = para;
|
||||
std::vector<point2dc> tmp_vec;
|
||||
read_text2vector(para, tmp_vec);
|
||||
read_text2vector(desc, tmp_vec);
|
||||
|
||||
TargNodes.resize(tmp_vec.size());
|
||||
for (size_t i = 0; i < tmp_vec.size(); ++i)
|
||||
|
Reference in New Issue
Block a user