190 {
191 PetscFunctionBegin;
192
193 try {
194 if(row_data.getIndices().size()==0) PetscFunctionReturn(0);
195 if(col_data.getIndices().size()==0) PetscFunctionReturn(0);
196
197 int nb_row = row_data.getIndices().size();
198 int nb_col = col_data.getIndices().size();
199
200
201 const FENumeredDofEntity *dof_ptr;
202 ierr = getNumeredEntFiniteElementPtr()->getColDofsByPetscGlobalDofIdx(col_data.getIndices()[0],&dof_ptr); CHKERRQ(
ierr);
203 int rank = dof_ptr->getNbOfCoeffs();
204
205 K.resize(nb_row,nb_col);
207
208 N_mat_row.resize(col_data.getN().size1());
209 for(unsigned int gg = 0;gg<col_data.getN().size1();gg++) {
210 double area;
212 area = norm_2(getNormalsAtGaussPt(gg))*0.5;
213 } else {
214 area = getArea();
215 }
216 double val = getGaussPts()(2,gg)*area;
217
218 if(col_type==MBVERTEX) {
220 }
223
224 if(gg==0){
227 } else {
230 }
231 }
232
233
234 int nb_rows=row_data.getIndices().size();
235 int nb_cols=col_data.getIndices().size();
237 Aij,nb_rows,&row_data.getIndices()[0],nb_cols,&col_data.getIndices()[0],&
K(0,0),ADD_VALUES
239
240
243 Aij,nb_cols,&col_data.getIndices()[0],nb_rows,&row_data.getIndices()[0],&
transK(0,0),ADD_VALUES
245
246 } catch (const std::exception& ex) {
247 ostringstream ss;
248 ss << "throw in method: " << ex.what() << endl;
250 }
251 PetscFunctionReturn(0);
252 }
static PetscErrorCode ierr
MoFEMErrorCode MatSetValues(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Assemble PETSc matrix.
PetscErrorCode shapeMat(int rank, unsigned int gg, DataForcesAndSurcesCore::EntData &col_data, MatrixDouble &n)
PetscErrorCode hMat(VectorDouble face_normal, int rank, MatrixDouble &n_mat, MatrixDouble &h_mat)
ublas::vector< MatrixDouble > N_mat_row