v0.13.1
Public Member Functions | Public Attributes | List of all members
BCs_RVELagrange_Periodic::OpRVEBCsPeriodicCalDispAtGaussPts Struct Reference

#include <users_modules/homogenisation/src/BCs_RVELagrange_Periodic.hpp>

Inherits FlatPrismElementForcesAndSurcesCore::UserDataOperator.

Collaboration diagram for BCs_RVELagrange_Periodic::OpRVEBCsPeriodicCalDispAtGaussPts:
[legend]

Public Member Functions

 OpRVEBCsPeriodicCalDispAtGaussPts (const string field_name, RVEBC_Data_Periodic &data, CommonDataPeriodic &common_data_periodic, CommonFunctionsPeriodic &common_functions_periodic, bool ho_geometry=false)
 
PetscErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 

Public Attributes

RVEBC_Data_PeriodicdAta
 
bool hoGeometry
 
CommonDataPeriodiccommonDataPeriodic
 
CommonFunctionsPeriodiccommonFunctionsPeriodic
 
ublas::vector< VectorDouble > field_data_nodes
 
MatrixDouble N_mat
 

Detailed Description

Definition at line 740 of file BCs_RVELagrange_Periodic.hpp.

Constructor & Destructor Documentation

◆ OpRVEBCsPeriodicCalDispAtGaussPts()

BCs_RVELagrange_Periodic::OpRVEBCsPeriodicCalDispAtGaussPts::OpRVEBCsPeriodicCalDispAtGaussPts ( const string  field_name,
RVEBC_Data_Periodic data,
CommonDataPeriodic common_data_periodic,
CommonFunctionsPeriodic common_functions_periodic,
bool  ho_geometry = false 
)

Definition at line 747 of file BCs_RVELagrange_Periodic.hpp.

753 :
755 field_name,UserDataOperator::OPCOL
756 ),
757 dAta(data),
758 hoGeometry(ho_geometry),
759 commonDataPeriodic(common_data_periodic),
760 commonFunctionsPeriodic(common_functions_periodic) {
761 }
ForcesAndSourcesCore::UserDataOperator UserDataOperator
constexpr auto field_name

Member Function Documentation

◆ doWork()

PetscErrorCode BCs_RVELagrange_Periodic::OpRVEBCsPeriodicCalDispAtGaussPts::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData data 
)

Definition at line 768 of file BCs_RVELagrange_Periodic.hpp.

768 {
769 PetscFunctionBegin;
770// cout<<" OpRVEBCsPeriodicCalDispAtGaussPts "<<endl;
771 if(data.getIndices().size()==0) PetscFunctionReturn(0);
772 int nb_gauss_pts = data.getN().size1();
773 int rank = data.getFieldDofs()[0]->getNbOfCoeffs();
774
775 //initialize
776 if(type == MBVERTEX) {
778 field_data_nodes.resize(2);
779
780 commonDataPeriodic.DispAtGaussPts[0].resize(nb_gauss_pts);
781 commonDataPeriodic.DispAtGaussPts[1].resize(nb_gauss_pts);
782 for(int gg = 0;gg<nb_gauss_pts;gg++) {
783 commonDataPeriodic.DispAtGaussPts[0][gg].resize(rank); commonDataPeriodic.DispAtGaussPts[0][gg].clear();
784 commonDataPeriodic.DispAtGaussPts[1][gg].resize(rank); commonDataPeriodic.DispAtGaussPts[1][gg].clear();
785 }
786
787 int nb=data.getFieldData().size()/2; //for one face for nodes only (total indieces are for both faces)
788 field_data_nodes[0].resize(nb); //1st face of prism -- nodes
789 field_data_nodes[1].resize(nb); //2nd face of prism -- nodes
790
791 for(int ii=0; ii<nb; ii++){
792 field_data_nodes[0][ii]=data.getFieldData()[ii];
793 field_data_nodes[1][ii]=data.getFieldData()[ii+nb];
794 }
795// cout<<"field_data_nodes[0] "<<field_data_nodes[0]<<endl;
796// cout<<"field_data_nodes[1] "<<field_data_nodes[1]<<endl;
797 }
798
799 for(unsigned int gg = 0; gg<nb_gauss_pts;gg++) {
800 if(type == MBVERTEX) {
801 ierr = commonFunctionsPeriodic.shapeMat(rank, gg, data, N_mat, 2); CHKERRQ(ierr);}
802 else {
803 ierr = commonFunctionsPeriodic.shapeMat(rank, gg, data, N_mat); CHKERRQ(ierr);}
804
805 if(type == MBVERTEX) {
808 else if(type == MBEDGE && side < 3){
809 commonDataPeriodic.DispAtGaussPts[0][gg]+=prod(N_mat, data.getFieldData());}
810 else if(type == MBEDGE && side >= 6){
811 commonDataPeriodic.DispAtGaussPts[1][gg]+=prod(N_mat, data.getFieldData());}
812 else if(type == MBTRI && side == 3){
813 commonDataPeriodic.DispAtGaussPts[0][gg]+=prod(N_mat, data.getFieldData());}
814 else if(type == MBTRI && side == 4){
815 commonDataPeriodic.DispAtGaussPts[1][gg]+=prod(N_mat, data.getFieldData());}
816 }
817
818 PetscFunctionReturn(0);
819 }
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:87
ublas::vector< ublas::vector< VectorDouble > > DispAtGaussPts
PetscErrorCode shapeMat(int rank, unsigned int gg, DataForcesAndSourcesCore::EntData &col_data, MatrixDouble &N_mat, int div=1)

Member Data Documentation

◆ commonDataPeriodic

CommonDataPeriodic& BCs_RVELagrange_Periodic::OpRVEBCsPeriodicCalDispAtGaussPts::commonDataPeriodic

Definition at line 744 of file BCs_RVELagrange_Periodic.hpp.

◆ commonFunctionsPeriodic

CommonFunctionsPeriodic& BCs_RVELagrange_Periodic::OpRVEBCsPeriodicCalDispAtGaussPts::commonFunctionsPeriodic

Definition at line 745 of file BCs_RVELagrange_Periodic.hpp.

◆ dAta

RVEBC_Data_Periodic& BCs_RVELagrange_Periodic::OpRVEBCsPeriodicCalDispAtGaussPts::dAta

Definition at line 742 of file BCs_RVELagrange_Periodic.hpp.

◆ field_data_nodes

ublas::vector<VectorDouble > BCs_RVELagrange_Periodic::OpRVEBCsPeriodicCalDispAtGaussPts::field_data_nodes

Definition at line 764 of file BCs_RVELagrange_Periodic.hpp.

◆ hoGeometry

bool BCs_RVELagrange_Periodic::OpRVEBCsPeriodicCalDispAtGaussPts::hoGeometry

Definition at line 743 of file BCs_RVELagrange_Periodic.hpp.

◆ N_mat

MatrixDouble BCs_RVELagrange_Periodic::OpRVEBCsPeriodicCalDispAtGaussPts::N_mat

Definition at line 765 of file BCs_RVELagrange_Periodic.hpp.


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