33 #ifndef ADAPTIVE_UTIL_IMPL_H_
34 #define ADAPTIVE_UTIL_IMPL_H_
40 namespace SmallStrainMechanics{
42 template<
typename TDomain,
typename TElem>
53 const size_t numVertices = elem->num_vertices();
54 for (
size_t i = 0; i < numVertices; ++i) {
55 coCoord[i] = aaPos[elem->vertex(i)];
63 geo.
update(elem, &(coCoord[0]),
67 " Cannot update Finite Element Geometry.");
71 UG_THROW(
"No material law set in plastic_ip_elem \n");
76 spMatLaw->internal_vars(elem);
79 for (
size_t ip = 0; ip < geo.
num_ip(); ++ip)
82 spMatLaw->template DisplacementGradient<DimFEGeometry<dim> >(GradU, ip, geo, locU);
84 number gamma = spMatLaw->plastic_multiplier(ip, GradU);
87 bPlasticIPs =
true;
return;
94 UG_THROW(
"gamma: " << gamma <<
"in plastIP_elem \n");
98 template <
typename TDomain,
typename TAlgebra>
110 int numMarkedRefine = 0;
111 bool bPlasticIPs =
false;
112 const_iterator iter = dd->template begin<element_type>();
113 const_iterator iterEnd = dd->template end<element_type>();
119 for(; iter != iterEnd; ++iter)
137 plastic_ip_elem<TDomain, element_type> (bPlasticIPs, elem, locU,
151 UG_LOG(
" +++ Marked for refinement on Proc "<<
pcl::ProcRank()<<
": " << numMarkedRefine <<
" Elements.\n");
153 int numMarkedRefineLocal = numMarkedRefine;
158 UG_LOG(
" +++ Marked for refinement: " << numMarkedRefine <<
" Elements.\n");
size_t allreduce(const size_t &t, pcl::ReduceOperation op) const
void update(GridObject *pElem, const MathVector< worldDim > *vCorner)
SmartPtr< TDomain > domain()
void indices(TElem *elem, LocalIndices &ind, bool bHang=false) const
SmartPtr< DoFDistribution > dof_distribution()
void mark(const TIterator &iterBegin, const TIterator &iterEnd, RefinementMark refMark=RM_REFINE)
void resize(const LocalIndices &ind)
Definition: small_strain_mech.h:102
SmartPtr< IMaterialLaw< TDomain > > get_material_law()
gets the material law
Definition: small_strain_mech.h:135
int get_quad_order()
gets the quad order
Definition: small_strain_mech.h:184
Grid::VertexAttachmentAccessor< position_attachment_type > position_accessor_type
#define UG_CATCH_THROW(msg)
void MarkForAdaption_PlasticElem(IRefiner &refiner, GridFunction< TDomain, TAlgebra > &u, SmallStrainMechanicsElemDisc< TDomain > &elemDisc)
Definition: adaptive_util_impl.h:99
void plastic_ip_elem(bool &bPlasticIPs, TElem *elem, const LocalVector &locU, SmartPtr< TDomain > dom, SmallStrainMechanicsElemDisc< TDomain > &elemDisc)
Definition: adaptive_util_impl.h:43
void GetLocalVector(LocalVector &lvec, const TVector &vec)
SurfaceView::traits< TElem >::const_iterator const_iterator