8#include <unordered_set>
71 template<
typename,
typename =
void>
77 decltype(static_cast<Field<typename T::value_type> *>(std::declval<T *>()))
78 > > : std::is_base_of<Field<typename T::value_type>, T> {
122 template<
typename FieldT>
140 std::unordered_set<std::shared_ptr<FieldT> >
fields_;
Combine multiple fields of the same type.
void AddField(std::shared_ptr< FieldT > field)
Add a field to the combination.
std::unordered_set< std::shared_ptr< FieldT > > fields_
Base class for physical fields (scalar or vector)
virtual void Update()
Update the field state (for time-varying fields)
virtual T GetValueAt(const Vector3< Quantity< Meter > > &point) const =0
Get the field value at a specific point in space.
constexpr bool is_field_v
Convenience variable template for is_field.
Physical quantity with a value and a compile-time unit.
3D vector with Quantity components
Implementation helper for is_field trait.
Type trait to check if a type is a Field instantiation.