Phyth v0.1.0
A dimensional safe C++ header-only mechanics and electromagnetics simulation library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Phyth::Electromagnetics::MagneticSource Class Referenceabstract

Abstract base class for all magnetic field sources. More...

#include <MagneticSource.hpp>

Inheritance diagram for Phyth::Electromagnetics::MagneticSource:
Inheritance graph
[legend]

Public Member Functions

virtual ~MagneticSource ()=default
 
virtual Vector3< Quantity< Tesla > > GetMagneticFieldAt (const Vector3< Quantity< Meter > > &point) const =0
 Compute the magnetic field at a point in space.
 

Detailed Description

Abstract base class for all magnetic field sources.

MagneticSource defines the interface for any object that produces a magnetic field. Subclasses represent specific sources such as:

Example: class MagneticDipole : public MagneticSource { [[nodiscard]] Vector3<Quantity<Tesla>> GetMagneticFieldAt(const Vector3<Quantity<Meter>>& point) const override { // Compute dipole field at point return B; } };

Definition at line 27 of file MagneticSource.hpp.

Constructor & Destructor Documentation

◆ ~MagneticSource()

virtual Phyth::Electromagnetics::MagneticSource::~MagneticSource ( )
virtualdefault

Member Function Documentation

◆ GetMagneticFieldAt()

virtual Vector3< Quantity< Tesla > > Phyth::Electromagnetics::MagneticSource::GetMagneticFieldAt ( const Vector3< Quantity< Meter > > &  point) const
pure virtual

Compute the magnetic field at a point in space.

Parameters
pointPosition in 3D space (meters)
Returns
Magnetic flux density B (Tesla) as a Vector3

Subclasses must implement this method according to their specific geometry and current distribution.

Note
: Some sources have singularities at certain locations (e.g., on the wire axis). Subclasses should document these edge cases.

Implemented in Phyth::Electromagnetics::CurrentSegment, Phyth::Electromagnetics::MagneticDipole, and Phyth::Electromagnetics::PointCharge.


The documentation for this class was generated from the following file: