Skip to content

Commit

Permalink
fix pinning build after putting geometry inside hamiltonian
Browse files Browse the repository at this point in the history
  • Loading branch information
Puerling committed Sep 10, 2024
1 parent 7bd415f commit 1354389
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion core/src/Spirit/IO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ try
spins[ispin].normalize();
}

#ifdef SPIRIT_ENABLE_DEFECTS
image->hamiltonian->set_geometry( geometry );
#endif

Log( Utility::Log_Level::Info, Utility::Log_Sender::API, fmt::format( "Read image from file \"{}\"", filename ),
idx_image_inchain, idx_chain );
}
Expand Down Expand Up @@ -518,7 +522,10 @@ try
auto & system_state = *images[i]->state;
// Segment header
auto segment = IO::OVF_Segment();

#ifdef SPIRIT_ENABLE_DEFECTS
// TODO: eluminate this copy
auto geometry = images[i]->hamiltonian->get_geometry();
#endif
// Read header
file.read_segment_header( start_image_infile, segment );

Expand Down Expand Up @@ -574,6 +581,9 @@ try
}

start_image_infile++;
#ifdef SPIRIT_ENABLE_DEFECTS
images[i]->hamiltonian->set_geometry( geometry );
#endif
}

success = true;
Expand Down

0 comments on commit 1354389

Please sign in to comment.