Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93006539
cell_laminate.cc
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, Nov 25, 13:09
Size
2 KB
Mime Type
text/x-c
Expires
Wed, Nov 27, 13:09 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22556429
Attached To
rMUSPECTRE µSpectre
cell_laminate.cc
View Options
/**
* @file cell_split.cc
*
* @author Ali Falsafi <ali.faslafi@epfl.ch>
*
* @date 10 Sep 2018
*
* @brief Implementation for cell base class
*
* Copyright © 2017 Till Junge
*
* µSpectre is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3, or (at
* your option) any later version.
*
* µSpectre 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Emacs; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "cell/cell_laminate.hh"
#include "common/ccoord_operations.hh"
#include "common/iterators.hh"
#include "common/tensor_algebra.hh"
#include "common/common.hh"
namespace
muSpectre
{
/* ---------------------------------------------------------------------- */
template
<
Dim_t
DimS
,
Dim_t
DimM
>
CellLaminate
<
DimS
,
DimM
>::
CellLaminate
(
Projection_ptr
projection
,
LaminateCell
is_cell_laminate
)
:
Parent
(
std
::
move
(
projection
),
SplittedCell
::
yes
)
{
this
->
is_cell_laminate
=
is_cell_laminate
;
}
/* ---------------------------------------------------------------------- */
template
<
Dim_t
DimS
,
Dim_t
DimM
>
auto
CellLaminate
<
DimS
,
DimM
>::
evaluate_stress_tangent
(
StrainField_t
&
F
)
->
FullResponse_t
{
if
(
this
->
initialised
==
false
)
{
this
->
initialise
();
}
//! High level compatibility checks
if
(
F
.
size
()
!=
this
->
F
.
size
())
{
throw
std
::
runtime_error
(
"Size mismatch"
);
}
constexpr
bool
create_tangent
{
true
};
this
->
get_tangent
(
create_tangent
);
for
(
auto
&
mat
:
this
->
materials
)
{
auto
mat_stress_tangent
=
mat
->
compute_stresses_tangent
(
F
);
}
}
/* ---------------------------------------------------------------------- */
template
class
CellLaminate
<
twoD
,
twoD
>
;
template
class
CellLaminate
<
threeD
,
threeD
>
;
/* ---------------------------------------------------------------------- */
}
Event Timeline
Log In to Comment