forked from celeritas-project/celeritas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete ORANGE construction from CSG objects (celeritas-project#1166)
* Add input builder class * Add utility typedefs for CSG objects * Add unit proto construction * Improve warning messages by adding md before region, downgrade to debug * Add missing 'patty' * Fix loading of multiple geometry from same filename * Fix crashing safety calculation at the center of a sphere/cyl * Use infinity instead of zero to give more realistic rather than overconservative behavior
- Loading branch information
Showing
21 changed files
with
2,221 additions
and
70 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//----------------------------------*-C++-*----------------------------------// | ||
// Copyright 2024 UT-Battelle, LLC, and other Celeritas developers. | ||
// See the top-level COPYRIGHT file for details. | ||
// SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
//---------------------------------------------------------------------------// | ||
//! \file orange/orangeinp/ProtoInterface.cc | ||
//---------------------------------------------------------------------------// | ||
#include "ProtoInterface.hh" | ||
|
||
#include "detail/InputBuilder.hh" | ||
|
||
namespace celeritas | ||
{ | ||
namespace orangeinp | ||
{ | ||
//---------------------------------------------------------------------------// | ||
/*! | ||
* Construct all universes. | ||
*/ | ||
OrangeInput build_input(Tolerance<> const& tol, ProtoInterface const& global) | ||
{ | ||
OrangeInput result; | ||
detail::ProtoMap const protos{global}; | ||
CELER_ASSERT(protos.find(&global) == orange_global_universe); | ||
detail::InputBuilder builder(&result, tol, protos); | ||
for (auto uid : range(UniverseId{protos.size()})) | ||
{ | ||
protos.at(uid)->build(builder); | ||
} | ||
|
||
CELER_ENSURE(result); | ||
return result; | ||
} | ||
|
||
//---------------------------------------------------------------------------// | ||
} // namespace orangeinp | ||
} // namespace celeritas |
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
Oops, something went wrong.