19 #ifndef __BCS_RVELAGRANGE_TRAC_HPP
20 #define __BCS_RVELAGRANGE_TRAC_HPP
38 int shape_size = col_data.getN().size2();
40 n.resize(rank,shape_size*rank);
44 for(
int ii=0; ii<shape_size; ii++){
45 double val = col_data.getN()(gg,ii);
46 for(
int jj=0; jj<rank; jj++){
52 PetscFunctionReturn(0);
71 if(face_normal[0]>0) {
75 }
else if(face_normal[0]<0) {
79 }
else if(face_normal[1]>0) {
83 }
else if(face_normal[1]<0) {
87 }
else if(face_normal[2]>0) {
91 }
else if(face_normal[2]<0) {
96 SETERRQ(PETSC_COMM_SELF,MOFEM_IMPOSIBLE_CASE,
"Can not be ?!");
99 int num_col = n_mat.size2();
100 h_mat.resize(6,num_col);
103 for(
int bb = 0; bb<num_col/3; bb++) {
105 for(
int rr = 0; rr<6; rr++) {
106 for(
int cc = 0; cc<3; cc++) {
119 if(face_normal[0]>0) {
122 if(face_normal[0]<0) {
125 if(face_normal[1]>0) {
128 if(face_normal[1]<0) {
131 if(face_normal[2]>0) {
134 if(face_normal[2]<0) {
138 int num_col = n_mat.size2();
139 h_mat.resize(3,num_col);
142 for(
int bb = 0; bb<num_col; bb++) {
144 for(
int rr = 0; rr<3; rr++) {
145 for(
int cc = 0; cc<1; cc++) {
157 PetscFunctionReturn(0);
186 int row_side,
int col_side,
187 EntityType row_type,EntityType col_type,
194 if(row_data.getIndices().size()==0) PetscFunctionReturn(0);
195 if(col_data.getIndices().size()==0) PetscFunctionReturn(0);
197 int nb_row = row_data.getIndices().size();
198 int nb_col = col_data.getIndices().size();
201 getNumeredEntFiniteElementPtr()->getRowDofsByPetscGlobalDofIdx(
202 col_data.getIndices()[0]);
203 const FENumeredDofEntity *dof_ptr;
204 if (
auto ptr = weak_ptr_dof.lock())
209 int rank = dof_ptr->getNbOfCoeffs();
211 K.resize(nb_row,nb_col);
214 N_mat_row.resize(col_data.getN().size1());
215 for(
unsigned int gg = 0;gg<col_data.getN().size1();gg++) {
218 area = norm_2(getNormalsAtGaussPts(gg))*0.5;
222 double val = getGaussPts()(2,gg)*area;
224 if(col_type==MBVERTEX) {
240 int nb_rows=row_data.getIndices().size();
241 int nb_cols=col_data.getIndices().size();
243 Aij,nb_rows,&row_data.getIndices()[0],nb_cols,&col_data.getIndices()[0],&
K(0,0),ADD_VALUES
249 Aij,nb_cols,&col_data.getIndices()[0],nb_rows,&row_data.getIndices()[0],&
transK(0,0),ADD_VALUES
252 }
catch (
const std::exception& ex) {
254 ss <<
"throw in method: " << ex.what() << endl;
257 PetscFunctionReturn(0);
285 if(
type!=MBVERTEX) PetscFunctionReturn(0);
286 if(data.getIndices().size()==0) PetscFunctionReturn(0);
289 getNumeredEntFiniteElementPtr()->getRowDofsByPetscGlobalDofIdx(
290 data.getIndices()[0]);
291 const FENumeredDofEntity *dof_ptr;
292 if (
auto ptr = weak_ptr_dof.lock())
297 int rank = dof_ptr->getNbOfCoeffs();
300 for(
unsigned int gg = 0;gg<data.getN().size1();gg++) {
303 area = norm_2(getNormalsAtGaussPts(gg))*0.5;
307 double val = getGaussPts()(2,gg)*area;
309 x = getCoordsAtGaussPts()(gg,0);
310 y = getCoordsAtGaussPts()(gg,1);
311 z = getCoordsAtGaussPts()(gg,2);
315 X_mat.resize(rank,6,
false);
323 X_mat.resize(rank,3,
false);
344 PetscFunctionReturn(0);
366 if(data.getIndices().size()==0) PetscFunctionReturn(0);
371 for(
int ii = 0;ii<
F.size();ii++) {
374 f.resize(D_mat.size1(),
false);
376 ierr =
VecSetValues(
F[ii],data.getIndices().size(),&data.getIndices()[0],&
f[0],ADD_VALUES); CHKERRQ(
ierr);
379 PetscFunctionReturn(0);
384 string field_name,
string lagrang_field_name,
string mesh_nodals_positions,Mat aij,vector<Vec> &
f
387 bool ho_geometry =
false;
391 map<int,RVEBC_Data>::iterator sit =
setOfRVEBC.begin();
405 PetscFunctionReturn(0);
426 if(data.getIndices().size()==0) PetscFunctionReturn(0);
427 if(
dAta.
tRis.find(getNumeredEntFiniteElementPtr()->getEnt())==
dAta.
tRis.end()) PetscFunctionReturn(0);
431 const int indices_6[6] = {0, 1, 2, 3, 4, 5};
432 const int indices_3[3] = {0, 1, 2};
443 PetscFunctionReturn(0);
449 string field_name,
string lagrang_field_name,
string mesh_nodals_positions,
Vec stress_homo
452 bool ho_geometry =
false;
456 map<int,RVEBC_Data>::iterator sit =
setOfRVEBC.begin();
465 PetscFunctionReturn(0);