Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate Python code from specfem2d.cpp #433

Open
wants to merge 1 commit into
base: issue-228-anisotropy
Choose a base branch
from

Conversation

icui
Copy link
Collaborator

@icui icui commented Jan 24, 2025

Issue Number

Closes #432

Copy link
Collaborator

@lsawade lsawade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments on the name, but am not married to suggestions. Otherwise LGTM

Comment on lines +24 to +28

void execute(
const YAML::Node &parameter_dict, const YAML::Node &default_dict,
std::vector<std::shared_ptr<specfem::periodic_tasks::periodic_task> > tasks,
specfem::MPI::MPI *mpi);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this maybe be specfem.hpp? since it'll contain all the headers required for running a simulation?

@@ -0,0 +1,105 @@
#include "execute.hpp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then this would call the specfem header


return message.str();
}
#include "execute.hpp"

boost::program_options::options_description define_args() {
namespace po = boost::program_options;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file could keep its name still


target_link_libraries(
specfem2d
execute
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then the executable specfem2d

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specfem2d.cpp contains main(), which is not needed by Python. execute.cpp contains only the execute() function.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is text missing in this comment (did it from vscode). What I meant is: then the specfem2d executable and python/core are dependent on specfem.h/cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants