v0.15.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
OpRhsSetInitT< A, I > Struct Template Reference

[Target temperature] More...

#include "users_modules/multifield-thermoplasticity-private/tutorials/adv-2/src/ThermoElasticOps.hpp"

Inheritance diagram for OpRhsSetInitT< A, I >:
[legend]
Collaboration diagram for OpRhsSetInitT< A, I >:
[legend]

Public Member Functions

 OpRhsSetInitT (const std::string field_name, boost::shared_ptr< VectorDouble > dot_T_ptr, boost::shared_ptr< VectorDouble > T_ptr, boost::shared_ptr< MatrixDouble > grad_T_ptr, boost::shared_ptr< double > initial_T_ptr, boost::shared_ptr< double > peak_T_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)
 

Private Attributes

boost::shared_ptr< VectorDouble > dotTPtr
 
boost::shared_ptr< VectorDouble > TPtr
 
boost::shared_ptr< MatrixDouble > gradTPtr
 
boost::shared_ptr< MatrixDouble > gradQPtr
 
boost::shared_ptr< doubleinitialTPtr
 
boost::shared_ptr< doublepeakTPtr
 

Detailed Description

template<AssemblyType A, IntegrationType I>
struct OpRhsSetInitT< A, I >

[Target temperature]

[Initial temperature]

Rhs for setting initial conditions

Examples
ThermoElasticOps.hpp, and thermoplastic.cpp.

Definition at line 654 of file ThermoElasticOps.hpp.

Constructor & Destructor Documentation

◆ OpRhsSetInitT()

template<AssemblyType A, IntegrationType I>
OpRhsSetInitT< A, I >::OpRhsSetInitT ( const std::string  field_name,
boost::shared_ptr< VectorDouble >  dot_T_ptr,
boost::shared_ptr< VectorDouble >  T_ptr,
boost::shared_ptr< MatrixDouble >  grad_T_ptr,
boost::shared_ptr< double initial_T_ptr,
boost::shared_ptr< double peak_T_ptr 
)
inline

Definition at line 656 of file ThermoElasticOps.hpp.

662 : AssemblyDomainEleOp(field_name, field_name, AssemblyDomainEleOp::OPROW),
663 dotTPtr(dot_T_ptr), TPtr(T_ptr), gradTPtr(grad_T_ptr),
664 initialTPtr(initial_T_ptr), peakTPtr(peak_T_ptr) {}
constexpr auto field_name
boost::shared_ptr< double > peakTPtr
boost::shared_ptr< VectorDouble > dotTPtr
boost::shared_ptr< VectorDouble > TPtr
boost::shared_ptr< MatrixDouble > gradTPtr
boost::shared_ptr< double > initialTPtr
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

template<AssemblyType A, IntegrationType I>
MoFEMErrorCode OpRhsSetInitT< A, I >::iNtegrate ( EntitiesFieldData::EntData &  data)
inline
Examples
ThermoElasticOps.hpp.

Definition at line 666 of file ThermoElasticOps.hpp.

666 {
668
669 const double vol = getMeasure();
670 auto t_w = getFTensor0IntegrationWeight();
671 auto t_coords = getFTensor1CoordsAtGaussPts();
672 auto t_base = data.getFTensor0N();
673 auto t_diff_base = data.getFTensor1DiffN<SPACE_DIM>();
674
675#ifndef NDEBUG
676 if (data.getDiffN().size1() != data.getN().size1())
677 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 1");
678 if (data.getDiffN().size2() != data.getN().size2() * SPACE_DIM) {
679 MOFEM_LOG("SELF", Sev::error)
680 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
681 MOFEM_LOG("SELF", Sev::error) << data.getN();
682 MOFEM_LOG("SELF", Sev::error) << data.getDiffN();
683 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 2");
684 }
685#endif
686
687 auto t_T = getFTensor0FromVec(*TPtr);
688 // auto t_grad_temp = getFTensor1FromMat<SPACE_DIM>(*gradTPtr);
689
690 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
691
692 const double alpha = t_w * vol;
693
694 const double set_T = init_T(*initialTPtr, *peakTPtr, t_coords(0),
695 t_coords(1), t_coords(2));
696 // const double m = get_M(set_T) * alpha;
697
698 int bb = 0;
699 for (; bb != nbRows; ++bb) {
700 locF[bb] += (t_base * alpha) * (t_T - set_T);
701 // locF[bb] += (t_diff_base(i) * m) * t_grad_g(i);
702 ++t_base;
703 ++t_diff_base;
704 }
705
706 for (; bb < nbRowBaseFunctions; ++bb) {
707 ++t_base;
708 ++t_diff_base;
709 }
710
711 ++t_T;
712 // ++t_grad_g;
713
714 ++t_coords;
715 ++t_w;
716 }
717
719 }
constexpr int SPACE_DIM
[Define dimension]
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MOFEM_LOG(channel, severity)
Log.
auto init_T
Initialisation function for temperature field.

Member Data Documentation

◆ dotTPtr

template<AssemblyType A, IntegrationType I>
boost::shared_ptr<VectorDouble> OpRhsSetInitT< A, I >::dotTPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 722 of file ThermoElasticOps.hpp.

◆ gradQPtr

template<AssemblyType A, IntegrationType I>
boost::shared_ptr<MatrixDouble> OpRhsSetInitT< A, I >::gradQPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 725 of file ThermoElasticOps.hpp.

◆ gradTPtr

template<AssemblyType A, IntegrationType I>
boost::shared_ptr<MatrixDouble> OpRhsSetInitT< A, I >::gradTPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 724 of file ThermoElasticOps.hpp.

◆ initialTPtr

template<AssemblyType A, IntegrationType I>
boost::shared_ptr<double> OpRhsSetInitT< A, I >::initialTPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 726 of file ThermoElasticOps.hpp.

◆ peakTPtr

template<AssemblyType A, IntegrationType I>
boost::shared_ptr<double> OpRhsSetInitT< A, I >::peakTPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 727 of file ThermoElasticOps.hpp.

◆ TPtr

template<AssemblyType A, IntegrationType I>
boost::shared_ptr<VectorDouble> OpRhsSetInitT< A, I >::TPtr
private
Examples
ThermoElasticOps.hpp.

Definition at line 723 of file ThermoElasticOps.hpp.


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