Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F86530794
polonsky_keer_tan.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Oct 7, 01:42
Size
2 KB
Mime Type
text/x-c++
Expires
Wed, Oct 9, 01:42 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
21442377
Attached To
rTAMAAS tamaas
polonsky_keer_tan.hh
View Options
/**
* @file
* @section LICENSE
*
* Copyright (©) 2016-2020 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"
/* -------------------------------------------------------------------------- */
namespace 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;
};
} // namespace tamaas
#endif // __POLONSKY_KEER_TAN_HH__
Event Timeline
Log In to Comment