View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002965 | OpenFOAM | Contribution | public | 2018-06-01 09:01 | 2018-06-01 09:56 |
Reporter | niklas | Assigned To | will | ||
Priority | normal | Severity | trivial | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Fixed in Version | dev | ||||
Summary | 0002965: suggestion for code improvement for bugfix 2956 | ||||
Description | Could edit the bug report so Im submitting a fix here instead. Instead of using a random number to calculate the tangential vectors in ConeNozzleInjection, this might be a better method // Determine direction vectors tangential to direction tanVec1_ = vector(-direction_.y(), direction_.x(), 0.0); if (mag(tanVec1_) < SMALL) { tanVec1_ = vector(-direction_.z(), 0.0, direction_.x()); } tanVec1_ /= mag(tanVec1_); tanVec2_ = direction_^tanVec1_; | ||||
Tags | No tags attached. | ||||
|
This has already been done, I just put the functionality quite low down so that other stuff can use it. Look at commit b989b81d. It defines a "perpendicular" method in VectorI.H which does something similar to what you are suggesting. The only difference is it switches between all three options (-z, 0, x), (0, z, -y) and (y, -x, 0), depending on which is most stable. |
|
Excellent :) |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-06-01 09:01 | niklas | New Issue | |
2018-06-01 09:10 | will | Note Added: 0009681 | |
2018-06-01 09:52 | niklas | Note Added: 0009682 | |
2018-06-01 09:56 | will | Assigned To | => will |
2018-06-01 09:56 | will | Status | new => resolved |
2018-06-01 09:56 | will | Resolution | open => fixed |
2018-06-01 09:56 | will | Fixed in Version | => dev |