-
Notifications
You must be signed in to change notification settings - Fork 39
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
Remove vec from fluxfunction and fix compilation #1029
base: dev
Are you sure you want to change the base?
Remove vec from fluxfunction and fix compilation #1029
Conversation
… std::vector as well as the files in partilces/ used by fluxfunction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, hum. Functional thumbs up, because a working fluxfunction is obviously better than a broken one.
But instead of partially keeping with vectorclass and partially unrolling vector operations into handcrafted scalar operations, maybe the better way to go here would be to just switch to Eigen vectors, like in other parts of the code (like the ionosphere)?
Also, std::vector<double>
as a vector type instead of std::array<double,3>
really doesn't look right to me.
particles/field.h
Outdated
@@ -60,79 +58,157 @@ struct Field | |||
} | |||
} | |||
|
|||
Vec3d getCell(int x, int y, int z) { | |||
std::vector<double> getCell(int x, int y, int z) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest that this be std::array<double, 3>
. Because why would you use a variable-sized vector here?
…_compilation Change std::vectors to std::array<double,3> in fluxfunction
+1 for using Eigen vectors instead. |
This Pull request against this PR introduces Eigen vectors instead. |
this just runs on a random file of some old run lying around on carrington, and should give the same result there.
Replace vectorclass with Eigen in particle pusher and fluxfunction
(This was making the fluxfunction test fail.)
…nction_and_fix_compilation
…nction_and_fix_compilation
This includes #1026 at the moment, apologies.
Should address #940.
Adds fluxfunction to the tools built in github CI even though we don't use it (yet). That binary is not uploaded, either.
Fixes compilation of fluxfunction and removes the vectorclass from there, and the couple files it uses from particles/. Otherwise in particles/ only converting Vec3d to Vec3Dd so it compiles.
Neither fluxfunction nor particle pusher are tested so far!