Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 33 additions & 37 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
Language: Cpp
# BasedOnStyle: LLVM
Language: Cpp
# AccessModifierOffset: -2
# AlignAfterOpenBracket: Align
# AlignConsecutiveAssignments: false
# AlignConsecutiveDeclarations: false
# AlignEscapedNewlinesLeft: false
# AlignOperands: true
# AlignOperands: true
# AlignTrailingComments: true
# AllowAllParametersOfDeclarationOnNextLine: true
# AllowShortBlocksOnASingleLine: false
Expand All @@ -20,49 +19,45 @@ AllowShortFunctionsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
# BinPackArguments: true
# BinPackParameters: true
BraceWrapping:
AfterClass: true
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: false
BeforeCatch: false
BeforeElse: true
IndentBraces: false
AfterStruct: true
AfterUnion: false
BeforeCatch: false
BeforeElse: true
IndentBraces: false
#BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 200
# CommentPragmas: '^ IWYU pragma:'
ColumnLimit: 200
# CommentPragmas: '^ IWYU pragma:'
# ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 0
# ContinuationIndentWidth: 4
# Cpp11BracedListStyle: true
# DerivePointerAlignment: false
# DisableFormat: false
# DisableFormat: false
# ExperimentalAutoDetectBinPacking: false
# ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
SortIncludes: true
#IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^(<|"(QtCore|QtWidgets|QtGui|QtNetwork)/)'
Priority: 5
- Regex: '^"(SIMPL|llvm-c|clang|clang-c)/'
Priority: 100
- Regex: '^"(SIMPLib/SIMPLib)'
Priority: 90
- Regex: '.*'
Priority: 1000
# ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
# IncludeCategories:
# - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
# Priority: 2
# - Regex: '^(<|"(gtest|isl|json)/)'
# Priority: 3
# - Regex: '.*'
# Priority: 1
# IndentCaseLabels: false
# IndentWidth: 2
# IndentWidth: 2
# IndentWrappedFunctionNames: false
# KeepEmptyLinesAtTheStartOfBlocks: true
# MacroBlockBegin: ''
# MacroBlockEnd: ''
# MacroBlockEnd: ''
# MaxEmptyLinesToKeep: 1
# NamespaceIndentation: None
# ObjCBlockIndentWidth: 2
Expand All @@ -73,21 +68,22 @@ IncludeCategories:
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakString: 1000
# PenaltyExcessCharacter: 1000000
# PenaltyReturnTypeOnItsOwnLine: 60
PenaltyReturnTypeOnItsOwnLine: 100
PointerAlignment: Left
# ReflowComments: true
# ReflowComments: true
SortIncludes: true
# SpaceAfterCStyleCast: false
# SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Never
# SpaceInEmptyParentheses: false
# SpacesBeforeTrailingComments: 1
# SpacesInAngles: false
# SpacesInAngles: false
# SpacesInContainerLiterals: true
# SpacesInCStyleCastParentheses: false
# SpacesInParentheses: false
# SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 2
UseTab: Never
SpaceAfterTemplateKeyword: true
Standard: c++20
TabWidth: 2
UseTab: Never
...

85 changes: 55 additions & 30 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,31 +1,56 @@
Checks: '-*,modernize-use-nullptr,modernize-deprecated-headers,modernize-shrink-to-fit,modernize-use-bool-literals,modernize-use-default-member-init,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-override,modernize-use-equals-default,readability-avoid-const-params-in-decls,readability-braces-around-statements,readability-container-size-empty,readability-delete-null-pointer,readability-else-after-return,readability-implicit-bool-conversion,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-member-init,readability-redundant-smartptr-get,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-boolean-expr,readability-simplify-subscript-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,readability-string-compare,bugprone-unused-return-value'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: file
User: mjackson
---
Checks: "-abseil-*,
bugprone-*,
-boost-*,
-cert-*,
clang-diagnostic-*,
-clang-diagnostic-documentation,
clang-analyzer-*,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-magic-numbers,
-darwin-*,
-fuchsia-*,
-google-*,
-hicpp-*,
-linuxkernel-*,
-llvm-*,
misc-*,
modernize-*,
-modernize-use-trailing-return-type,
-modernize-use-nodiscard,
-modernize-use-auto,
-mpi-*,
-objc-*,
-openmp-*,
performance-*,
-portability-*,
readability-*,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-uppercase-literal-suffix,
-readability-magic-numbers"
WarningsAsErrors: '*'
HeaderFilterRegex: 'simplnx/.*\.hpp'
FormatStyle: file
CheckOptions:
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: modernize-use-default-member-init.IgnoreMacros
value: '1'
- key: modernize-use-default-member-init.UseAssignment
value: '1'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
cppcoreguidelines-macro-usage.AllowedRegexp: 'SIMPLNX_EXPORT|SIMPLNX_NO_EXPORT|SIMPLNX_DEPRECATED'
readability-identifier-naming.IgnoreMainLikeFunctions: 'false'
readability-identifier-naming.PrivateMemberPrefix: 'm_'
readability-identifier-naming.NamespaceCase: lower_case
readability-identifier-naming.ClassCase: CamelCase
readability-identifier-naming.ClassMethodCase: camelBack
readability-identifier-naming.PrivateMember: CamelCase
readability-identifier-naming.PublicMemberCase: CamelCase
readability-identifier-naming.StructCase: CamelCase
readability-identifier-naming.FunctionCase: camelBack
readability-identifier-naming.VariableCase: camelBack
readability-identifier-naming.GlobalVariableCase: CamelCase
readability-identifier-naming.GlobalConstantCase: CamelCase
readability-identifier-naming.GlobalConstantPrefix: 'k_'
readability-identifier-naming.GlobalFunctionCase: CamelCase
readability-identifier-naming.LocalPointerCase: camelBack
readability-identifier-naming.LocalPointerSuffix: 'Ptr'
readability-identifier-naming.TypeAliasCase: CamelCase
readability-identifier-naming.TypeAliasSuffix: 'Type'
readability-identifier-naming.MacroDefinitionCase: UPPER_CASE
...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ __pycache__/
release
debug
Test/ProjectTest/Build
CMakeUserPresets.json

# Python build-related files
pyebsd/build/
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# set project's name
project(EbsdLibProj VERSION 1.0.39)
project(EbsdLibProj VERSION 1.0.40)

# ---------- Setup output Directories -------------------------
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"VCPKG_INSTALLED_DIR": {
"type": "STRING",
"value": "${sourceDir}/../vcpkg-installed"
"value": "${sourceDir}/../vcpkg-installed-ebsd-lib"
},
"VCPKG_MANIFEST_INSTALL": {
"type": "BOOL",
Expand Down
8 changes: 4 additions & 4 deletions LaueNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ There are several LaueOps classes that have incomplete implementations. This doc

### Texture::CalculateODFData() ###

| | Triclinic | Monoclinic | OrthoRhombic | Tetragonal_Low | Tetragonal_High | Trigonal_Low | Trigonal_High | Hexagonal_Low | Hexagonal_Low | Cubic_Low | Cubic_High |
|---|-----------|------------|--------------|----------------|-----------------|--------------|---------------|---------------|---------------|-----------|----------|
| getODFFZRod() | O | O | O | O | O | O | O | O | O | O | O |
| getOdfBin() | O | O | O | O | O | O | O | O | O | O | O |
| | Triclinic | Monoclinic | OrthoRhombic | Tetragonal_Low | Tetragonal_High | Trigonal_Low | Trigonal_High | Hexagonal_Low | Hexagonal_Low | Cubic_Low | Cubic_High |
|---------------|-----------|------------|--------------|----------------|-----------------|--------------|---------------|---------------|---------------|-----------|------------|
| getODFFZRod() | O | O | O | O | O | O | O | O | O | O | O |
| getOdfBin() | O | O | O | O | O | O | O | O | O | O | O |

### StatsGen::GenODFPlotData() ###

Expand Down
80 changes: 59 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,65 @@ EBSDLib is a C++ Library that can read EBSD Files from OEMs and perform basic EB
library is to be able to convert between the seven orientation representations that
are typically used through out materials science and engineering domains.

The DREAM.3D project ( [code repository](http://www.github.com/bluequartzsoftware/DREAM3D) and [web site](https://www.dream3d.io) ) uses this library for all of the EBSD processing.
The [DREAM.3D](https://dream3d.bluequartz.net) project and [DREAM3D-NX](https://www.dream3d.io) uses this library for all the EBSD processing.

## Supported EBSD OEM Data Files ##
## Supported EBSD OEM Data FilesDirectionalStatsTest

+ EDAX/AMETEK: .ang and HDF5 based file formats
+ Oxford Instruments: .ctf and .h5oina file formats
+ Bruker: HDF5 based file format

Please have a look at the unit tests for examples on using the various readers.

## Orientation Representations ##

| From/To | Euler | Orientation Matrix | Axis Angle | Rodrigues | Quaternion | Homochoric | Cubochoric |
| ------- |-------| ------- |------- |------- |------- |------- |------- |
|Euler| - | X | X | X | X | a | ah |
|Orientation Matrix| X | -- | X | e | X | a | ah |
|Axis Angle| o | X | -- | X | X | X | h |
|Rodrigues| o | a | X | -- | a | X | h |
|Quaternion| X | X | X | X | -- | X | h |
|Homochoric| ao | a | X | a | a | -- | X |
|Cubochoric| hao | ha | h | ha | ha | X | -- |
## Crystallographic Classes
| # | Point Group (H–M) | Rotation Point Group | Space Group No(s). | Schoenflies | Crystal system | Laue class | Laue Ops |
|---:|-------------------|----------------------|--------------------|---------------|----------------|-------------|------------------|
| 1 | 1 | 1 | 1 | C₁ | Triclinic | (\bar{1}) | TriclinicOps |
| 2 | (\bar{1}) | 1 | 2 | C(_i) | Triclinic | (\bar{1}) | |
| 3 | 2 | 2 | 3–5 | C₂ | Monoclinic | 2/m | |
| 4 | m | 1 | 6–9 | C(_s) | Monoclinic | 2/m | |
| 5 | 2/m | 2 | 10–15 | C(_{2h}) | Monoclinic | 2/m | MonoclinicOps |
| 6 | 222 | 222 | 16–24 | D₂ | Orthorhombic | mmm | |
| 7 | mm2 | 2 | 25–46 | C(_{2v}) | Orthorhombic | mmm | |
| 8 | mmm | 222 | 47–74 | D(_{2h}) | Orthorhombic | mmm | OrthorhombicOps |
| 9 | 4 | 4 | 75–80 | C₄ | Tetragonal | 4/m | |
| 10 | (\bar{4}) | 2 | 81–82 | S₄ | Tetragonal | 4/m | |
| 11 | 4/m | 4 | 83–88 | C(_{4h}) | Tetragonal | 4/m | TetragonalLowOps |
| 12 | 422 | 422 | 89–98 | D₄ | Tetragonal | 4/mmm | |
| 13 | 4mm | 4 | 99–110 | C(_{4v}) | Tetragonal | 4/mmm | |
| 14 | (\bar{4}2m) | 222 | 111–122 | D(_{2d}) | Tetragonal | 4/mmm | |
| 15 | 4/mmm | 422 | 123–142 | D(_{4h}) | Tetragonal | 4/mmm | TetragonalOps |
| 16 | 3 | 3 | 143–146 | C₃ | Trigonal | (\bar{3}) | |
| 17 | (\bar{3}) | 3 | 147–148 | C(_{3i}) (S₆) | Trigonal | (\bar{3}) | TrigonalLowOps |
| 18 | 32 | 32 | 149–155 | D₃ | Trigonal | (\bar{3}m) | |
| 19 | 3m | 3 | 156–161 | C(_{3v}) | Trigonal | (\bar{3}m) | |
| 20 | (\bar{3}m) | 32 | 162–167 | D(_{3d}) | Trigonal | (\bar{3}m) | TrigonalOps |
| 21 | 6 | 6 | 168–173 | C₆ | Hexagonal | 6/m | |
| 22 | (\bar{6}) | 3 | 174 | C(_{3h}) | Hexagonal | 6/m | |
| 23 | 6/m | 6 | 175–176 | C(_{6h}) | Hexagonal | 6/m | HexagonalLowOps |
| 24 | 622 | 622 | 177–182 | D₆ | Hexagonal | 6/mmm | |
| 25 | 6mm | 6 | 183–186 | C(_{6v}) | Hexagonal | 6/mmm | |
| 26 | (\bar{6}m2) | 32 | 187–190 | D(_{3h}) | Hexagonal | 6/mmm | |
| 27 | 6/mmm | 622 | 191–194 | D(_{6h}) | Hexagonal | 6/mmm | HexagonalOps |
| 28 | 23 | 23 | 195–199 | T | Cubic | m(\bar{3}) | |
| 29 | m(\bar{3}) | 23 | 200–206 | T(_h) | Cubic | m(\bar{3}) | CubicLowOps |
| 30 | 432 | 432 | 207–214 | O | Cubic | m(\bar{3})m | |
| 31 | (\bar{4}3m) | 23 | 215–220 | T(_d) | Cubic | m(\bar{3})m | |
| 32 | m(\bar{3})m | 432 | 221–230 | O(_h) | Cubic | m(\bar{3})m | CubicOps |


## Orientation TransformationsDirectionalStatsTest

| From/To | Euler | Orientation Matrix | Axis Angle | Rodrigues | Quaternion | Homochoric | Cubochoric | Stereographic |
|--------------------|-------|--------------------|------------|-----------|------------|------------|------------|---------------|
| Euler | - | X | X | X | X | a | ah | q |
| Orientation Matrix | X | -- | X | e | X | a | ah | q |
| Axis Angle | o | X | -- | X | X | X | h | q |
| Rodrigues | o | a | X | -- | a | X | h | q |
| Quaternion | X | X | X | X | -- | X | h | q |
| Homochoric | ao | a | X | a | a | -- | X | q |
| Cubochoric | hao | ha | h | ha | ha | X | -- | q |
| Stereographic | a | a | X | X | a | X | hc | -- |

**LEGEND**: X = Direct mathematical conversion between the representations
lower case letters denote the conversion uses other more basic conversions. For
Expand All @@ -38,13 +76,13 @@ library has selected to align with the AMETEK/EDAX output.

The folder Data/IPF_Legend has premade IPF Legends for all the Laue classes.

## Quaternion Convention ##
## Quaternion ConventionDirectionalStatsTest

Please also note that by default EbsdLib organizes Quaternions as Vector-Scalar. If your quaternions
are layed out as Scalar-Vector there is an extra argument to some functions that you
Please also note that by default EbsdLib organizes Quaternions as Vector-Scalar (X,Y,Z,W). If your quaternions
are laid out as Scalar-Vector (w,x,y,z) there is an extra argument to some functions that you
can set to allow the orientation transformations to accept this layout.

## Dependent Libraries ##
## Dependent LibrariesDirectionalStatsTest

EbsdLib is dependent on:

Expand All @@ -53,19 +91,19 @@ EbsdLib is dependent on:
## Optional Libraries

+ HDF5 1.10.4 (HDF5 is optional only if you want the HDF5 functionality)
+ Qt5 5.15.x (minimum)
+ Qt5 5.15.x (minimum: Optional)

## Rotation Convention ##
## Rotation ConventionDirectionalStatsTest

By convention this library uses **Passive** rotations

## Citations ##
## CitationsDirectionalStatsTest

D Rowenhorst, A D Rollett, G S Rohrer, M Groeber, M Jackson, P J Konijnenberg and M De Graef _et al_ 2015 _Modelling Simul. Mater. Sci. Eng._ **23** 083501

[DOI: https://doi.org/10.1088/0965-0393/23/8/083501](https://doi.org/10.1088/0965-0393/23/8/083501)

## Examples ##
## ExamplesDirectionalStatsTest

If you want to transform an Euler angle into a Quaternion the following works:

Expand Down
Loading