19 ublas::vector<MatrixDouble >
R;
75 double def_damaged = 0;
77 "DAMAGED_PRISM",1,MB_TYPE_INTEGER,
thDamagedPrism,MB_TAG_CREAT|MB_TAG_SPARSE,&def_damaged
79 const int def_len = 0;
96 return sqrt(pow(gap_loc(gg,0),2)+
beta*(pow(gap_loc(gg,1),2)+pow(gap_loc(gg,2),2)));
106 EntityHandle ent = fe_method->numeredEntFiniteElementPtr->getEnt();
111 kappa.resize(nb_gauss_pts);
114 tag_size[0] = nb_gauss_pts;
115 void const* tag_data[] = { &
kappa[0] };
181 Dloc(0,1) = -domega*
E0*gap_loc[0]*
beta*gap_loc[1]/
g;
182 Dloc(0,2) = -domega*
E0*gap_loc[0]*
beta*gap_loc[2]/
g;
184 Dloc(1,0) = -domega*
E0*gap_loc[1]*gap_loc[0]/
g;
186 Dloc(1,2) = -domega*
E0*gap_loc[1]*
beta*gap_loc[2]/
g;
188 Dloc(2,0) = -domega*
E0*gap_loc[2]*gap_loc[0]/
g;
189 Dloc(2,1) = -domega*
E0*gap_loc[2]*
beta*gap_loc[1]/
g;
224 ublas::matrix_row<MatrixDouble > gap_glob(common_data.
gapGlob,gg);
225 noalias(traction) = prod(
Dglob,gap_glob);
256 ublas::matrix_row<MatrixDouble > g_loc(common_data.
gapLoc,gg);
259 tangent_matrix.resize(3,3);
260 noalias(tangent_matrix) =
Dglob;
262 }
catch (
const std::exception& ex) {
263 std::ostringstream ss;
264 ss <<
"throw in method: " << ex.what() << std::endl;
265 SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
283 bool all_gauss_pts_damaged =
true;
284 for(
unsigned int gg = 0;gg<common_data.
gapGlob.size1();gg++) {
291 all_gauss_pts_damaged =
false;
294 if(all_gauss_pts_damaged) {
295 EntityHandle ent = fe_method->numeredEntFiniteElementPtr->getEnt();
296 int set_prism_as_demaged = 1;
318 for(
unsigned int gg = 0;gg<data.getN().size1();gg++) {
319 for(
int nn = 3;nn<6;nn++) {
320 data.getN()(gg,nn) *= -1;
333 SETERRQ(PETSC_COMM_SELF,1,
"data inconsitency");
353 int nb_dofs = data.getIndices().size();
355 int nb_gauss_pts = data.getN().size1();
356 if(
type == MBVERTEX) {
358 for(
int gg = 0;gg<nb_gauss_pts;gg++) {
360 double nrm2_normal = 0;
361 double nrm2_tangent1 = 0;
362 double nrm2_tangent2 = 0;
363 for(
int dd = 0;
dd<3;
dd++) {
364 nrm2_normal += pow(getNormalsAtGaussPtsF3()(gg,
dd),2);
365 nrm2_tangent1 += pow(getTangent1AtGaussPtF3()(gg,
dd),2);
366 nrm2_tangent2 += pow(getTangent2AtGaussPtF3()(gg,
dd),2);
368 nrm2_normal = sqrt(nrm2_normal);
369 nrm2_tangent1 = sqrt(nrm2_tangent1);
370 nrm2_tangent2 = sqrt(nrm2_tangent2);
371 for(
int dd = 0;
dd<3;
dd++) {
373 commonData.
R[gg](1,
dd) = getTangent1AtGaussPtF3()(gg,
dd)/nrm2_tangent1;
374 commonData.
R[gg](2,
dd) = getTangent2AtGaussPtF3()(gg,
dd)/nrm2_tangent2;
378 if(
type == MBVERTEX) {
382 for(
int gg = 0;gg<nb_gauss_pts;gg++) {
383 for(
int dd = 0;
dd<3;
dd++) {
385 nb_dofs/3,&data.getN(gg)[0],1,&data.getFieldData()[
dd],3);
388 }
catch (
const std::exception& ex) {
389 std::ostringstream ss;
390 ss <<
"throw in method: " << ex.what() << std::endl;
391 SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
410 if(
type == MBVERTEX) {
411 int nb_gauss_pts = data.getN().size1();
413 for(
int gg = 0;gg<nb_gauss_pts;gg++) {
419 }
catch (
const std::exception& ex) {
420 std::ostringstream ss;
421 ss <<
"throw in method: " << ex.what() << std::endl;
422 SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
444 int nb_dofs = data.getIndices().size();
451 int nb_gauss_pts = data.getN().size1();
452 for(
int gg = 0;gg<nb_gauss_pts;gg++) {
454 double w = getGaussPts()(2,gg)*cblas_dnrm2(3,&getNormalsAtGaussPtsF3()(gg,0),1)*0.5;
455 for(
int nn = 0;nn<nb_dofs/3;nn++) {
456 for(
int dd = 0;
dd<3;
dd++) {
462 data.getIndices().size(),&data.getIndices()[0],&
Nf[0],ADD_VALUES);
CHKERRG(
ierr);
463 }
catch (
const std::exception& ex) {
464 std::ostringstream ss;
465 ss <<
"throw in method: " << ex.what() << std::endl;
466 SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
485 int row_side,
int col_side,
486 EntityType row_type,EntityType col_type,
493 int nb_row = row_data.getIndices().size();
495 int nb_col = col_data.getIndices().size();
504 K.resize(nb_row,nb_col);
506 int nb_gauss_pts = row_data.getN().size1();
507 for(
int gg = 0;gg<nb_gauss_pts;gg++) {
509 double w = getGaussPts()(2,gg)*cblas_dnrm2(3,&getNormalsAtGaussPtsF3()(gg,0),1)*0.5;
511 for(
int nn = 0; nn<nb_row/3;nn++) {
512 for(
int dd = 0;
dd<3;
dd++) {
513 for(
int DD = 0;DD<3;DD++) {
514 ND(3*nn+
dd,DD) += row_data.getN(gg)[nn]*
D(
dd,DD);
518 for(
int nn = 0; nn<nb_row/3; nn++) {
519 for(
int dd = 0;
dd<3;
dd++) {
520 for(
int NN = 0; NN<nb_col/3; NN++) {
521 for(
int DD = 0; DD<3;DD++) {
522 K(3*nn+
dd,3*NN+DD) +=
w*
ND(3*nn+
dd,DD)*col_data.getN(gg)[NN];
529 nb_row,&row_data.getIndices()[0],
530 nb_col,&col_data.getIndices()[0],
533 }
catch (
const std::exception& ex) {
534 std::ostringstream ss;
535 ss <<
"throw in method: " << ex.what() << std::endl;
536 SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
585 boost::ptr_vector<CohesiveInterfaceElement::PhysicalEquation>::iterator pit;
586 for(pit = interfaces.begin();pit!=interfaces.end();pit++) {