MDStressLab++
Loading...
Searching...
No Matches
Stress< TMethod, stressType, TGrid > Class Template Reference

#include <Stress.h>

Collaboration diagram for Stress< TMethod, stressType, TGrid >:

Public Member Functions

 Stress (std::string name, const Method< TMethod > &method, TGrid *pgrid)
 Constructs a Stress object.
 
 Stress (const Method< TMethod > &method, TGrid *pgrid)
 Constructs a Stress object.
 
void write ()
 
void write (const std::string &filename)
 
 ~Stress ()
 

Public Attributes

std::vector< Matrix3dfield
 A three-dimensional stress field.
 
TGrid * pgrid
 Pointer to the Grid on which the stress field is defined.
 
const Method< TMethod > & method
 The method used to compute the stress field. The Method object provides details about the weighting function and its support (averaging domain) and includes the bond function to compute the stress field.
 
std::string name
 The prefix of the filename that will be outputted when the stress field is written.
 

Detailed Description

template<typename TMethod, StressType stressType, typename TGrid = typename std::conditional<stressType==Piola,Grid<Reference>,Grid<Current>>::type>
class Stress< TMethod, stressType, TGrid >

Stress class template describes a three dimensional stress field on a grid, computed using a prescribed averaging domain.

Template Parameters
TMethod- Method template parameter. For example, TMethod=MethodSphere for a spherical averaging domain and TMethod=MethodLDAD for LDAD. For a user-defined averaging domain, TMethod=MethodUser
stressType- Piola or Cauchy
TGrid- pointer to Grid<Reference> or Grid<Current> depending on whether stressType is Piola or Cauchy, respectively
Examples
crack/main.cpp, testLDADLJ.cpp, testLJ.cpp, and testMls.cpp.

Definition at line 34 of file Stress.h.

Constructor & Destructor Documentation

◆ Stress() [1/2]

template<typename TMethod , StressType stressType, typename TGrid = typename std::conditional<stressType==Piola,Grid<Reference>,Grid<Current>>::type>
Stress< TMethod, stressType, TGrid >::Stress ( std::string  name,
const Method< TMethod > &  method,
TGrid *  pgrid 
)
inline

Constructs a Stress object.

Definition at line 62 of file Stress.h.

◆ Stress() [2/2]

template<typename TMethod , StressType stressType, typename TGrid = typename std::conditional<stressType==Piola,Grid<Reference>,Grid<Current>>::type>
Stress< TMethod, stressType, TGrid >::Stress ( const Method< TMethod > &  method,
TGrid *  pgrid 
)
inline

Constructs a Stress object.

Definition at line 74 of file Stress.h.

◆ ~Stress()

template<typename TMethod , StressType stressType, typename TGrid = typename std::conditional<stressType==Piola,Grid<Reference>,Grid<Current>>::type>
Stress< TMethod, stressType, TGrid >::~Stress ( )
inline

Definition at line 128 of file Stress.h.

Member Function Documentation

◆ write() [1/2]

template<typename TMethod , StressType stressType, typename TGrid = typename std::conditional<stressType==Piola,Grid<Reference>,Grid<Current>>::type>
void Stress< TMethod, stressType, TGrid >::write ( )
inline

This function writes the stress field to a filename with extension .stress and prefix [name]. The output file is in a OVITO-readable format with nine columns. The first three columns represent the three coordinates of the grid points, and the last six columns are the six components of the stress field - \(\sigma_{xx}\), \(\sigma_{yy}\), \(\sigma_{zz}\), \(\sigma_{xy}\), \(\sigma_{xz}\), and \(\sigma_{yz}\)

Examples
crack/main.cpp, testLDADLJ.cpp, and testLJ.cpp.

Definition at line 90 of file Stress.h.

◆ write() [2/2]

template<typename TMethod , StressType stressType, typename TGrid = typename std::conditional<stressType==Piola,Grid<Reference>,Grid<Current>>::type>
void Stress< TMethod, stressType, TGrid >::write ( const std::string &  filename)
inline

Definition at line 119 of file Stress.h.

Member Data Documentation

◆ field

template<typename TMethod , StressType stressType, typename TGrid = typename std::conditional<stressType==Piola,Grid<Reference>,Grid<Current>>::type>
std::vector<Matrix3d> Stress< TMethod, stressType, TGrid >::field

A three-dimensional stress field.

Examples
testMls.cpp.

Definition at line 39 of file Stress.h.

◆ method

template<typename TMethod , StressType stressType, typename TGrid = typename std::conditional<stressType==Piola,Grid<Reference>,Grid<Current>>::type>
const Method<TMethod>& Stress< TMethod, stressType, TGrid >::method

The method used to compute the stress field. The Method object provides details about the weighting function and its support (averaging domain) and includes the bond function to compute the stress field.

Definition at line 51 of file Stress.h.

◆ name

template<typename TMethod , StressType stressType, typename TGrid = typename std::conditional<stressType==Piola,Grid<Reference>,Grid<Current>>::type>
std::string Stress< TMethod, stressType, TGrid >::name

The prefix of the filename that will be outputted when the stress field is written.

Definition at line 57 of file Stress.h.

◆ pgrid

template<typename TMethod , StressType stressType, typename TGrid = typename std::conditional<stressType==Piola,Grid<Reference>,Grid<Current>>::type>
TGrid* Stress< TMethod, stressType, TGrid >::pgrid

Pointer to the Grid on which the stress field is defined.

Definition at line 44 of file Stress.h.


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