Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F74245902
epic.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
Fri, Jul 26, 16:53
Size
2 KB
Mime Type
text/x-c++
Expires
Sun, Jul 28, 16:53 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19365810
Attached To
rTAMAAS tamaas
epic.hh
View Options
/**
* @file
*
* @author Lucas Frérot <lucas.frerot@epfl.ch>
*
* @section LICENSE
*
* Copyright (©) 2016-2017 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 EPIC_HH
#define EPIC_HH
/* -------------------------------------------------------------------------- */
#include "contact_solver.hh"
#include "ep_solver.hh"
#include "model.hh"
/* -------------------------------------------------------------------------- */
namespace
tamaas
{
/* -------------------------------------------------------------------------- */
class
EPICSolver
{
public
:
/// Constructor
EPICSolver
(
ContactSolver
&
csolver
,
EPSolver
&
epsolver
,
Real
tolerance
=
1e-10
,
Real
relaxation
=
0.3
);
void
solve
(
std
::
vector
<
Real
>
load
);
Real
computeError
(
const
GridBase
<
Real
>&
current
,
const
GridBase
<
Real
>&
prev
,
Real
factor
)
const
;
template
<
model_type
type
>
void
setViews
();
protected
:
GridBase
<
Real
>
surface
;
///< corrected surface
GridBase
<
Real
>
pressure
;
///< current pressure
std
::
unique_ptr
<
GridBase
<
Real
>>
residual_disp
;
///< plastic residual disp
std
::
unique_ptr
<
GridBase
<
Real
>>
pressure_inc
;
///< pressure increment
ContactSolver
&
csolver
;
EPSolver
&
epsolver
;
Real
tolerance
,
relaxation
;
};
/* -------------------------------------------------------------------------- */
/* Template impl. */
/* -------------------------------------------------------------------------- */
template
<
model_type
type
>
void
EPICSolver
::
setViews
()
{
constexpr
UInt
dim
=
model_type_traits
<
type
>::
dimension
;
constexpr
UInt
bdim
=
model_type_traits
<
type
>::
boundary_dimension
;
constexpr
UInt
comp
=
model_type_traits
<
type
>::
components
;
pressure_inc
=
std
::
unique_ptr
<
GridBase
<
Real
>>
{
new
GridView
<
Grid
,
Real
,
bdim
,
bdim
>
(
csolver
.
getModel
().
getTraction
(),
{},
comp
-
1
)};
residual_disp
=
std
::
unique_ptr
<
GridBase
<
Real
>>
{
new
GridView
<
Grid
,
Real
,
dim
,
bdim
>
(
csolver
.
getModel
().
getDisplacement
(),
model_type_traits
<
type
>::
indices
,
comp
-
1
)};
}
/* -------------------------------------------------------------------------- */
}
// namespace tamaas
#endif
// EPIC_HH
Event Timeline
Log In to Comment