v0.15.0
Loading...
Searching...
No Matches
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< MatrixDoublegradPtr
 
boost::shared_ptr< MatrixDoubledjump
 
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 }
SideEle::UserDataOperator SideEleOp
constexpr auto field_name
boost::shared_ptr< std::map< int, BlockData > > permBlockSetsPtr
boost::shared_ptr< MatrixDouble > djump
boost::shared_ptr< MatrixDouble > gradPtr
boost::shared_ptr< DataAtIntegrationPts > commonDataPtr

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 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
constexpr int SPACE_DIM
FTensor::Index< 'i', SPACE_DIM > i
const double n
refractive index of diffusive medium
FTensor::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.

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: