question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Its unclear how to set symmetry correctly

See original GitHub issue

I converted a 1/3 core reactor to full core using ThirdCoreHexToFullCoreChanger.convert

After expanding the symmtry is set using

r.core.symmetry = geometry.SymmetryType(
    geometry.DomainType.FULL_CORE, geometry.BoundaryType.NO_SYMMETRY
)

My code also tests weather its full core using

if self.r.core.isFullCore

which checks

return self.symmetry.domain == geometry.DomainType.FULL_CORE

Since core.symmetry was set, but self.symmetry.domain is checked for symmetry, it still believes it is not full core

Please advise why both core.symmetry and self.symmetry.domain exist, and how to communicate to ARMI that it is now full core.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
onufercommented, Mar 4, 2022

Thanks for explanation, issues is probably on my end

0reactions
john-sciencecommented, Mar 4, 2022

@onufer I have ammended the unit test as follows, and it still passes:

    def test_growToFullCoreFromThirdCore(self):
        """Test that a hex core can be converted from a third core to a full core geometry.""" 
        # Check the initialization of the third core model  
        self.assertFalse(self.r.core.isFullCore)  
        self.assertEqual( 
            self.r.core.symmetry,   
            geometry.SymmetryType( 
                geometry.DomainType.THIRD_CORE, geometry.BoundaryType.PERIODIC 
            ), 
        ) 
        initialNumBlocks = len(self.r.core.getBlocks()) 
        # Perform reactor conversion 
        changer = geometryConverters.ThirdCoreHexToFullCoreChanger(self.o.cs) 
        changer.convert(self.r) 
        # Check the full core conversion is successful 
        self.assertTrue(self.r.core.isFullCore)    # NOTE: This is new.
        self.assertGreater(len(self.r.core.getBlocks()), initialNumBlocks)  
        self.assertEqual(self.r.core.symmetry.domain, geometry.DomainType.FULL_CORE) 
        # Check that the geometry can be restored to a third core  
        changer.restorePreviousGeometry(self.o.cs, self.r) 
        self.assertEqual(initialNumBlocks, len(self.r.core.getBlocks())) 
        self.assertEqual(  
            self.r.core.symmetry,  
            geometry.SymmetryType( 
                geometry.DomainType.THIRD_CORE, geometry.BoundaryType.PERIODIC 
            ),  
        ) 
        self.asserFalse(self.r.core.isFullCore)  # NOTE: This is new.

So the basic unit test checks out. Is this not what you expected? OR do you see something different with your data?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Symmetry | GD&T Basics - GDandTBasics.com
Symmetry should be avoided in most cases due to its specific functional requirements and measurement difficulty. With flatness, parallelism and ...
Read more >
Symmetry error, false center - Blender Stack Exchange
Select Object → Set Origin → Origin to Geometry in the menu of the viewport to center it. This should fix it.
Read more >
How to Use Clip Studio Paint's Symmetrical Ruler
To adjust your symmetrical ruler, click on the operation tool. The operation tool is the one with the icon of a computer mouse...
Read more >
Brain Teaser: Symmetry Paper Trick - What Do We Do All Day
Will this symmetry paper trick fool your kids? Use this brain teaser to exercise analytical thinking skills and promote growth mindset and problem...
Read more >
Using Symmetry in DesignModeler and Expanding the Results
Using Symmetry in DesignModeler and Expanding the Results · In DM, click Tools, Symmetry then select the Plane. · Generate and this is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found