v0.15.0
Loading...
Searching...
No Matches
OpGradTimesPerm Struct Reference

#include "tutorials/scl-12/src/electrostatics.hpp"

Inheritance diagram for OpGradTimesPerm:
[legend]
Collaboration diagram for OpGradTimesPerm:
[legend]

Public Member Functions

 OpGradTimesPerm (const std::string &field_name, boost::shared_ptr< MatrixDouble > grad_u_negative, boost::shared_ptr< MatrixDouble > grad_times_perm, boost::shared_ptr< std::map< int, BlockData > > perm_block_sets_ptr, boost::shared_ptr< DataAtIntegrationPts > common_data_ptr)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 

Private Attributes

boost::shared_ptr< MatrixDoublegradUNegative
 
boost::shared_ptr< MatrixDoublegradTimesPerm
 
boost::shared_ptr< std::map< int, BlockData > > permBlockSetsPtr
 
boost::shared_ptr< DataAtIntegrationPtscommonDataPtr
 

Detailed Description

Definition at line 247 of file electrostatics.hpp.

Constructor & Destructor Documentation

◆ OpGradTimesPerm()

OpGradTimesPerm::OpGradTimesPerm ( const std::string & field_name,
boost::shared_ptr< MatrixDouble > grad_u_negative,
boost::shared_ptr< MatrixDouble > grad_times_perm,
boost::shared_ptr< std::map< int, BlockData > > perm_block_sets_ptr,
boost::shared_ptr< DataAtIntegrationPts > common_data_ptr )
inline

Definition at line 249 of file electrostatics.hpp.

255 : DomainEleOp(field_name, field_name, OPROWCOL, false),
256 gradTimesPerm(grad_times_perm), gradUNegative(grad_u_negative),
257 permBlockSetsPtr(perm_block_sets_ptr), commonDataPtr(common_data_ptr) {
258 std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE], false);
259 doEntities[MBVERTEX] = true;
260 }
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
constexpr auto field_name
boost::shared_ptr< std::map< int, BlockData > > permBlockSetsPtr
boost::shared_ptr< MatrixDouble > gradTimesPerm
boost::shared_ptr< MatrixDouble > gradUNegative
boost::shared_ptr< DataAtIntegrationPts > commonDataPtr

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpGradTimesPerm::doWork ( int row_side,
int col_side,
EntityType row_type,
EntityType col_type,
EntitiesFieldData::EntData & row_data,
EntitiesFieldData::EntData & col_data )
inline

Definition at line 262 of file electrostatics.hpp.

265 {
267
268 size_t nb_gauss_pts = getGaussPts().size2();
269 gradTimesPerm->resize(SPACE_DIM, nb_gauss_pts, false);
270 gradTimesPerm->clear();
271 auto t_grad_times_perm = getFTensor1FromMat<SPACE_DIM>(*gradTimesPerm);
272 auto t_negative_grad_u = getFTensor1FromMat<SPACE_DIM>(*gradUNegative);
274 double blockPermittivity = 0.0;
275 for (const auto &n : *permBlockSetsPtr) {
276 if (n.second.domainEnts.find(getFEEntityHandle()) !=
277 n.second.domainEnts.end()) {
278 blockPermittivity = n.second.epsPermit;
279 }
280 }
281 for (int gg = 0; gg != nb_gauss_pts; gg++) {
282 t_grad_times_perm(I) = t_negative_grad_u(I) * blockPermittivity;
283
284 ++t_negative_grad_u;
285 ++t_grad_times_perm;
286 }
287
289 }
#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
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.
constexpr IntegrationType I

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<DataAtIntegrationPts> OpGradTimesPerm::commonDataPtr
private

Definition at line 295 of file electrostatics.hpp.

◆ gradTimesPerm

boost::shared_ptr<MatrixDouble> OpGradTimesPerm::gradTimesPerm
private

Definition at line 293 of file electrostatics.hpp.

◆ gradUNegative

boost::shared_ptr<MatrixDouble> OpGradTimesPerm::gradUNegative
private

Definition at line 292 of file electrostatics.hpp.

◆ permBlockSetsPtr

boost::shared_ptr<std::map<int, BlockData> > OpGradTimesPerm::permBlockSetsPtr
private

Definition at line 294 of file electrostatics.hpp.


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