Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77842370
test_weight_computation.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
Fri, Aug 16, 17:58
Size
2 KB
Mime Type
text/x-c
Expires
Sun, Aug 18, 17:58 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19841902
Attached To
rAKA akantu
test_weight_computation.cc
View Options
/**
* @file test_weight_computation.cc
*
* @author Aurelia Isabel Cuba Ramos <aurelia.cubaramos@epfl.ch>
*
* @date creation: Sat Sep 26 2015
* @date last modification: Mon Sep 11 2017
*
* @brief test for the weight computation with base weight function
*
* @section LICENSE
*
* Copyright (©) 2015-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 "my_model.hh"
/* -------------------------------------------------------------------------- */
#include <fstream>
/* -------------------------------------------------------------------------- */
using
namespace
akantu
;
/* -------------------------------------------------------------------------- */
int
main
(
int
argc
,
char
*
argv
[])
{
akantu
::
initialize
(
"material_weight_computation.dat"
,
argc
,
argv
);
// some configuration variables
const
UInt
spatial_dimension
=
2
;
// mesh creation and read
Mesh
mesh
(
spatial_dimension
);
mesh
.
read
(
"plate.msh"
);
/// model creation
MyModel
model
(
mesh
,
spatial_dimension
);
/// save the weights in a file
const
auto
&
neighborhood
=
model
.
getNonLocalManager
().
getNeighborhood
(
"test_region"
);
neighborhood
.
saveWeights
(
"weights"
);
/// print results to screen for validation
std
::
ifstream
weights
;
weights
.
open
(
"weights.0"
);
std
::
string
current_line
;
while
(
getline
(
weights
,
current_line
))
std
::
cout
<<
current_line
<<
std
::
endl
;
weights
.
close
();
finalize
();
return
EXIT_SUCCESS
;
}
Event Timeline
Log In to Comment