MAST3
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
MAST::Physics::Elasticity::Traction< TractionScalarType, Dim, ContextType > Class Template Reference

Detailed Description

template<typename TractionScalarType, uint_t Dim, typename ContextType>
class MAST::Physics::Elasticity::Traction< TractionScalarType, Dim, ContextType >

This class defines a data structure that can be used to define a parameterized surface traction vector, where each component of the Dim dimensional vector is scalar of type TractionScalarType, which is typically a ScalarConstant.

An opject of this type can be used as the TractionFieldType template parameter for the SurfaceTractionLoad class.

Definition at line 134 of file traction_load.hpp.

#include <traction_load.hpp>

Public Types

using scalar_t = typename TractionScalarType::scalar_t
 
using traction_t = Traction< TractionScalarType, Dim, ContextType >
 
using value_t = Eigen::Matrix< scalar_t, Dim, 1 >
 

Public Member Functions

 Traction (const TractionScalarType *t0, const TractionScalarType *t1=nullptr, const TractionScalarType *t2=nullptr)
 
template<typename ScalarFieldType >
void derivative (const ScalarFieldType &f, ContextType &c, value_t &v) const
 
const TractionScalarType & get_scalar_for_dim (uint_t i) const
 
void value (ContextType &c, value_t &v) const
 

Protected Attributes

std::vector< const TractionScalarType * > _t
 

Member Typedef Documentation

◆ scalar_t

template<typename TractionScalarType , uint_t Dim, typename ContextType >
using MAST::Physics::Elasticity::Traction< TractionScalarType, Dim, ContextType >::scalar_t = typename TractionScalarType::scalar_t

Definition at line 138 of file traction_load.hpp.

◆ traction_t

template<typename TractionScalarType , uint_t Dim, typename ContextType >
using MAST::Physics::Elasticity::Traction< TractionScalarType, Dim, ContextType >::traction_t = Traction<TractionScalarType, Dim, ContextType>

Definition at line 140 of file traction_load.hpp.

◆ value_t

template<typename TractionScalarType , uint_t Dim, typename ContextType >
using MAST::Physics::Elasticity::Traction< TractionScalarType, Dim, ContextType >::value_t = Eigen::Matrix<scalar_t, Dim, 1>

Definition at line 139 of file traction_load.hpp.

Constructor & Destructor Documentation

◆ Traction()

template<typename TractionScalarType , uint_t Dim, typename ContextType >
MAST::Physics::Elasticity::Traction< TractionScalarType, Dim, ContextType >::Traction ( const TractionScalarType *  t0,
const TractionScalarType *  t1 = nullptr,
const TractionScalarType *  t2 = nullptr 
)
inline

Definition at line 142 of file traction_load.hpp.

144  :
145  _t ({t0, t1, t2}) {
146 
147  Assert1(Dim>1 || t1 == nullptr,
148  Dim, "t1 should be nullptr for 1D traction");
149  Assert1(Dim>2 || t2 == nullptr,
150  Dim, "t2 should be nullptr for 2D traction");
151  }
#define Assert1(cond, v1, msg)
Definition: exceptions.hpp:143
std::vector< const TractionScalarType * > _t

Member Function Documentation

◆ derivative()

template<typename TractionScalarType , uint_t Dim, typename ContextType >
template<typename ScalarFieldType >
void MAST::Physics::Elasticity::Traction< TractionScalarType, Dim, ContextType >::derivative ( const ScalarFieldType &  f,
ContextType &  c,
value_t v 
) const
inline

Definition at line 169 of file traction_load.hpp.

169  {
170 
171  Assert2(v.size() == Dim, v.size(), Dim, "Incorrect size");
172 
173  traction_derivative<traction_t, Dim, ContextType, ScalarFieldType>
174  (f, c, *this, v);
175  }
#define Assert2(cond, v1, v2, msg)
Definition: exceptions.hpp:152

◆ get_scalar_for_dim()

template<typename TractionScalarType , uint_t Dim, typename ContextType >
const TractionScalarType& MAST::Physics::Elasticity::Traction< TractionScalarType, Dim, ContextType >::get_scalar_for_dim ( uint_t  i) const
inline

Definition at line 153 of file traction_load.hpp.

153  {
154 
155  Assert2(i < Dim, i, Dim, "Invalid dimension index");
156  return *_t[i];
157  }
#define Assert2(cond, v1, v2, msg)
Definition: exceptions.hpp:152
std::vector< const TractionScalarType * > _t

◆ value()

template<typename TractionScalarType , uint_t Dim, typename ContextType >
void MAST::Physics::Elasticity::Traction< TractionScalarType, Dim, ContextType >::value ( ContextType &  c,
value_t v 
) const
inline

Definition at line 160 of file traction_load.hpp.

160  {
161 
162  Assert2(v.size() == Dim, v.size(), Dim, "Incorrect size");
163 
164  traction_value<traction_t, Dim, ContextType>(c, *this, v);
165  }
#define Assert2(cond, v1, v2, msg)
Definition: exceptions.hpp:152

Member Data Documentation

◆ _t

template<typename TractionScalarType , uint_t Dim, typename ContextType >
std::vector<const TractionScalarType*> MAST::Physics::Elasticity::Traction< TractionScalarType, Dim, ContextType >::_t
protected

Definition at line 180 of file traction_load.hpp.


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