Page MenuHomec4science

polonsky_keer_tan.hh
No OneTemporary

File Metadata

Created
Tue, May 21, 19:04

polonsky_keer_tan.hh

/**
* @file
*
* @author Son Pham-Ba <son.phamba@epfl.ch>
*
* @section LICENSE
*
* Copyright (©) 2016-2018 EPFL (Ecole Polytechnique Fédérale de
* Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des
* Solides)
*
* Tamaas is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Tamaas is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Tamaas. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#ifndef __POLONSKY_KEER_TAN_HH__
#define __POLONSKY_KEER_TAN_HH__
/* -------------------------------------------------------------------------- */
#include "kato.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_TAMAAS__
class PolonskyKeerTan : public Kato {
public:
/// Constructor
PolonskyKeerTan(Model& model, const GridBase<Real>& surface, Real tolerance,
Real mu);
public:
/// Solve with Coulomb friction
Real solve(GridBase<Real>& p0);
/// Solve with Tresca friction
Real solveTresca(GridBase<Real>& p0);
private:
/// Template for solve function
template <model_type type>
Real solveTmpl(GridBase<Real>& p0, bool use_tresca = false);
/// Enforce pressure mean
template <UInt comp>
void enforcePressureMean(GridBase<Real>& p0);
/// Compute mean of field (only on I_c)
template <UInt comp>
Vector<Real, comp> computeMean(GridBase<Real>& field, bool on_c);
/// Compute squared norm
Real computeSquaredNorm(GridBase<Real>& field);
/// Restrict search direction on I_c
template <UInt comp>
void truncateSearchDirection(bool on_c);
/// Compute optimal step size (only on I_c)
template <UInt comp>
Real computeStepSize(bool on_c);
private:
std::unique_ptr<GridBase<Real>> search_direction = nullptr;
std::unique_ptr<GridBase<Real>> search_direction_backup = nullptr;
std::unique_ptr<GridBase<Real>> projected_search_direction = nullptr;
};
__END_TAMAAS__
#endif // __POLONSKY_KEER_TAN_HH__

Event Timeline