Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81743217
coupler_solid_contact.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
Sat, Sep 7, 17:26
Size
8 KB
Mime Type
text/x-c++
Expires
Mon, Sep 9, 17:26 (2 d)
Engine
blob
Format
Raw Data
Handle
20593604
Attached To
rAKA akantu
coupler_solid_contact.hh
View Options
/**
* @file coupler_solid_contact_explicit.hh
*
* @author Mohit Pundir <mohit.pundir@epfl.ch>
*
* @date creation: Thu Jan 17 2019
* @date last modification: Thu Jan 17 2019
*
* @brief class for coupling of solid mechanics and conatct mechanics
* model in explicit
*
* @section LICENSE
*
* Copyright (©) 2010-2018 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* Akantu 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.
*
* Akantu 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 Akantu. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "boundary_condition.hh"
#include "contact_mechanics_model.hh"
#include "data_accessor.hh"
#include "model.hh"
#include "solid_mechanics_model.hh"
#include "sparse_matrix.hh"
#include "time_step_solver.hh"
/* -------------------------------------------------------------------------- */
#ifndef __AKANTU_COUPLER_SOLID_CONTACT_HH__
#define __AKANTU_COUPLER_SOLID_CONTACT_HH__
/* ------------------------------------------------------------------------ */
/* Coupling : Solid Mechanics / Contact Mechanics */
/* ------------------------------------------------------------------------ */
namespace
akantu
{
template
<
ElementKind
kind
,
class
IntegrationOrderFunctor
>
class
IntegratorGauss
;
template
<
ElementKind
kind
>
class
ShapeLagrange
;
class
DOFManager
;
}
// namespace akantu
/* -------------------------------------------------------------------------- */
namespace
akantu
{
/* -------------------------------------------------------------------------- */
class
CouplerSolidContact
:
public
Model
,
public
DataAccessor
<
Element
>
,
public
DataAccessor
<
UInt
>
,
public
BoundaryCondition
<
CouplerSolidContact
>
{
/* ------------------------------------------------------------------------ */
/* Constructor/Destructor */
/* ------------------------------------------------------------------------ */
using
MyFEEngineType
=
FEEngineTemplate
<
IntegratorGauss
,
ShapeLagrange
>
;
public
:
CouplerSolidContact
(
SolidMechanicsModel
&
,
ContactMechanicsModel
&
,
UInt
spatial_dimension
=
_all_dimensions
,
const
ID
&
id
=
"coupler_solid_contact"
,
std
::
shared_ptr
<
DOFManager
>
dof_manager
=
nullptr
,
const
ModelType
model_type
=
ModelType
::
_coupler_solid_contact
);
~
CouplerSolidContact
()
override
;
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
protected
:
/// initialize completely the model
void
initFullImpl
(
const
ModelOptions
&
options
)
override
;
/// allocate all vectors
void
initSolver
(
TimeStepSolverType
,
NonLinearSolverType
)
override
;
/// initialize the modelType
void
initModel
()
override
;
/// call back for the solver, computes the force residual
void
assembleResidual
()
override
;
/// get the type of matrix needed
MatrixType
getMatrixType
(
const
ID
&
matrix_id
)
override
;
/// callback for the solver, this assembles different matrices
void
assembleMatrix
(
const
ID
&
matrix_id
)
override
;
/// callback for the solver, this assembles the stiffness matrix
void
assembleLumpedMatrix
(
const
ID
&
matrix_id
)
override
;
/// get some default values for derived classes
std
::
tuple
<
ID
,
TimeStepSolverType
>
getDefaultSolverID
(
const
AnalysisMethod
&
method
)
override
;
ModelSolverOptions
getDefaultSolverOptions
(
const
TimeStepSolverType
&
type
)
const
;
/// callback for the solver, this is called at beginning of solve
void
beforeSolveStep
()
override
;
/// callback for the solver, this is called at end of solve
void
afterSolveStep
()
override
;
/* ------------------------------------------------------------------------ */
public
:
// DataAccessor<Element>
UInt
getNbData
(
const
Array
<
Element
>
&
,
const
SynchronizationTag
&
)
const
override
{
return
0
;
}
void
packData
(
CommunicationBuffer
&
,
const
Array
<
Element
>
&
,
const
SynchronizationTag
&
)
const
override
{}
void
unpackData
(
CommunicationBuffer
&
,
const
Array
<
Element
>
&
,
const
SynchronizationTag
&
)
override
{}
// DataAccessor<UInt> nodes
UInt
getNbData
(
const
Array
<
UInt
>
&
,
const
SynchronizationTag
&
)
const
override
{
return
0
;
}
void
packData
(
CommunicationBuffer
&
,
const
Array
<
UInt
>
&
,
const
SynchronizationTag
&
)
const
override
{}
void
unpackData
(
CommunicationBuffer
&
,
const
Array
<
UInt
>
&
,
const
SynchronizationTag
&
)
override
{}
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public
:
FEEngine
&
getFEEngineBoundary
(
const
ID
&
name
=
""
)
override
;
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public
:
/// return the dimension of the system space
AKANTU_GET_MACRO
(
SpatialDimension
,
Model
::
spatial_dimension
,
UInt
);
/// get the ContactMechanicsModel::displacement vector
AKANTU_GET_MACRO
(
Displacement
,
*
displacement
,
Array
<
Real
>
&
);
/// get the ContactMechanicsModel::increment vector \warn only consistent
/// if ContactMechanicsModel::setIncrementFlagOn has been called before
AKANTU_GET_MACRO
(
Increment
,
*
displacement_increment
,
Array
<
Real
>
&
);
/// get the ContactMechanicsModel::external_force vector (external forces)
AKANTU_GET_MACRO
(
ExternalForce
,
*
external_force
,
Array
<
Real
>
&
);
/// get the ContactMechanicsModel::force vector (external forces)
Array
<
Real
>
&
getForce
()
{
AKANTU_DEBUG_WARNING
(
"getForce was maintained for backward compatibility, "
"use getExternalForce instead"
);
return
*
external_force
;
}
/* ------------------------------------------------------------------------ */
/* Dumpable interface */
/* ------------------------------------------------------------------------ */
public
:
dumper
::
Field
*
createNodalFieldReal
(
const
std
::
string
&
field_name
,
const
std
::
string
&
group_name
,
bool
padding_flag
)
override
;
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
private
:
/// couples external forces between models
void
coupleExternalForces
();
/// couples stiffness matrices between models
void
coupleStiffnessMatrices
();
/* ------------------------------------------------------------------------ */
/* Members */
/* ------------------------------------------------------------------------ */
private
:
/// solid mechanics model
SolidMechanicsModel
&
solid
;
/// contact mechanics model
ContactMechanicsModel
&
contact
;
/// displacements array
Array
<
Real
>
*
displacement
{
nullptr
};
/// increment of displacement
Array
<
Real
>
*
displacement_increment
{
nullptr
};
/// external forces array
Array
<
Real
>
*
external_force
{
nullptr
};
};
}
// namespace akantu
#endif
/* __COUPLER_SOLID_CONTACT_HH__ */
Event Timeline
Log In to Comment