Loading src/cluster/Makefile +2 −2 Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ clu: clu.o edfb_clu: edfb_clu.o $(FC) $(FCFLAGS) -o $(BUILDDIR)/edfb_clu $(BUILDDIR)/edfb_clu.o $(LDFLAGS) np_cluster: $(BUILDDIR)/np_cluster.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/clu_subs.o $(BUILDDIR)/cluster.o $(CXX) $(CXXFLAGS) -o $(BUILDDIR)/np_cluster $(BUILDDIR)/np_cluster.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/clu_subs.o $(BUILDDIR)/cluster.o $(CXXLDFLAGS) np_cluster: $(BUILDDIR)/np_cluster.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/clu_subs.o $(BUILDDIR)/cluster.o $(BUILDDIR)/TransitionMatrix.o $(CXX) $(CXXFLAGS) -o $(BUILDDIR)/np_cluster $(BUILDDIR)/np_cluster.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/clu_subs.o $(BUILDDIR)/cluster.o $(BUILDDIR)/TransitionMatrix.o $(CXXLDFLAGS) #$(BUILDDIR)/np_cluster.o: # $(CXX) $(CXXFLAGS) -c np_cluster.cpp -o $(BUILDDIR)/np_cluster.o Loading src/cluster/cluster.cpp +12 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,10 @@ #include "../include/clu_subs.h" #endif #ifndef INCLUDE_TRANSITIONMATRIX_H_ #include "../include/TransitionMatrix.h" #endif using namespace std; /*! \brief C++ implementation of CLU Loading Loading @@ -331,16 +335,20 @@ void cluster(string config_file, string data_file, string output_path) { ztm(am, c1, c1ao, c4, c6, c9); if (sconf->idfc >= 0) { if (jxi488 == gconf->jwtm) { int nlemt = 2 * c4->nlem; string ttms_name = output_path + "/c_TTMS.hd5"; TransitionMatrix ttms(nlemt, lm, vk, exri, c1ao->am0m); ttms.write_binary(ttms_name, "HDF5"); ttms_name = output_path + "/c_TTMS"; ttms.write_binary(ttms_name); /* int is = 1; fstream ttms_file; string ttms_name = output_path + "/c_TTMS"; ttms_file.open(ttms_name.c_str(), ios::out | ios::binary); if (ttms_file.is_open()) { ttms_file.write(reinterpret_cast<char *>(&is), sizeof(int)); ttms_file.write(reinterpret_cast<char *>(&lm), sizeof(int)); ttms_file.write(reinterpret_cast<char *>(&vk), sizeof(double)); ttms_file.write(reinterpret_cast<char *>(&exri), sizeof(double)); int nlemt = 2 * c4->nlem; for (int ami = 0; ami < nlemt; ami++) { for (int amj = 0; amj < nlemt; amj++) { complex<double> value = c1ao->am0m[ami][amj]; Loading @@ -355,6 +363,7 @@ void cluster(string config_file, string data_file, string output_path) { printf("\nERROR: failed to open TTMS file.\n"); break; } */ } } // label 156: continue from here Loading Loading
src/cluster/Makefile +2 −2 Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ clu: clu.o edfb_clu: edfb_clu.o $(FC) $(FCFLAGS) -o $(BUILDDIR)/edfb_clu $(BUILDDIR)/edfb_clu.o $(LDFLAGS) np_cluster: $(BUILDDIR)/np_cluster.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/clu_subs.o $(BUILDDIR)/cluster.o $(CXX) $(CXXFLAGS) -o $(BUILDDIR)/np_cluster $(BUILDDIR)/np_cluster.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/clu_subs.o $(BUILDDIR)/cluster.o $(CXXLDFLAGS) np_cluster: $(BUILDDIR)/np_cluster.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/clu_subs.o $(BUILDDIR)/cluster.o $(BUILDDIR)/TransitionMatrix.o $(CXX) $(CXXFLAGS) -o $(BUILDDIR)/np_cluster $(BUILDDIR)/np_cluster.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/file_io.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sph_subs.o $(BUILDDIR)/clu_subs.o $(BUILDDIR)/cluster.o $(BUILDDIR)/TransitionMatrix.o $(CXXLDFLAGS) #$(BUILDDIR)/np_cluster.o: # $(CXX) $(CXXFLAGS) -c np_cluster.cpp -o $(BUILDDIR)/np_cluster.o Loading
src/cluster/cluster.cpp +12 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,10 @@ #include "../include/clu_subs.h" #endif #ifndef INCLUDE_TRANSITIONMATRIX_H_ #include "../include/TransitionMatrix.h" #endif using namespace std; /*! \brief C++ implementation of CLU Loading Loading @@ -331,16 +335,20 @@ void cluster(string config_file, string data_file, string output_path) { ztm(am, c1, c1ao, c4, c6, c9); if (sconf->idfc >= 0) { if (jxi488 == gconf->jwtm) { int nlemt = 2 * c4->nlem; string ttms_name = output_path + "/c_TTMS.hd5"; TransitionMatrix ttms(nlemt, lm, vk, exri, c1ao->am0m); ttms.write_binary(ttms_name, "HDF5"); ttms_name = output_path + "/c_TTMS"; ttms.write_binary(ttms_name); /* int is = 1; fstream ttms_file; string ttms_name = output_path + "/c_TTMS"; ttms_file.open(ttms_name.c_str(), ios::out | ios::binary); if (ttms_file.is_open()) { ttms_file.write(reinterpret_cast<char *>(&is), sizeof(int)); ttms_file.write(reinterpret_cast<char *>(&lm), sizeof(int)); ttms_file.write(reinterpret_cast<char *>(&vk), sizeof(double)); ttms_file.write(reinterpret_cast<char *>(&exri), sizeof(double)); int nlemt = 2 * c4->nlem; for (int ami = 0; ami < nlemt; ami++) { for (int amj = 0; amj < nlemt; amj++) { complex<double> value = c1ao->am0m[ami][amj]; Loading @@ -355,6 +363,7 @@ void cluster(string config_file, string data_file, string output_path) { printf("\nERROR: failed to open TTMS file.\n"); break; } */ } } // label 156: continue from here Loading