v0.14.0
Public Member Functions | List of all members
BCs_RVELagrange_Periodic::CommonFunctionsPeriodic Struct Reference

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

Public Member Functions

PetscErrorCode shapeMat (int rank, unsigned int gg, DataForcesAndSourcesCore::EntData &col_data, MatrixDouble &N_mat, int div=1)
 
PetscErrorCode shapeMatNew (int rank, unsigned int gg, MatrixDouble &RowN, MatrixDouble &N_mat, int div=1)
 

Detailed Description

Definition at line 90 of file BCs_RVELagrange_Periodic.hpp.

Member Function Documentation

◆ shapeMat()

PetscErrorCode BCs_RVELagrange_Periodic::CommonFunctionsPeriodic::shapeMat ( int  rank,
unsigned int  gg,
DataForcesAndSourcesCore::EntData col_data,
MatrixDouble &  N_mat,
int  div = 1 
)
inline

Definition at line 91 of file BCs_RVELagrange_Periodic.hpp.

93  {
94  PetscFunctionBegin;
95 
96  //we need it only for one face for periodic BC (col_data.getN() are shape functions inclding both faces, i.e. 6 shape functions for nodes)
97  int shape_size=col_data.getN().size2()/div;
98  // cout<<"shape_size = "<<shape_size<<endl;
99  // cout<<"rank = "<<rank<<endl;
100  N_mat.resize(rank,shape_size*rank); N_mat.clear();
101  int gg1=0; int kk=0;
102  for(int ii=0; ii<shape_size; ii++){ //number of shape functions
103  for(int jj=0; jj<rank; jj++){
104  // cout<<"ii "<<ii<<endl;
105  N_mat(jj,kk)=col_data.getN()(gg,gg1); kk++;
106  }
107  gg1++;
108  }
109  PetscFunctionReturn(0);
110  }

◆ shapeMatNew()

PetscErrorCode BCs_RVELagrange_Periodic::CommonFunctionsPeriodic::shapeMatNew ( int  rank,
unsigned int  gg,
MatrixDouble &  RowN,
MatrixDouble &  N_mat,
int  div = 1 
)
inline

Definition at line 114 of file BCs_RVELagrange_Periodic.hpp.

116  {
117  PetscFunctionBegin;
118 
119  //we need it only for one face for periodic BC (col_data.getN() are shape functions inclding both faces, i.e. 6 shape functions for nodes)
120  int shape_size=RowN.size2()/div;
121  // cout<<"shape_size = "<<shape_size<<endl;
122  // cout<<"rank = "<<rank<<endl;
123  N_mat.resize(rank,shape_size*rank); N_mat.clear();
124  int gg1=0; int kk=0;
125  for(int ii=0; ii<shape_size; ii++){ //number of shape functions
126  for(int jj=0; jj<rank; jj++){
127  // cout<<"ii "<<ii<<endl;
128  N_mat(jj,kk)=RowN(gg,gg1); kk++;
129  }
130  gg1++;
131  }
132  PetscFunctionReturn(0);
133  }

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