v0.15.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 735 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 737 of file ThermoElasticOps.hpp.

740 AssemblyDomainEleOp::OPROWCOL),
741 TPtr(T_ptr) {
742 sYmm = false;
743 }
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 745 of file ThermoElasticOps.hpp.

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

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 817 of file ThermoElasticOps.hpp.


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