v0.14.0
Public Member Functions | Public Attributes | List of all members
SimpleContactProblem::OpContactMaterialLhs Struct Reference

#include <users_modules/mortar_contact/src/SimpleContact.hpp>

Inheritance diagram for SimpleContactProblem::OpContactMaterialLhs:
[legend]
Collaboration diagram for SimpleContactProblem::OpContactMaterialLhs:
[legend]

Public Member Functions

MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 
virtual MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 
MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data)
 
 OpContactMaterialLhs (const string field_name_1, const string field_name_2, boost::shared_ptr< CommonDataSimpleContact > common_data_contact, const ContactOp::FaceType face_type, const int rank_row, const int rank_col, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnContactPrismSide > side_fe=NULL, const string side_fe_name="")
 

Public Attributes

boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnContactPrismSide > sideFe
 
string sideFeName
 
MatrixDouble matLhs
 
VectorInt rowIndices
 
VectorInt colIndices
 
int row_nb_dofs
 
int col_nb_dofs
 
int nb_gauss_pts
 
int nb_base_fun_row
 
int nb_base_fun_col
 
int rankRow
 
int rankCol
 

Detailed Description

Definition at line 494 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpContactMaterialLhs()

SimpleContactProblem::OpContactMaterialLhs::OpContactMaterialLhs ( const string  field_name_1,
const string  field_name_2,
boost::shared_ptr< CommonDataSimpleContact common_data_contact,
const ContactOp::FaceType  face_type,
const int  rank_row,
const int  rank_col,
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnContactPrismSide >  side_fe = NULL,
const string  side_fe_name = "" 
)
inline

Definition at line 526 of file SimpleContact.hpp.

534  : ContactOp(field_name_1, field_name_2, UserDataOperator::OPROWCOL,
535  face_type),
536  commonDataSimpleContact(common_data_contact), rankRow(rank_row),
537  rankCol(rank_col), sideFe(side_fe), sideFeName(side_fe_name) {
538  sYmm = false; // This will make sure to loop over all entities
539  }

Member Function Documentation

◆ aSsemble()

MoFEMErrorCode SimpleContactProblem::OpContactMaterialLhs::aSsemble ( EntData row_data,
EntData col_data 
)

Definition at line 3921 of file SimpleContact.cpp.

3922  {
3923 
3925 
3926  // get pointer to first global index on row
3927  const int *row_indices = &*row_data.getIndices().data().begin();
3928  // get pointer to first global index on column
3929  const int *col_indices = &*col_data.getIndices().data().begin();
3930 
3931  auto &data = *commonDataSimpleContact;
3932  if (data.forcesOnlyOnEntitiesRow.empty())
3934 
3935  if (!data.forcesOnlyOnEntitiesRow.empty()) {
3936  rowIndices.resize(row_nb_dofs, false);
3937  noalias(rowIndices) = row_data.getIndices();
3938  row_indices = &rowIndices[0];
3939  VectorDofs &dofs = row_data.getFieldDofs();
3940  VectorDofs::iterator dit = dofs.begin();
3941  for (int ii = 0; dit != dofs.end(); ++dit, ++ii) {
3942  if (data.forcesOnlyOnEntitiesRow.find((*dit)->getEnt()) ==
3943  data.forcesOnlyOnEntitiesRow.end()) {
3944  rowIndices[ii] = -1;
3945  }
3946  }
3947  }
3948 
3949  // assemble local matrix
3950  CHKERR MatSetValues(getSNESB(), row_nb_dofs, row_indices, col_nb_dofs,
3951  col_indices, &*matLhs.data().begin(), ADD_VALUES);
3952 
3954 }

◆ doWork()

MoFEMErrorCode SimpleContactProblem::OpContactMaterialLhs::doWork ( int  row_side,
int  col_side,
EntityType  row_type,
EntityType  col_type,
EntData row_data,
EntData col_data 
)

Definition at line 3811 of file SimpleContact.cpp.

3813  {
3814 
3816  if (row_type != MBVERTEX)
3818  row_nb_dofs = row_data.getIndices().size();
3819  if (!row_nb_dofs)
3821  col_nb_dofs = col_data.getIndices().size();
3822  if (!col_nb_dofs)
3824  nb_gauss_pts = row_data.getN().size1();
3825 
3826  nb_base_fun_row = row_data.getFieldData().size() / rankRow;
3827  nb_base_fun_col = col_data.getFieldData().size() / rankCol;
3828 
3830  matLhs.clear();
3831 
3832  // integrate local matrix for entity block
3833  CHKERR iNtegrate(row_data, col_data);
3834 
3835  // assemble local matrix
3836  CHKERR aSsemble(row_data, col_data);
3837 
3839 }

◆ iNtegrate()

virtual MoFEMErrorCode SimpleContactProblem::OpContactMaterialLhs::iNtegrate ( EntData row_data,
EntData col_data 
)
inlinevirtual

Member Data Documentation

◆ col_nb_dofs

int SimpleContactProblem::OpContactMaterialLhs::col_nb_dofs

Definition at line 506 of file SimpleContact.hpp.

◆ colIndices

VectorInt SimpleContactProblem::OpContactMaterialLhs::colIndices

Definition at line 503 of file SimpleContact.hpp.

◆ commonDataSimpleContact

boost::shared_ptr<CommonDataSimpleContact> SimpleContactProblem::OpContactMaterialLhs::commonDataSimpleContact

Definition at line 496 of file SimpleContact.hpp.

◆ matLhs

MatrixDouble SimpleContactProblem::OpContactMaterialLhs::matLhs

Definition at line 501 of file SimpleContact.hpp.

◆ nb_base_fun_col

int SimpleContactProblem::OpContactMaterialLhs::nb_base_fun_col

Definition at line 510 of file SimpleContact.hpp.

◆ nb_base_fun_row

int SimpleContactProblem::OpContactMaterialLhs::nb_base_fun_row

Definition at line 509 of file SimpleContact.hpp.

◆ nb_gauss_pts

int SimpleContactProblem::OpContactMaterialLhs::nb_gauss_pts

Definition at line 507 of file SimpleContact.hpp.

◆ rankCol

int SimpleContactProblem::OpContactMaterialLhs::rankCol

Definition at line 513 of file SimpleContact.hpp.

◆ rankRow

int SimpleContactProblem::OpContactMaterialLhs::rankRow

Definition at line 512 of file SimpleContact.hpp.

◆ row_nb_dofs

int SimpleContactProblem::OpContactMaterialLhs::row_nb_dofs

Definition at line 505 of file SimpleContact.hpp.

◆ rowIndices

VectorInt SimpleContactProblem::OpContactMaterialLhs::rowIndices

Definition at line 502 of file SimpleContact.hpp.

◆ sideFe

boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnContactPrismSide> SimpleContactProblem::OpContactMaterialLhs::sideFe

Definition at line 498 of file SimpleContact.hpp.

◆ sideFeName

string SimpleContactProblem::OpContactMaterialLhs::sideFeName

Definition at line 499 of file SimpleContact.hpp.


The documentation for this struct was generated from the following files:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
SimpleContactProblem::OpContactMaterialLhs::rowIndices
VectorInt rowIndices
Definition: SimpleContact.hpp:502
MoFEM::MatSetValues
MoFEMErrorCode MatSetValues(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Assemble PETSc matrix.
Definition: EntitiesFieldData.hpp:1644
SimpleContactProblem::OpContactMaterialLhs::nb_base_fun_col
int nb_base_fun_col
Definition: SimpleContact.hpp:510
SimpleContactProblem::OpContactMaterialLhs::rankCol
int rankCol
Definition: SimpleContact.hpp:513
SimpleContactProblem::OpContactMaterialLhs::aSsemble
MoFEMErrorCode aSsemble(EntData &row_data, EntData &col_data)
Definition: SimpleContact.cpp:3921
MoFEM::EntitiesFieldData::EntData::getFieldData
const VectorDouble & getFieldData() const
get dofs values
Definition: EntitiesFieldData.hpp:1254
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROWCOL
@ OPROWCOL
operator doWork is executed on FE rows &columns
Definition: ForcesAndSourcesCore.hpp:569
SimpleContactProblem::OpContactMaterialLhs::rankRow
int rankRow
Definition: SimpleContact.hpp:512
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
SimpleContactProblem::OpContactMaterialLhs::col_nb_dofs
int col_nb_dofs
Definition: SimpleContact.hpp:506
MoFEM::EntitiesFieldData::EntData::getIndices
const VectorInt & getIndices() const
Get global indices of dofs on entity.
Definition: EntitiesFieldData.hpp:1214
SimpleContactProblem::OpContactMaterialLhs::iNtegrate
virtual MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data)
Definition: SimpleContact.hpp:519
MoFEM::VectorDofs
ublas::vector< FEDofEntity *, DofsAllocator > VectorDofs
Definition: EntitiesFieldData.hpp:23
SimpleContactProblem::OpContactMaterialLhs::nb_base_fun_row
int nb_base_fun_row
Definition: SimpleContact.hpp:509
MoFEM::EntitiesFieldData::EntData::getFieldDofs
const VectorDofs & getFieldDofs() const
get dofs data stature FEDofEntity
Definition: EntitiesFieldData.hpp:1269
SimpleContactProblem::OpContactMaterialLhs::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:496
SimpleContactProblem::ContactOp
ContactPrismElementForcesAndSourcesCore::UserDataOperator ContactOp
Definition: SimpleContact.hpp:30
MoFEM::EntitiesFieldData::EntData::getN
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
Definition: EntitiesFieldData.hpp:1318
SimpleContactProblem::OpContactMaterialLhs::row_nb_dofs
int row_nb_dofs
Definition: SimpleContact.hpp:505
SimpleContactProblem::OpContactMaterialLhs::sideFe
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnContactPrismSide > sideFe
Definition: SimpleContact.hpp:498
SimpleContactProblem::OpContactMaterialLhs::matLhs
MatrixDouble matLhs
Definition: SimpleContact.hpp:501
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
SimpleContactProblem::OpContactMaterialLhs::sideFeName
string sideFeName
Definition: SimpleContact.hpp:499
SimpleContactProblem::OpContactMaterialLhs::nb_gauss_pts
int nb_gauss_pts
Definition: SimpleContact.hpp:507
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359