-
Notifications
You must be signed in to change notification settings - Fork 5
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
Comments
The atomic data will be needed if solving for the non-equilibrium ionization state, but de-coupled from the radiation calculation and using the power-law radiative losses.
From: Will Barnes <[email protected]>
Sent: Wednesday, April 11, 2018 11:57 AM
To: rice-solar-physics/HYDRAD <[email protected]>
Cc: Subscribed <[email protected]>
Subject: [rice-solar-physics/HYDRAD] Don't require atomic data when using the power-law option for the radiative losses (#11)
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
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#11> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AIXhfgwcIF84RCwheBUgakn0C7BG9l2kks5tnjX1gaJpZM4TQZYe> . <https://github.com/notifications/beacon/AIXhfmYGr7ymV9wMQtHtRyNNxVtYmPVOks5tnjX1gaJpZM4TQZYe.gif>
|
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. |
The preprocessor can handle logic. E.g:
#if defined SOMETHING && defined SOMETHING_ELSE
#else
#endif
Or,
#if defined SOMETHING || defined SOMETHING_ELSE
#endif
Etc.
Cheers,
Steve
From: Will Barnes <[email protected]>
Sent: Thursday, April 12, 2018 2:47 PM
To: rice-solar-physics/HYDRAD <[email protected]>
Cc: sjbradshaw <[email protected]>; Comment <[email protected]>
Subject: Re: [rice-solar-physics/HYDRAD] Don't require atomic data when using the power-law option for the radiative losses (#11)
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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#11 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AIXhfk_SMIY4HmeXvXHExfETdeeU3fQPks5tn69LgaJpZM4TQZYe> . <https://github.com/notifications/beacon/AIXhfn9PYqP0yAfWQ5Sz5wRV8IuBXqrKks5tn69LgaJpZM4TQZYe.gif>
|
Closed by #18 |
Reverted by #19 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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,
The text was updated successfully, but these errors were encountered: