-
Notifications
You must be signed in to change notification settings - Fork 84
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
Some fixes for explicit3D ray tracing #357
Merged
GiudGiud
merged 10 commits into
mit-crpg:3D-MOC
from
wuwenbin2006:some-fixes-for-explict3D
Oct 17, 2018
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c55f013
Cancel memory release of materials in the destructor function of Geom…
wuwenbin2006 68dd53a
Cell::toString output halfspace indicator, and some tiny corrections
wuwenbin2006 d583160
Some changes in cell ringify, avoiding to add outermost zcylinder to …
wuwenbin2006 0755ce9
fix a bug in LocalCoords::detectLoop
wuwenbin2006 746a60d
fixed some bugs for EXPLICT_3D running, but it still fails to get rig…
wuwenbin2006 6954d5d
Abundant surfaces when sectorized and ringified.
wuwenbin2006 e455ed4
Merge branch '3D-MOC' into some-fixes-for-explict3D. Resolve the conf…
wuwenbin2006 fca1d1c
Merge branch 'Fix-calculateBoundaries-function' into some-fixes-for-e…
wuwenbin2006 92d7505
Merge branch 'Fix-calculateBoundaries-function' into some-fixes-for-e…
wuwenbin2006 44874f7
Merge branch '3D-MOC' into some-fixes-for-explict3D
wuwenbin2006 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,13 +42,15 @@ Geometry::Geometry() { | |
* @brief Destructor clears FSR to Cells and Materials maps. | ||
*/ | ||
Geometry::~Geometry() { | ||
|
||
/* Free all materials */ | ||
std::map<int, Material*> materials = _root_universe->getAllMaterials(); | ||
std::map<int, Material*>::iterator iter; | ||
for (iter = materials.begin(); iter != materials.end(); ++iter) | ||
delete iter->second; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a |
||
if (_loaded_from_file) { | ||
std::map<int, Material*> materials = _root_universe->getAllMaterials(); | ||
std::map<int, Material*>::iterator iter; | ||
for (iter = materials.begin(); iter != materials.end(); ++iter) | ||
delete iter->second; | ||
} | ||
|
||
/* Free all surfaces */ | ||
if (_loaded_from_file) { | ||
std::map<int, Surface*> surfaces = getAllSurfaces(); | ||
|
@@ -2070,12 +2072,12 @@ void Geometry::segmentize3D(Track3D* track, bool setup) { | |
} | ||
|
||
/* Calculate the local centroid of the segment if available */ | ||
if (_contains_FSR_centroids && !setup) { | ||
Point* centroid = getFSRCentroid(fsr_id); | ||
if (!setup) { | ||
//Point* centroid = getFSRCentroid(fsr_id); | ||
Point* starting_point = start.getHighestLevel()->getPoint(); | ||
double x_start = starting_point->getX() - centroid->getX(); | ||
double y_start = starting_point->getY() - centroid->getY(); | ||
double z_start = starting_point->getZ() - centroid->getZ(); | ||
double x_start = starting_point->getX(); | ||
double y_start = starting_point->getY(); | ||
double z_start = starting_point->getZ(); | ||
new_segment->_starting_position[0] = x_start; | ||
new_segment->_starting_position[1] = y_start; | ||
new_segment->_starting_position[2] = z_start; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does this suffice to close issue #226 ?
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.
Not solve this issue completely. It is hard to remove the abundant outer box surfaces for outer most cells ( moderator usually). However, this could be improved more.
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 found when the number of sectors is 2, the code crashes.
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.
It is the problem when a point is on the surface. In this case, the evaluation value would be so tiny that it could be either minus or positive. Will be fixed in other PR.
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.
This removeSurfaces doesn't actually work. It's calling getSurfaces which returns a const map, so you can't delete from it.
No need to make a PR to fix it, all of this is gone with Regions