v0.14.0
Public Member Functions | Protected Attributes | List of all members
OpElectricDispJump< SPACE_DIM > Struct Template Reference

#include <tutorials/scl-12/src/electrostatics.hpp>

Inheritance diagram for OpElectricDispJump< SPACE_DIM >:
[legend]
Collaboration diagram for OpElectricDispJump< SPACE_DIM >:
[legend]

Public Member Functions

 OpElectricDispJump (const std::string field_name, boost::shared_ptr< MatrixDouble > grad_ptr, boost::shared_ptr< MatrixDouble > d_jump, boost::shared_ptr< DataAtIntegrationPts > common_data_ptr, boost::shared_ptr< std::map< int, BlockData >> perm_block_sets_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Protected Attributes

boost::shared_ptr< MatrixDouble > gradPtr
 
boost::shared_ptr< MatrixDouble > djump
 
boost::shared_ptr< std::map< int, BlockData > > permBlockSetsPtr
 
boost::shared_ptr< DataAtIntegrationPtscommonDataPtr
 

Detailed Description

template<int SPACE_DIM>
struct OpElectricDispJump< SPACE_DIM >

Definition at line 300 of file electrostatics.hpp.

Constructor & Destructor Documentation

◆ OpElectricDispJump()

template<int SPACE_DIM>
OpElectricDispJump< SPACE_DIM >::OpElectricDispJump ( const std::string  field_name,
boost::shared_ptr< MatrixDouble >  grad_ptr,
boost::shared_ptr< MatrixDouble >  d_jump,
boost::shared_ptr< DataAtIntegrationPts common_data_ptr,
boost::shared_ptr< std::map< int, BlockData >>  perm_block_sets_ptr 
)
inline

Definition at line 301 of file electrostatics.hpp.

306  : SideEleOp(field_name, SideEleOp::OPROW, false), gradPtr(grad_ptr),
307  djump(d_jump), commonDataPtr(common_data_ptr),
308  permBlockSetsPtr(perm_block_sets_ptr)
309 
310  {
311  std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE], false);
312  doEntities[MBVERTEX] = true;
313  }

Member Function Documentation

◆ doWork()

template<int SPACE_DIM>
MoFEMErrorCode OpElectricDispJump< SPACE_DIM >::doWork ( int  side,
EntityType  type,
EntData data 
)
inline

Definition at line 315 of file electrostatics.hpp.

315  {
317 
319  auto t_field_grad = getFTensor1FromMat<SPACE_DIM>(*gradPtr);
320 
321  double blockPermittivity = 0.0;
322 
323  for (const auto &n : *permBlockSetsPtr) {
324  if (n.second.domainEnts.find(getFEEntityHandle()) !=
325  n.second.domainEnts.end()) {
326  blockPermittivity = n.second.epsPermit;
327  }
328  }
329  auto N_InLoop = getNinTheLoop();
330  auto sensee = getSkeletonSense();
331  auto nb_gauss_pts = getGaussPts().size2();
332 
333  if (N_InLoop == 0) {
334  djump->resize(SPACE_DIM, nb_gauss_pts, false);
335  djump->clear();
336  }
337  auto t_jump = getFTensor1FromMat<SPACE_DIM>(*djump);
338 
339  for (int gg = 0; gg != nb_gauss_pts; gg++) {
340  t_jump(i) -= t_field_grad(i) * blockPermittivity * sensee;
341  ++t_jump;
342  ++t_field_grad;
343  }
344 
346  }

Member Data Documentation

◆ commonDataPtr

template<int SPACE_DIM>
boost::shared_ptr<DataAtIntegrationPts> OpElectricDispJump< SPACE_DIM >::commonDataPtr
protected

Definition at line 352 of file electrostatics.hpp.

◆ djump

template<int SPACE_DIM>
boost::shared_ptr<MatrixDouble> OpElectricDispJump< SPACE_DIM >::djump
protected

Definition at line 350 of file electrostatics.hpp.

◆ gradPtr

template<int SPACE_DIM>
boost::shared_ptr<MatrixDouble> OpElectricDispJump< SPACE_DIM >::gradPtr
protected

Definition at line 349 of file electrostatics.hpp.

◆ permBlockSetsPtr

template<int SPACE_DIM>
boost::shared_ptr<std::map<int, BlockData> > OpElectricDispJump< SPACE_DIM >::permBlockSetsPtr
protected

Definition at line 351 of file electrostatics.hpp.


The documentation for this struct was generated from the following file:
OpElectricDispJump::djump
boost::shared_ptr< MatrixDouble > djump
Definition: electrostatics.hpp:350
SPACE_DIM
constexpr int SPACE_DIM
Definition: electrostatics.hpp:10
SideEleOp
SideEle::UserDataOperator SideEleOp
Definition: electrostatics.hpp:21
OpElectricDispJump::permBlockSetsPtr
boost::shared_ptr< std::map< int, BlockData > > permBlockSetsPtr
Definition: electrostatics.hpp:351
OpElectricDispJump::commonDataPtr
boost::shared_ptr< DataAtIntegrationPts > commonDataPtr
Definition: electrostatics.hpp:352
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index< 'i', SPACE_DIM >
convert.n
n
Definition: convert.py:82
OpElectricDispJump::gradPtr
boost::shared_ptr< MatrixDouble > gradPtr
Definition: electrostatics.hpp:349
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359