MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector Class Reference

Public Member Functions

 CsgVector ()
 
 CsgVector (const MFloat *X)
 
 CsgVector (const CsgVector &Y)
 
 CsgVector (CsgVector &&) noexcept=default
 
CsgVectoroperator= (const CsgVector &)=default
 
CsgVectoroperator= (CsgVector &&)=default
 
CsgVector clone () const
 
CsgVector plus (const CsgVector &a) const
 
CsgVector minus (const CsgVector &a) const
 
CsgVector times (const MFloat a) const
 
CsgVector dividedBy (const MFloat a) const
 
MFloat dot (const CsgVector &a) const
 
CsgVector lerp (const CsgVector &a, const MFloat t) const
 
MFloat length () const
 
CsgVector unit () const
 
template<class X = void, std::enable_if_t< nDim==3, X * > = nullptr>
CsgVector cross (const CsgVector &a) const
 
template<class X = void, std::enable_if_t< nDim==2, X * > = nullptr>
CsgVector cross (const CsgVector &) const
 
void negate ()
 

Public Attributes

MFloat xx [3] = {F0, F0, F0}
 

Detailed Description

template<MInt nDim, class SysEqn>
class FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector

Definition at line 1432 of file fvmbcartesiansolverxd.h.

Constructor & Destructor Documentation

◆ CsgVector() [1/4]

template<MInt nDim, class SysEqn >
FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::CsgVector ( )
inline

Definition at line 1435 of file fvmbcartesiansolverxd.h.

1435{ std::fill(xx, xx + nDim, F0); }

◆ CsgVector() [2/4]

template<MInt nDim, class SysEqn >
FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::CsgVector ( const MFloat X)
inlineexplicit

Definition at line 1436 of file fvmbcartesiansolverxd.h.

1436{ std::copy(X, X + nDim, xx); }

◆ CsgVector() [3/4]

template<MInt nDim, class SysEqn >
FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::CsgVector ( const CsgVector Y)
inline

Definition at line 1437 of file fvmbcartesiansolverxd.h.

1437{ std::copy(Y.xx, Y.xx + nDim, xx); }

◆ CsgVector() [4/4]

template<MInt nDim, class SysEqn >
FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::CsgVector ( CsgVector &&  )
defaultnoexcept

Member Function Documentation

◆ clone()

template<MInt nDim, class SysEqn >
CsgVector FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::clone ( ) const
inline

Definition at line 1442 of file fvmbcartesiansolverxd.h.

1442 {
1443 CsgVector tmp;
1444 std::copy(this->xx, this->xx + nDim, tmp.xx);
1445 return tmp;
1446 }

◆ cross() [1/2]

template<MInt nDim, class SysEqn >
template<class X = void, std::enable_if_t< nDim==2, X * > = nullptr>
CsgVector FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::cross ( const CsgVector ) const
inline

Definition at line 1489 of file fvmbcartesiansolverxd.h.

1489 {
1490 TERMM(1, "Get your ass out of this function. This is 3D code!");
1491 }

◆ cross() [2/2]

template<MInt nDim, class SysEqn >
template<class X = void, std::enable_if_t< nDim==3, X * > = nullptr>
CsgVector FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::cross ( const CsgVector a) const
inline

Definition at line 1481 of file fvmbcartesiansolverxd.h.

1481 {
1482 CsgVector tmp;
1483 tmp.xx[0] = this->xx[1] * a.xx[2] - this->xx[2] * a.xx[1];
1484 tmp.xx[1] = this->xx[2] * a.xx[0] - this->xx[0] * a.xx[2];
1485 tmp.xx[2] = this->xx[0] * a.xx[1] - this->xx[1] * a.xx[0];
1486 return tmp;
1487 }
Definition: contexttypes.h:19

◆ dividedBy()

template<MInt nDim, class SysEqn >
CsgVector FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::dividedBy ( const MFloat  a) const
inline

Definition at line 1465 of file fvmbcartesiansolverxd.h.

1465 {
1466 CsgVector tmp;
1467 for(MInt i = 0; i < nDim; i++)
1468 tmp.xx[i] = this->xx[i] / a;
1469 return tmp;
1470 }
int32_t MInt
Definition: maiatypes.h:62

◆ dot()

template<MInt nDim, class SysEqn >
MFloat FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::dot ( const CsgVector a) const
inline

Definition at line 1471 of file fvmbcartesiansolverxd.h.

1471 {
1472 MFloat dotp = F0;
1473 for(MInt i = 0; i < nDim; i++)
1474 dotp += this->xx[i] * a.xx[i];
1475 return dotp;
1476 }
double MFloat
Definition: maiatypes.h:52

◆ length()

template<MInt nDim, class SysEqn >
MFloat FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::length ( ) const
inline

Definition at line 1478 of file fvmbcartesiansolverxd.h.

1478{ return sqrt(this->dot(*this)); }
MFloat dot(const CsgVector &a) const

◆ lerp()

template<MInt nDim, class SysEqn >
CsgVector FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::lerp ( const CsgVector a,
const MFloat  t 
) const
inline

Definition at line 1477 of file fvmbcartesiansolverxd.h.

1477{ return this->plus((a.minus(*this)).times(t)); }
CsgVector plus(const CsgVector &a) const

◆ minus()

template<MInt nDim, class SysEqn >
CsgVector FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::minus ( const CsgVector a) const
inline

Definition at line 1453 of file fvmbcartesiansolverxd.h.

1453 {
1454 CsgVector tmp;
1455 for(MInt i = 0; i < nDim; i++)
1456 tmp.xx[i] = this->xx[i] - a.xx[i];
1457 return tmp;
1458 }

◆ negate()

template<MInt nDim, class SysEqn >
void FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::negate ( )
inline

Definition at line 1492 of file fvmbcartesiansolverxd.h.

1492 {
1493 for(MInt i = 0; i < nDim; i++)
1494 this->xx[i] = -this->xx[i];
1495 }

◆ operator=() [1/2]

template<MInt nDim, class SysEqn >
CsgVector & FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::operator= ( const CsgVector )
default

◆ operator=() [2/2]

template<MInt nDim, class SysEqn >
CsgVector & FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::operator= ( CsgVector &&  )
default

◆ plus()

template<MInt nDim, class SysEqn >
CsgVector FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::plus ( const CsgVector a) const
inline

Definition at line 1447 of file fvmbcartesiansolverxd.h.

1447 {
1448 CsgVector tmp;
1449 for(MInt i = 0; i < nDim; i++)
1450 tmp.xx[i] = this->xx[i] + a.xx[i];
1451 return tmp;
1452 }

◆ times()

template<MInt nDim, class SysEqn >
CsgVector FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::times ( const MFloat  a) const
inline

Definition at line 1459 of file fvmbcartesiansolverxd.h.

1459 {
1460 CsgVector tmp;
1461 for(MInt i = 0; i < nDim; i++)
1462 tmp.xx[i] = this->xx[i] * a;
1463 return tmp;
1464 }

◆ unit()

template<MInt nDim, class SysEqn >
CsgVector FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::unit ( ) const
inline

Definition at line 1479 of file fvmbcartesiansolverxd.h.

1479{ return this->dividedBy(this->length()); }
CsgVector dividedBy(const MFloat a) const

Member Data Documentation

◆ xx

template<MInt nDim, class SysEqn >
MFloat FvMbCartesianSolverXD< nDim, SysEqn >::CsgVector::xx[3] = {F0, F0, F0}

Definition at line 1434 of file fvmbcartesiansolverxd.h.


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