27#include "neml2/models/Data.h"
28#include "neml2/tensors/indexing.h"
59 const Vec & lattice_vectors,
92 const R2 &
A()
const {
return _A; };
94 const SR2 &
M()
const {
return _M; };
96 const WR2 &
W()
const {
return _W; };
103 template <
class Derived,
104 typename =
typename std::enable_if_t<std::is_base_of_v<TensorBase<Derived>, Derived>>>
114 const Vec & lattice_vectors,
115 std::tuple<
Vec,
Vec,
Scalar, std::vector<Size>> slip_data);
118 static Vec make_reciprocal_lattice(
const Vec & lattice_vectors);
121 static std::tuple<Vec, Vec, Scalar, std::vector<Size>>
122 setup_schmid_tensors(
const Vec &
A,
131 const Vec & _lattice_vectors;
133 const Vec & _reciprocal_lattice_vectors;
140 const Vec & _cartesian_slip_directions;
142 const Vec & _cartesian_slip_planes;
146 const std::vector<Size> _slip_offsets;
156template <
class Derived,
typename>
162 return tensor.intmd_slice(-1, indexing::Slice(_slip_offsets[grp], _slip_offsets[grp + 1]));
Data(const OptionSet &options)
Construct a new Data object.
Represention of a crystal direction or plane a Miller Index.
Definition MillerIndex.h:38
Factory * factory() const
Get the factory that created this object.
Definition NEML2Object.h:93
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:52
Base class for second order tensor.
Definition R2.h:49
The symmetric second order tensor.
Definition SR2.h:46
Scalar.
Definition Scalar.h:38
3-vector.
Definition Vec.h:43
A skew-symmetric second order tensor, represented as an axial vector.
Definition WR2.h:43
CrystalGeometry(const OptionSet &options, const R2 &cclass, const Vec &lattice_vectors, const MillerIndex &slip_directions, const MillerIndex &slip_planes)
Alternate constructor not relying on options.
Vec b3() const
accessor for the third reciprocal lattice vector
const R2 & symmetry_operators() const
Accessor for the crystal class symmetry operators.
Definition CrystalGeometry.h:99
const R2 & A() const
Accessor for the full Schmid tensors.
Definition CrystalGeometry.h:92
const Vec & cartesian_slip_directions() const
Accessor for the slip directions.
Definition CrystalGeometry.h:85
const WR2 & W() const
Accessor for the skew-symmetric Schmid tensors.
Definition CrystalGeometry.h:96
Vec a1() const
accessor for the first lattice vector
const SR2 & M() const
Accessor for the symmetric Schmid tensors.
Definition CrystalGeometry.h:94
const Scalar & burgers() const
Accessor for the burgers vector.
Definition CrystalGeometry.h:89
const Vec & cartesian_slip_planes() const
Accessor for the slip planes.
Definition CrystalGeometry.h:87
CrystalGeometry(const OptionSet &options)
Setup from parameter set.
Derived slip_slice(const Derived &tensor, Size grp) const
Slice a Tensor to provide only the batch associated with a slip system.
Definition CrystalGeometry.h:158
Size nslip() const
Total number of slip systems.
Vec a3() const
accessor for the third lattice vector
Size nslip_in_group(Size i) const
Number of slip systems in a given group.
Vec b2() const
accessor for the second reciprocal lattice vector
Size nslip_groups() const
Number of slip groups.
static OptionSet expected_options()
Input options.
Vec a2() const
accessor for the second lattice vector
Vec b1() const
accessor for the first reciprocal lattice vector
Definition CrystalGeometry.h:40
Definition DiagnosticsInterface.h:31
int64_t Size
Definition types.h:71