#include "tutorials/cor-2to5/src/PoissonOperators.hpp"
Definition at line 588 of file PoissonOperators.hpp.
 
◆ OpKt()
  
  | 
        
          | PoissonExample::OpKt::OpKt | ( | boost::function< double(const double)> | a, |  
          |  |  | boost::function< double(const double)> | diff_a, |  
          |  |  | boost::shared_ptr< VectorDouble > & | field_vals, |  
          |  |  | boost::shared_ptr< MatrixDouble > & | grad_vals |  
          |  | ) |  |  |  | inline | 
 
Definition at line 590 of file PoissonOperators.hpp.
boost::function< double(const double)> diffA
boost::shared_ptr< MatrixDouble > gradVals
boost::shared_ptr< VectorDouble > fieldVals
boost::function< double(const double)> A
 
 
 
◆ iNtegrate()
Integrate grad-grad operator. 
- Parameters
- 
  
    | row_data | row data (consist base functions on row entity) |  | col_data | column data (consist base functions on column entity) |  
 
- Returns
- error code 
Reimplemented from PoissonExample::OpK.
- Examples
- mofem/tutorials/cor-2to5/src/PoissonOperators.hpp.
Definition at line 604 of file PoissonOperators.hpp.
  605                                                                      {
  607    
  609    
  611    
  612    double vol = getVolume();
  613    
  614    auto t_w = getFTensor0IntegrationWeight();
  615    
  617    
  618    auto t_grad = getFTensor1FromMat<3>(*
gradVals);
 
  619    
  621    
  623      
  624      const double alpha = t_w * vol;
  625      const double beta = alpha * 
A(t_u);
 
  627      t_gamma(
i) = (alpha * 
diffA(t_u)) * t_grad(
i);
 
  628      
  631      
  632      for (
int rr = 0; rr != 
nbRows; rr++) {
 
  633        
  635        
  637        
  638        for (
int cc = 0; cc != 
nbCols; cc++) {
 
  639          
  640          a += (t_row_grad(
i) * beta) * t_col_grad(
i) +
 
  641               t_row_grad(
i) * (t_gamma(
i) * t_col);
 
  642          ++t_col;      
  643          ++t_col_grad; 
  645        }
  646        ++t_row_grad; 
  647                      
  648      }
  649      ++t_w;    
  650      ++t_u;    
  651      ++t_grad; 
  652    }
  654  }
#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()
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
int nbCols
number if dof on column
MatrixDouble locMat
local entity block matrix
int nbIntegrationPts
number of integration points
FTensor::Index< 'i', 3 > i
summit Index
 
 
  
  | 
        
          | boost::function<double(const double)> PoissonExample::OpKt::A |  | protected | 
 
 
◆ diffA
  
  | 
        
          | boost::function<double(const double)> PoissonExample::OpKt::diffA |  | protected | 
 
 
◆ fieldVals
  
  | 
        
          | boost::shared_ptr<VectorDouble> PoissonExample::OpKt::fieldVals |  | protected | 
 
 
◆ gradVals
  
  | 
        
          | boost::shared_ptr<MatrixDouble> PoissonExample::OpKt::gradVals |  | protected | 
 
 
The documentation for this struct was generated from the following file: