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

Lhs for setting initial conditions wrt T. More...

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

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

Public Member Functions

 OpLhsSetInitT_dT (const std::string field_name, boost::shared_ptr< VectorDouble > T_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 

Private Attributes

boost::shared_ptr< VectorDouble > TPtr
 

Detailed Description

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

Lhs for setting initial conditions wrt T.

Examples
ThermoElasticOps.hpp.

Definition at line 738 of file ThermoElasticOps.hpp.

Constructor & Destructor Documentation

◆ OpLhsSetInitT_dT()

template<AssemblyType A, IntegrationType I>
OpLhsSetInitT_dT< A, I >::OpLhsSetInitT_dT ( const std::string  field_name,
boost::shared_ptr< VectorDouble >  T_ptr 
)
inline

Definition at line 740 of file ThermoElasticOps.hpp.

743 AssemblyDomainEleOp::OPROWCOL),
744 TPtr(T_ptr) {
745 sYmm = false;
746 }
constexpr auto field_name
boost::shared_ptr< VectorDouble > TPtr
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

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

Definition at line 748 of file ThermoElasticOps.hpp.

749 {
751
752 const double vol = getMeasure();
753 auto t_w = getFTensor0IntegrationWeight();
754 auto t_coords = getFTensor1CoordsAtGaussPts();
755 auto t_row_base = row_data.getFTensor0N();
756 auto t_row_diff_base = row_data.getFTensor1DiffN<SPACE_DIM>();
757
758#ifndef NDEBUG
759 if (row_data.getDiffN().size1() != row_data.getN().size1())
760 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 1");
761 if (row_data.getDiffN().size2() != row_data.getN().size2() * SPACE_DIM) {
762 MOFEM_LOG("SELF", Sev::error)
763 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
764 MOFEM_LOG("SELF", Sev::error) << row_data.getN();
765 MOFEM_LOG("SELF", Sev::error) << row_data.getDiffN();
766 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 2");
767 }
768
769 if (col_data.getDiffN().size1() != col_data.getN().size1())
770 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 1");
771 if (col_data.getDiffN().size2() != col_data.getN().size2() * SPACE_DIM) {
772 MOFEM_LOG("SELF", Sev::error)
773 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
774 MOFEM_LOG("SELF", Sev::error) << col_data.getN();
775 MOFEM_LOG("SELF", Sev::error) << col_data.getDiffN();
776 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 2");
777 }
778#endif
779
780 auto t_T = getFTensor0FromVec(*TPtr);
781 // auto t_grad_g = getFTensor1FromMat<SPACE_DIM>(*gradGPtr);
782
783 for (int gg = 0; gg != nbIntegrationPts; gg++) {
784
785 const double alpha = t_w * vol;
786
787 int rr = 0;
788 for (; rr != nbRows; ++rr) {
789
790 auto t_col_base = col_data.getFTensor0N(gg, 0);
791 auto t_col_diff_base = col_data.getFTensor1DiffN<SPACE_DIM>(gg, 0);
792
793 for (int cc = 0; cc != nbCols; ++cc) {
794
795 locMat(rr, cc) += (t_row_base * t_col_base * alpha);
796
797 ++t_col_base;
798 ++t_col_diff_base;
799 }
800
801 ++t_row_base;
802 ++t_row_diff_base;
803 }
804
805 for (; rr < nbRowBaseFunctions; ++rr) {
806 ++t_row_base;
807 ++t_row_diff_base;
808 }
809
810 ++t_T;
811 // ++t_grad_g;
812 ++t_w;
813 ++t_coords;
814 }
815
817 }
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.

Member Data Documentation

◆ TPtr

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

Definition at line 820 of file ThermoElasticOps.hpp.


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