Comments (7)
See MOAB/iTaps methods for this: I think they are called ''measure"
from r2s-act.
Looks like the relevant code is measure_volume() in MOAB/src/trunk/tools/dagmc/DagMC.cpp. This function supports only triangular-faceted polyhedra.
For now, I will use the code I have working within Fortran (a local branch), which makes testing and inclusions simpler to deal with.
from r2s-act.
I'm not sure why it lives in MOAB/src/trunk/tools/ but measure.[hc]pp does it all (I think).
from r2s-act.
Ahh, I see that now. I was tracing from what DAG-MCNP calls, and so did not stumble upon measure().
The challenge in my case is that measure() is not part of the iTaps API, and is thus trickier to call from Fortran.
from r2s-act.
Current implementation for hexahedra duplicates the approach in measure() - calculate volumes of 5 tetrahedra within the hex. Since the hexahedra are limited to being parallelepipeds (#46), there may be a slightly more efficient volume method to be found, since parallelepipeds are a specific subset of quad-faceted hexahedra.
from r2s-act.
Determined today that the tetrahedral volume formula from Wikipedia, I got Mathematica's cross product operator confused, and so was incorrectly calculating the volume.V=abs( (a-d) . ((b-d) x (c-d)) ) / 6
seems to work except when it gives a volume of zero (namely a=1,0,0; b=0,1,0; c=0,0,1; d=1,1,1;). I will look more closely at the method used in measure.cpp.
from r2s-act.
In Python, the PyTaps example gives us the necessary code:
http://pythonhosted.org/PyTAPS/tutorial/example.html?highlight=volume
The three relevant functions have been added to write_alara_geom.py
.
from r2s-act.
Related Issues (20)
- Tag total photon source strength to mesh (redo in source.F90) HOT 1
- Update r2s_setup/r2s.cfg/r2s_step2.py for unstructured workflow HOT 1
- Step 1 failure due to not tagging materials HOT 1
- Expand/enhance unstructured mesh capability
- Closing MOAB file opened in source.F90? HOT 2
- Provide total photon source strength prior to running MCNP HOT 2
- Convert r2s/scripts/tag_bias_example.py to be non-scdmesh specific
- Add capability to copy isolib & FENDL files for new calculations HOT 7
- CubIt no longer on RSICC? HOT 4
- Fix 'dagmc' detection in scripts/r2s/mcnp_n2p.py HOT 1
- mcnp_n2p.py: MCNP fatal error results from orphaned FC card when an FMESH card is removed
- Memory leak in source_moab.F90 [fixed]
- Zero volume voxels produce 'nan' and/or 'inf' flux values; breaks ALARA HOT 1
- Incorrect logic in particle identifier for wwinp_to_h5m.py HOT 3
- Add data structures and mesh tags for Cartesian, ray-based cell volume fractions
- Redesign auto-generated ALARA geometry information to create zones with appropriate intervals HOT 1
- Redesign auto-generated ALARA flux information to correspond to new interval information
- Add ALARA output options to assist reporting of "cell"-averaged quantities
- Abstraction of common functions from source_moab.F90 and source_gamma.F90
- Make note of build procedure regarding moab_source.F90 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r2s-act.