Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94032173
boundary_condition.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
Tue, Dec 3, 09:30
Size
3 KB
Mime Type
text/x-c++
Expires
Thu, Dec 5, 09:30 (2 d)
Engine
blob
Format
Raw Data
Handle
22697898
Attached To
rAKA akantu
boundary_condition.hh
View Options
/**
* Copyright (©) 2010-2023 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This file is part of Akantu
*
* 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/>.
*/
/* -------------------------------------------------------------------------- */
#ifndef AKANTU_BOUNDARY_CONDITION_HH_
#define AKANTU_BOUNDARY_CONDITION_HH_
#include "aka_common.hh"
#include "boundary_condition_functor.hh"
#include "fe_engine.hh"
#include "mesh.hh"
/* -------------------------------------------------------------------------- */
namespace
akantu
{
template
<
class
ModelType
>
class
BoundaryCondition
{
/* ------------------------------------------------------------------------ */
/* Typedefs */
/* ------------------------------------------------------------------------ */
private
:
/* ------------------------------------------------------------------------ */
/* Constructors / Destructors / Initializers */
/* ------------------------------------------------------------------------ */
public
:
BoundaryCondition
()
:
model
(
nullptr
)
{}
/// Initialize the boundary conditions
void
initBC
(
ModelType
&
model
,
Array
<
Real
>
&
primal
,
Array
<
Real
>
&
dual
);
void
initBC
(
ModelType
&
model
,
Array
<
Real
>
&
primal
,
Array
<
Real
>
&
primal_increment
,
Array
<
Real
>
&
dual
);
/* ------------------------------------------------------------------------ */
/* Methods and accessors */
/* ------------------------------------------------------------------------ */
public
:
/// Apply the boundary conditions
template
<
typename
FunctorType
>
inline
void
applyBC
(
FunctorType
&&
func
);
template
<
class
FunctorType
>
inline
void
applyBC
(
FunctorType
&&
func
,
const
std
::
string
&
group_name
);
template
<
class
FunctorType
>
inline
void
applyBC
(
FunctorType
&&
func
,
const
ElementGroup
&
element_group
);
AKANTU_GET_MACRO_NOT_CONST
(
Model
,
*
model
,
ModelType
&
);
AKANTU_GET_MACRO_NOT_CONST
(
Primal
,
*
primal
,
Array
<
Real
>
&
);
AKANTU_GET_MACRO_NOT_CONST
(
Dual
,
*
dual
,
Array
<
Real
>
&
);
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
public
:
template
<
class
FunctorType
,
BC
::
Functor
::
Type
type
=
std
::
decay_t
<
FunctorType
>::
type
>
struct
TemplateFunctionWrapper
;
private
:
ModelType
*
model
;
Array
<
Real
>
*
primal
{
nullptr
};
Array
<
Real
>
*
dual
{
nullptr
};
Array
<
Real
>
*
primal_increment
{
nullptr
};
};
}
// namespace akantu
#include "boundary_condition_tmpl.hh"
#endif
/* AKANTU_BOUNDARY_CONDITION_HH_ */
Event Timeline
Log In to Comment