Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80634310
test_resolution.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
Sun, Sep 1, 19:16
Size
2 KB
Mime Type
text/x-c++
Expires
Tue, Sep 3, 19:16 (2 d)
Engine
blob
Format
Raw Data
Handle
20380454
Attached To
rAKA akantu
test_resolution.cc
View Options
/**
* @file test_resolution.cc
*
* @author Mohit Pundir <mohit.pundir@epfl.ch>
*
* @date creation: Mon May 06 2019
* @date last modification: Mon May 06 2019
*
* @brief Test the resolution class common function
*
* @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 "resolution.hh"
#include "test_gtest_utils.hh"
/* -------------------------------------------------------------------------- */
#include <gtest/gtest.hh>
#include <type_traits>
#include <tuple>
#include <random>
/* -------------------------------------------------------------------------- */
using
namespace
akantu
;
/* -------------------------------------------------------------------------- */
class
TestResolutionFixture
:
public
::
testing
::
Test
{
public
:
void
SetUp
()
override
{
mesh
=
std
::
make_unique
<
Mesh
>
(
spatial_dimension
);
model
=
std
::
make_unique
<
Model
>
(
*
mesh
);
resolution
=
std
::
make_unique
<
Resolution
>
(
*
model
,
"resolution"
);
}
void
TearDown
()
override
{
resolution
.
reset
(
nullptr
);
model
.
reset
(
nullptr
);
mesh
.
reset
(
nullptr
);
}
protected
:
std
::
unique_ptr
<
Mesh
>
mesh
;
std
::
unique_ptr
<
ContactMechanicsModel
>
model
;
std
::
unique_ptr
<
Resolution
>
resolution
;
};
TYPED_TEST
(
TestResolutionFixture
,
TestComputeN
)
{
Vector
<
Real
>
shapes
(
nb_nodes_master
);
Vector
<
Real
>
projection
(
spatial_diemnsion
-
1
);
#define GET_SHAPES_NATURAL(type) \
ElementClass<type>::computeShapes(projection, shapes)
AKANTU_BOOST_ALL_ELEMENT_SWITCH
(
GET_SHAPES_NATURAL
);
#undef GET_SHAPES_NATURAL
Vector
<
Real
>
n
(
conn
.
size
()
*
spatial_dimension
);
resolution
->
computeN
(
n
,
shapes
,
normal
);
}
TYPED_TEST
(
TestResolutionFixture
,
TestComputeDalpha
)
{
}
TYPED_TEST
(
TestResolutionFixture
,
TestComputeNalpha
)
{
}
Event Timeline
Log In to Comment