Page MenuHomec4science

polonsky_keer_tan.hh
No OneTemporary

File Metadata

Created
Tue, May 21, 11:33

polonsky_keer_tan.hh

/**
* @file
* @section LICENSE
*
* Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://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