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

Rhs for testing EP mapping with initial conditions. More...

#include "users_modules/multifield-thermoplasticity-private/src/EdgeFlippingOps.hpp"

Inheritance diagram for EdgeFlippingOps::OpRhsSetInitEP< A, I, DIM >:
[legend]
Collaboration diagram for EdgeFlippingOps::OpRhsSetInitEP< A, I, DIM >:
[legend]

Public Member Functions

 OpRhsSetInitEP (const std::string field_name, boost::shared_ptr< MatrixDouble > dot_EP_ptr, boost::shared_ptr< MatrixDouble > EP_ptr, boost::shared_ptr< MatrixDouble > grad_EP_ptr, boost::shared_ptr< double > initial_EP_ptr, boost::shared_ptr< double > peak_EP_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)
 

Private Attributes

boost::shared_ptr< MatrixDouble > dotEPPtr
 
boost::shared_ptr< MatrixDouble > EPPtr
 
boost::shared_ptr< MatrixDouble > gradEPPtr
 
boost::shared_ptr< MatrixDouble > gradQPtr
 
boost::shared_ptr< doubleinitialEPPtr
 
boost::shared_ptr< doublepeakEPPtr
 

Detailed Description

template<AssemblyType A, IntegrationType I, int DIM>
struct EdgeFlippingOps::OpRhsSetInitEP< A, I, DIM >

Rhs for testing EP mapping with initial conditions.

Examples
thermoplastic.cpp.

Definition at line 521 of file EdgeFlippingOps.hpp.

Constructor & Destructor Documentation

◆ OpRhsSetInitEP()

template<AssemblyType A, IntegrationType I, int DIM>
EdgeFlippingOps::OpRhsSetInitEP< A, I, DIM >::OpRhsSetInitEP ( const std::string  field_name,
boost::shared_ptr< MatrixDouble >  dot_EP_ptr,
boost::shared_ptr< MatrixDouble >  EP_ptr,
boost::shared_ptr< MatrixDouble >  grad_EP_ptr,
boost::shared_ptr< double initial_EP_ptr,
boost::shared_ptr< double peak_EP_ptr 
)
inline

Definition at line 523 of file EdgeFlippingOps.hpp.

529 : AssemblyDomainEleOp(field_name, field_name, AssemblyDomainEleOp::OPROW),
530 dotEPPtr(dot_EP_ptr), EPPtr(EP_ptr), gradEPPtr(grad_EP_ptr),
531 initialEPPtr(initial_EP_ptr), peakEPPtr(peak_EP_ptr) {}
constexpr auto field_name
boost::shared_ptr< double > peakEPPtr
boost::shared_ptr< double > initialEPPtr
boost::shared_ptr< MatrixDouble > EPPtr
boost::shared_ptr< MatrixDouble > gradEPPtr
boost::shared_ptr< MatrixDouble > dotEPPtr
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

template<AssemblyType A, IntegrationType I, int DIM>
MoFEMErrorCode EdgeFlippingOps::OpRhsSetInitEP< A, I, DIM >::iNtegrate ( EntitiesFieldData::EntData &  data)
inline
Examples
EdgeFlippingOps.hpp.

Definition at line 533 of file EdgeFlippingOps.hpp.

533 {
535
536 FTENSOR_INDEX(DIM, i);
537 FTENSOR_INDEX(DIM, j);
538 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
540
541 const double vol = getMeasure();
542 auto t_w = getFTensor0IntegrationWeight();
543 auto t_coords = getFTensor1CoordsAtGaussPts();
544 auto t_base = data.getFTensor0N();
545 auto t_diff_base = data.getFTensor1DiffN<SPACE_DIM>();
546
547#ifndef NDEBUG
548 if (data.getDiffN().size1() != data.getN().size1())
549 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 1");
550 if (data.getDiffN().size2() != data.getN().size2() * SPACE_DIM) {
551 MOFEM_LOG("SELF", Sev::error)
552 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
553 MOFEM_LOG("SELF", Sev::error) << data.getN();
554 MOFEM_LOG("SELF", Sev::error) << data.getDiffN();
555 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong size 2");
556 }
557#endif
558
559 auto t_EP = getFTensor2SymmetricFromMat<SPACE_DIM>(*EPPtr);
560 // auto t_grad_temp = getFTensor1FromMat<SPACE_DIM>(*gradTPtr);
561
562 const double alpha = t_w * vol;
563
565
567 auto &nf = AssemblyDomainEleOp::locF;
568
569 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
570
571 t_set_EP(0, 0) = init_T(*initialEPPtr, *peakEPPtr, t_coords(0),
572 t_coords(1), t_coords(2));
573 t_set_EP(1, 1) = t_set_EP(0, 0) - 0.01;
574 t_set_EP(0, 1) = t_set_EP(0, 0) - 0.02;
575
576 // if (DIM == 3) {
577 // t_set_EP(2, 2) = t_set_EP(0, 0) - 3.0;
578 // t_set_EP(0, 2) = t_set_EP(0, 0) - 4.0;
579 // t_set_EP(1, 2) = t_set_EP(0, 0) - 5.0;
580 // }
581
582 const double alpha = t_w * vol;
583
585 t_set_EP_L(L) = alpha * t_set_EP(i, j) * t_L(i, j, L);
586
587 auto t_nf = getFTensor1FromArray<size_symm, size_symm>(nf);
588 int bb = 0;
589 for (; bb != AssemblyDomainEleOp::nbRows / size_symm; ++bb) {
590 t_nf(L) -= t_base * (t_set_EP_L(L));
591 ++t_base;
592 ++t_diff_base;
593 ++t_nf;
594 }
595
596 for (; bb < nbRowBaseFunctions; ++bb) {
597 ++t_base;
598 ++t_diff_base;
599 }
600
601 ++t_EP;
602 // ++t_grad_g;
603
604 ++t_coords;
605 ++t_w;
606 }
607
609 }
#define FTENSOR_INDEX(DIM, I)
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.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
auto symm_L_tensor(FTensor::Number< DIM >)
auto init_T
Initialisation function for temperature field.
constexpr auto size_symm
Definition plastic.cpp:42

Member Data Documentation

◆ dotEPPtr

template<AssemblyType A, IntegrationType I, int DIM>
boost::shared_ptr<MatrixDouble> EdgeFlippingOps::OpRhsSetInitEP< A, I, DIM >::dotEPPtr
private
Examples
EdgeFlippingOps.hpp.

Definition at line 612 of file EdgeFlippingOps.hpp.

◆ EPPtr

template<AssemblyType A, IntegrationType I, int DIM>
boost::shared_ptr<MatrixDouble> EdgeFlippingOps::OpRhsSetInitEP< A, I, DIM >::EPPtr
private
Examples
EdgeFlippingOps.hpp.

Definition at line 613 of file EdgeFlippingOps.hpp.

◆ gradEPPtr

template<AssemblyType A, IntegrationType I, int DIM>
boost::shared_ptr<MatrixDouble> EdgeFlippingOps::OpRhsSetInitEP< A, I, DIM >::gradEPPtr
private
Examples
EdgeFlippingOps.hpp.

Definition at line 614 of file EdgeFlippingOps.hpp.

◆ gradQPtr

template<AssemblyType A, IntegrationType I, int DIM>
boost::shared_ptr<MatrixDouble> EdgeFlippingOps::OpRhsSetInitEP< A, I, DIM >::gradQPtr
private
Examples
EdgeFlippingOps.hpp.

Definition at line 615 of file EdgeFlippingOps.hpp.

◆ initialEPPtr

template<AssemblyType A, IntegrationType I, int DIM>
boost::shared_ptr<double> EdgeFlippingOps::OpRhsSetInitEP< A, I, DIM >::initialEPPtr
private
Examples
EdgeFlippingOps.hpp.

Definition at line 616 of file EdgeFlippingOps.hpp.

◆ peakEPPtr

template<AssemblyType A, IntegrationType I, int DIM>
boost::shared_ptr<double> EdgeFlippingOps::OpRhsSetInitEP< A, I, DIM >::peakEPPtr
private
Examples
EdgeFlippingOps.hpp.

Definition at line 617 of file EdgeFlippingOps.hpp.


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