Phyth v0.1.0
A dimensional safe C++ header-only mechanics and electromagnetics simulation library.
Loading...
Searching...
No Matches
ForceSource.hpp
Go to the documentation of this file.
1#ifndef PHYTH_FORCE_SOURCE_HPP
2#define PHYTH_FORCE_SOURCE_HPP
3
8
9namespace Phyth::Mechanics {
102
110 template<typename T>
111 inline constexpr bool is_force_source_v = std::is_base_of_v<ForceSource, T>;
112}
113
114#endif // PHYTH_FORCE_SOURCE_HPP
Abstract base class for all force/traction distributions.
virtual Vector3< Quantity< Newton > > GetTotalForce() const =0
Get the total force of this source.
virtual Matrix3x3< Quantity< Pascal > > GetStressAt(const Vector3< Quantity< Meter > > &point) const =0
Compute the stress tensor at a point.
virtual Vector3< Quantity< NewtonPerMeterCubed > > GetBodyForceDensityAt(const Vector3< Quantity< Meter > > &point) const
Get the body force density at a point.
virtual ~ForceSource()=default
virtual Vector3< Quantity< Newton > > GetForceAt(const Vector3< Quantity< Meter > > &point) const =0
Compute the force vector at a point.
virtual Quantity< Meter > GetMinimumDistanceTo(const Vector3< Quantity< Meter > > &point) const =0
Get the minimum distance from a point to this force source.
constexpr bool is_force_source_v
Type trait to check if a type is a ForceSource.
constexpr bool is_unit_v
Definition Unit.hpp:79
3x3 matrix with Quantity components
Definition Matrix3x3.hpp:27
Physical quantity with a value and a compile-time unit.
Definition Quantity.hpp:27
3D vector with Quantity components
Definition Vector3.hpp:28