33 #ifndef __SMALL_STRAIN_MECHANICS__DAMAGE_H_
34 #define __SMALL_STRAIN_MECHANICS__DAMAGE_H_
42 namespace SmallStrainMechanics{
68 template <
typename TDomain>
74 template <
typename TDomain>
78 std::vector<size_t>& vIndex,
86 template <
typename TDomain>
89 std::vector< std::vector< number > >& vStencil,
90 std::vector< std::vector<size_t> >& vIndex,
bool fillElemSizeIntoVector =
false);
92 template <
typename TDomain>
95 std::vector< std::vector< number > >& vStencil,
96 std::vector< std::vector<size_t> >& vIndex,
bool fillElemSizeIntoVector =
false);
98 template <
typename TDomain>
101 std::vector< std::vector< number > >& vStencil,
102 std::vector< std::vector<size_t> >& vIndex,
103 int quadRuleType,
bool fillElemSizeIntoVector =
false);
110 template <
typename TDomain>
135 const number eps,
const int maxIter,
const number dampNewton);
155 for (
size_t j = 0; j <
m_vIndex[i].size(); ++j)
178 template <
typename TDomain>
220 for (
size_t j = 0; j <
m_vIndex[i].size(); ++j)
248 template<
typename TDomain>
255 const std::vector<number>& vRadius);
258 template<
typename TDomain>
263 template<
typename TDomain>
parameterString p
Definition: Biogas.lua:1
void write_debug(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spGF, std::string name, int call, int iter)
Definition: damage_impl.h:1774
int last_num_iterations() const
Definition: damage.h:137
std::vector< std::vector< size_t > > m_vIndex
Definition: damage.h:161
static const int dim
Definition: damage.h:114
int m_quadRuleType
Definition: damage.h:142
void set_debug(SmartPtr< GridFunctionDebugWriter< TDomain, CPUAlgebra > > spDebugWriter)
Definition: damage_impl.h:1767
number Lambda(size_t i, SmartPtr< GridFunction< TDomain, CPUAlgebra > > spF)
Definition: damage.h:152
DamageFunctionUpdater()
Definition: damage.h:126
bool solve(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spF, SmartPtr< GridFunction< TDomain, CPUAlgebra > > spPsi0, const number beta, const number r, const number eps, const int maxIter, const number dampNewton)
Definition: damage_impl.h:1597
TDomain::grid_type TGrid
Definition: damage.h:115
void set_quad_rule(int quadRuleType)
Definition: damage.h:130
grid_dim_traits< dim >::side_type TSide
Definition: damage.h:117
DiscType
Definition: damage.h:140
@ _TAYLOR_EXPANSION_
Definition: damage.h:140
@ _TAYLOR_DIRECT_
Definition: damage.h:140
@ _PARTIAL_INTEGRATION_
Definition: damage.h:140
@ _LEAST_SQUARES_
Definition: damage.h:140
TDomain::position_accessor_type TPositionAccessor
Definition: damage.h:120
grid_dim_traits< dim >::element_type TElem
Definition: damage.h:116
void set_disc_type(const std::string &type)
Definition: damage_impl.h:1580
void write_stencil_matrix_debug(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spGF, std::string name, int call)
Definition: damage_impl.h:1794
std::vector< std::vector< number > > m_vStencil
Definition: damage.h:160
int m_lastNumIters
Definition: damage.h:143
int m_discType
Definition: damage.h:141
contrained_dim_traits< dim >::contraining_side_type TContrainingSide
Definition: damage.h:119
SmartPtr< GridFunctionDebugWriter< TDomain, CPUAlgebra > > m_spDebugWriter
Definition: damage.h:167
RevisionCounter m_ApproxSpaceRevision
Definition: damage.h:145
contrained_dim_traits< dim >::contrained_side_type TContrainedSide
Definition: damage.h:118
number DLambda(size_t i)
Definition: damage.h:151
void set_enforce_local_required_beta(bool bEnforce)
Definition: damage.h:201
DiscType
Definition: damage.h:206
@ _TAYLOR_EXPANSION_
Definition: damage.h:206
@ _LEAST_SQUARES_
Definition: damage.h:206
@ _TAYLOR_DIRECT_
Definition: damage.h:206
@ _PARTIAL_INTEGRATION_
Definition: damage.h:206
SmartPtr< GridFunction< TDomain, CPUAlgebra > > m_spLaplaceChi
Definition: damage.h:230
void write_debug(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spGF, std::string name, int call, int iter)
Definition: damage_impl.h:2094
SmartPtr< GridFunction< TDomain, CPUAlgebra > > m_spElemSize
Definition: damage.h:229
void write_stencil_matrix_debug(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spGF, std::string name, int call)
Definition: damage_impl.h:2114
number Lambda(size_t i, SmartPtr< GridFunction< TDomain, CPUAlgebra > > spF)
Definition: damage.h:217
std::vector< number > solve(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spChi, SmartPtr< GridFunction< TDomain, CPUAlgebra > > spDrivingForce, const number betaStar, const number etaChiStar, const number chiMin, const number dt, const int p, const number rho_target, const number MassTol)
Definition: damage_impl.h:1858
TDomain::grid_type TGrid
Definition: damage.h:183
TDomain::position_accessor_type TPositionAccessor
Definition: damage.h:189
RevisionCounter m_ApproxSpaceRevision
Definition: damage.h:210
SmartPtr< GridFunctionDebugWriter< TDomain, CPUAlgebra > > m_spDebugWriter
Definition: damage.h:237
int m_quadRuleType
Definition: damage.h:208
grid_dim_traits< dim >::element_type TElem
Definition: damage.h:184
contrained_dim_traits< dim >::contrained_side_type TContrainedSide
Definition: damage.h:186
static const int dim
Definition: damage.h:182
std::vector< std::vector< size_t > > m_vIndex
Definition: damage.h:225
void set_debug(SmartPtr< GridFunctionDebugWriter< TDomain, CPUAlgebra > > spDebugWriter)
Definition: damage_impl.h:2087
std::vector< std::vector< number > > m_vStencil
Definition: damage.h:224
SmartPtr< GridFunction< TDomain, CPUAlgebra > > m_spChiTrial
Definition: damage.h:231
bool m_bEnforceLocalRequiredBeta
Definition: damage.h:209
number DLambda(size_t i)
Definition: damage.h:216
contrained_dim_traits< dim >::contraining_side_type TContrainingSide
Definition: damage.h:187
void set_quad_rule(int quadRuleType)
Definition: damage.h:203
void set_disc_type(const std::string &type)
Definition: damage_impl.h:1840
grid_dim_traits< dim >::side_type TSide
Definition: damage.h:185
int m_discType
Definition: damage.h:207
RelativeDensityUpdater()
Definition: damage.h:191
Grid::VertexAttachmentAccessor< position_attachment_type > position_accessor_type
void InitLaplacian_PartialIntegration(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spF, std::vector< std::vector< number > > &vStencil, std::vector< std::vector< size_t > > &vIndex, int quadRuleType, bool fillElemSizeIntoVector=false)
Definition: damage_impl.h:621
void MarkDamage(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spF, SmartPtr< GridFunction< TDomain, CPUAlgebra > > spPsi0, IRefiner &refiner, number minValueToRefine, number maxValueToCoarsen, int maxLevel, const std::vector< MathVector< TDomain::dim, number > * > &vCenter, const std::vector< number > &vRadius)
Definition: damage_impl.h:2293
void AveragePositions(MathVector< dim > &vCenter, const std::vector< MathVector< dim > > &vCornerCoords)
Definition: damage_impl.h:44
void InitLaplacian_LeastSquares(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spF, std::vector< std::vector< number > > &vStencil, std::vector< std::vector< size_t > > &vIndex, bool fillElemSizeIntoVector=false)
Definition: damage_impl.h:1242
void HadamardProd(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spFPsi0, ConstSmartPtr< GridFunction< TDomain, CPUAlgebra > > spF, ConstSmartPtr< GridFunction< TDomain, CPUAlgebra > > spPsi0)
Definition: damage_impl.h:2602
void CollectStencilNeighbors_NeumannZeroBND_IndexAndDistance(std::vector< typename grid_dim_traits< TDomain::dim >::element_type * > &vElem, std::vector< size_t > &vIndex, std::vector< MathVector< TDomain::dim > > &vDistance, typename grid_dim_traits< TDomain::dim >::element_type *elem, typename TDomain::grid_type &grid, typename TDomain::position_accessor_type &aaPos, SmartPtr< GridFunction< TDomain, CPUAlgebra > > spF, bool fillElemSizeIntoVector=false)
Definition: damage_impl.h:297
void CollectSurfaceNeighbors(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spF, typename grid_dim_traits< TDomain::dim >::element_type *elem, std::vector< typename grid_dim_traits< TDomain::dim >::element_type * > &vNeighbors)
Definition: damage_impl.h:62
void InitLaplacian_TaylorExpansion(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spF, std::vector< std::vector< number > > &vStencil, std::vector< std::vector< size_t > > &vIndex, bool fillElemSizeIntoVector=false)
Definition: damage_impl.h:1035
std::vector< number > DamageStatistic(SmartPtr< GridFunction< TDomain, CPUAlgebra > > spF, SmartPtr< GridFunction< TDomain, CPUAlgebra > > spPsi0)
Definition: damage_impl.h:2519
ConstrainedEdge contrained_side_type
Definition: damage.h:53
ConstrainingEdge contraining_side_type
Definition: damage.h:54
ConstrainingFace contraining_side_type
Definition: damage.h:59
ConstrainedFace contrained_side_type
Definition: damage.h:58