Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/interface/Meddle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,7 @@ void pcmsolver_load_surface_function(pcmsolver_context_t * context,
void pcm::Meddle::loadSurfaceFunction(const char * name) const {
std::string functionName(name);
hostWriter_("\nLoading surface function " + functionName + " from .npy file");
std::string fname = functionName + ".npy";
Eigen::VectorXd values = cnpy::custom::npy_load<double>(fname);
Eigen::VectorXd values = cnpy::custom::npy_load<double>(functionName + ".npy");
if (values.size() != cavity_->size())
PCMSOLVER_ERROR("The loaded " + functionName +
" surface function is bigger than the cavity!");
Expand Down
3 changes: 2 additions & 1 deletion tests/C_host/C_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@ int main() {
test_surface_functions(
output, grid_size, mep, asc_Ag, asc_B3g, asc_neq_B3g, areas);

pcmsolver_save_surface_function(pcm_context, mep_lbl);
pcmsolver_save_surface_functions(pcm_context);
pcmsolver_save_surface_function(pcm_context, asc_lbl);
pcmsolver_load_surface_function(pcm_context, mep_lbl);

pcmsolver_write_timings(pcm_context);

Expand Down
3 changes: 3 additions & 0 deletions tests/Fortran_host/Fortran_host.f90
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ program pcm_fortran_host
! Surface functions
call test_surface_functions(grid_size, mep, asc_Ag, asc_B3g, asc_neq_B3g, areas)

call pcmsolver_save_surface_function(pcm_context, mep_lbl)
call pcmsolver_load_surface_function(pcm_context, mep_lbl)

call pcmsolver_write_timings(pcm_context)

call pcmsolver_delete(pcm_context)
Expand Down