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

Don't require atomic data when using the power-law option for the radiative losses #11

Open
wtbarnes opened this issue Apr 11, 2018 · 5 comments

Comments

@wtbarnes
Copy link
Member

When using the power-law radiative loss option, no atomic data is required for the calculation (I think??). However, when the Radiation object is initialized, atomic data is read from Radiation_Model/atomic_data even when using the power-law option.

It would be convenient if this data was not required when using the power-law option. This is particularly useful when doing many (hundreds or thousands) HYDRAD and/or Initial Conditions as it means that the atomic data (which is by far the largest percentage of the repo) can be left out of the folder when copying the code repeatedly. This would make the setup of many runs much quicker as the atomic data is rather

Unless this data is used elsewhere (even when selecting the power-law option), I think it would just be a matter of adding something like this to the Radiation constructor,

CRadiation::CRadiation( char *szFilename)
{
#ifndef USE_POWER_LAW_RADIATIVE_LOSSES
Initialise( szFilename );
#endif
}
@sjbradshaw
Copy link
Contributor

sjbradshaw commented Apr 12, 2018 via email

@wtbarnes
Copy link
Member Author

I forgot about that option. Presumably then you could just use the flag for the decoupled NEI calculation,

CRadiation::CRadiation( char *szFilename)
{
#ifdef USE_POWER_LAW_RADIATIVE_LOSSES
#ifdef DECOUPLE_IONIZATION_STATE_SOLVER
Initialise( szFilename );
#endif
#else
Initialise( szFilename );
#endif
}

A bit ugly since I don't think C preprocessor statements have logical AND/OR operators, but I think that would work.

@sjbradshaw
Copy link
Contributor

sjbradshaw commented Apr 13, 2018 via email

@wtbarnes
Copy link
Member Author

wtbarnes commented Jun 7, 2018

Closed by #18

@wtbarnes wtbarnes closed this as completed Jun 7, 2018
@wtbarnes wtbarnes reopened this Sep 24, 2018
@wtbarnes
Copy link
Member Author

Reverted by #19

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

No branches or pull requests

2 participants