v0.16.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 657 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 659 of file ThermoElasticOps.hpp.

665 : AssemblyDomainEleOp(field_name, field_name, AssemblyDomainEleOp::OPROW),
666 dotTPtr(dot_T_ptr), TPtr(T_ptr), gradTPtr(grad_T_ptr),
667 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 669 of file ThermoElasticOps.hpp.

669 {
671
672 const double vol = getMeasure();
673 auto t_w = getFTensor0IntegrationWeight();
674 auto t_coords = getFTensor1CoordsAtGaussPts();
675 auto t_base = data.getFTensor0N();
676 auto t_diff_base = data.getFTensor1DiffN<SPACE_DIM>();
677
678#ifndef NDEBUG
679 if (data.getDiffN().size1() != data.getN().size1())
680 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 1");
681 if (data.getDiffN().size2() != data.getN().size2() * SPACE_DIM) {
682 MOFEM_LOG("SELF", Sev::error)
683 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
684 MOFEM_LOG("SELF", Sev::error) << data.getN();
685 MOFEM_LOG("SELF", Sev::error) << data.getDiffN();
686 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 2");
687 }
688#endif
689
690 auto t_T = getFTensor0FromVec(*TPtr);
691 // auto t_grad_temp = getFTensor1FromMat<SPACE_DIM>(*gradTPtr);
692
693 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
694
695 const double alpha = t_w * vol;
696
697 const double set_T = init_T(*initialTPtr, *peakTPtr, t_coords(0),
698 t_coords(1), t_coords(2));
699 // const double m = get_M(set_T) * alpha;
700
701 int bb = 0;
702 for (; bb != nbRows; ++bb) {
703 locF[bb] += (t_base * alpha) * (t_T - set_T);
704 // locF[bb] += (t_diff_base(i) * m) * t_grad_g(i);
705 ++t_base;
706 ++t_diff_base;
707 }
708
709 for (; bb < nbRowBaseFunctions; ++bb) {
710 ++t_base;
711 ++t_diff_base;
712 }
713
714 ++t_T;
715 // ++t_grad_g;
716
717 ++t_coords;
718 ++t_w;
719 }
720
722 }
constexpr int SPACE_DIM
#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 725 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 728 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 727 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 729 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 730 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 726 of file ThermoElasticOps.hpp.


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