◆ OpS()
  
  | 
        
          | OpS::OpS | ( | const bool | beta = 1 | ) |  |  | inline | 
 
 
◆ aSsemble()
Assemble local entity block matrix. 
- Parameters
- 
  
    | row_data | row data (consist base functions on row entity) |  | col_data | column data (consist base functions on column entity) |  
 
- Returns
- error code 
- Examples
- mofem/tutorials/cor-2to5/analytical_poisson_field_split.cpp.
Definition at line 184 of file analytical_poisson_field_split.cpp.
  185                                                                     {
  187    
  188    const int *row_indices = &*row_data.
getIndices().data().begin();
 
  189    
  190    const int *col_indices = &*col_data.
getIndices().data().begin();
 
  191    Mat 
B = getFEMethod()->ksp_B != PETSC_NULLPTR ? getFEMethod()->ksp_B
 
  192                                               : getFEMethod()->snes_B;
  193    
  195                        &*
locMat.data().begin(), ADD_VALUES);
 
  197      
  198      
  201                          &*
locMat.data().begin(), ADD_VALUES);
 
  202    }
  204  }
#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()
#define CHKERR
Inline error check.
MoFEMErrorCode MatSetValues(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Assemble PETSc matrix.
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.
int nbRows
number of dofs on rows
int nbCols
number if dof on column
MatrixDouble locMat
local entity block matrix
bool isDiag
true if this block is on diagonal
 
 
◆ doWork()
Do calculations for give operator. 
- Parameters
- 
  
    | row_side | row side number (local number) of entity on element |  | col_side | column side number (local number) of entity on element |  | row_type | type of row entity MBVERTEX, MBEDGE, MBTRI or MBTET |  | col_type | type of column entity MBVERTEX, MBEDGE, MBTRI or MBTET |  | row_data | data for row |  | col_data | data for column |  
 
- Returns
- error code 
- Examples
- mofem/tutorials/cor-2to5/analytical_poisson_field_split.cpp.
Definition at line 90 of file analytical_poisson_field_split.cpp.
   93                                                            {
   95    
   97    
  100    
  102    
  105    
  107    
  108    if (row_side == col_side && row_type == col_type) {
  110    } else {
  112    }
  113    
  115    
  118  }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
int nbIntegrationPts
number of integration points
MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Integrate grad-grad operator.
MoFEMErrorCode aSsemble(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Assemble local entity block matrix.
 
 
◆ 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 
- Examples
- mofem/tutorials/cor-2to5/analytical_poisson_field_split.cpp.
Definition at line 139 of file analytical_poisson_field_split.cpp.
  140                                                                      {
  142    
  144    
  146    
  147    double area = getArea() * 
bEta;
 
  148    
  149    auto t_w = getFTensor0IntegrationWeight();
  150    
  152    
  154      
  155      const double alpha = t_w * area;
  156      
  159      
  160      for (
int rr = 0; rr != 
nbRows; rr++) {
 
  161        
  163        
  164        for (
int cc = 0; cc != 
nbCols; cc++) {
 
  165          
  166          a += alpha * t_row_base * t_col_base;
 
  167          ++t_col_base; 
  169        }
  170        ++t_row_base; 
  171                      
  172      }
  173      ++t_w; 
  174    }
  176  }
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
 
 
◆ bEta
◆ isDiag
◆ locMat
◆ nbCols
◆ nbIntegrationPts
  
  | 
        
          | int OpS::nbIntegrationPts |  | private | 
 
 
◆ nbRows
The documentation for this struct was generated from the following file: