Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F61828314
test_pbc_tweak.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
Thu, May 9, 05:37
Size
3 KB
Mime Type
text/x-c
Expires
Sat, May 11, 05:37 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17563609
Attached To
rAKA akantu
test_pbc_tweak.cc
View Options
/**
* @file test_facet_extraction_tetra1.cc
* @author Guillaume ANCIAUX <guillaume.anciaux@epfl.ch>
* @date Thu Aug 19 13:05:27 2010
*
* @brief test of internal facet extraction
*
* @section LICENSE
*
* Copyright (©) 2010-2011 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 "aka_common.hh"
#include "mesh.hh"
#include "mesh_io.hh"
#include "mesh_io_msh.hh"
#include "mesh_utils.hh"
#include "solid_mechanics_model.hh"
#include "pbc_synchronizer.hh"
#include "material.hh"
/* -------------------------------------------------------------------------- */
#ifdef AKANTU_USE_IOHELPER
# include "io_helper.hh"
#endif
//AKANTU_USE_IOHELPER
using
namespace
akantu
;
int
main
(
int
argc
,
char
*
argv
[])
{
int
dim
=
3
;
akantu
::
initialize
(
argc
,
argv
);
akantu
::
debug
::
setDebugLevel
(
akantu
::
dblInfo
);
Mesh
mesh
(
dim
);
MeshIOMSH
mesh_io
;
mesh_io
.
read
(
"cube.msh"
,
mesh
);
SolidMechanicsModel
*
model
=
new
SolidMechanicsModel
(
mesh
);
/* -------------------------------------------------------------------------- */
model
->
initVectors
();
model
->
getForce
().
clear
();
model
->
getVelocity
().
clear
();
model
->
getAcceleration
().
clear
();
model
->
getDisplacement
().
clear
();
/* ------------------------------------------------------------------------ */
model
->
initExplicit
();
model
->
initModel
();
model
->
readMaterials
(
"material.dat"
);
model
->
initMaterials
();
/* -------------------------------------------------------------------------- */
model
->
initPBC
(
1
,
1
,
1
);
model
->
assembleMassLumped
();
/* -------------------------------------------------------------------------- */
#ifdef AKANTU_USE_IOHELPER
iohelper
::
DumperParaview
dumper
;
dumper
.
SetMode
(
iohelper
::
TEXT
);
UInt
nb_nodes
=
model
->
getFEM
().
getMesh
().
getNbNodes
();
dumper
.
SetPoints
(
mesh
.
getNodes
().
values
,
dim
,
nb_nodes
,
"test-pbc-tweak"
);
dumper
.
SetConnectivity
((
int
*
)
mesh
.
getConnectivity
(
_hexahedron_8
).
values
,
iohelper
::
HEX1
,
mesh
.
getNbElement
(
_hexahedron_8
),
iohelper
::
C_MODE
);
dumper
.
AddNodeDataField
(
model
->
getMass
().
values
,
3
,
"mass"
);
dumper
.
SetPrefix
(
"paraview/"
);
dumper
.
Init
();
dumper
.
Dump
();
#endif
//AKANTU_USE_IOHELPER
return
EXIT_SUCCESS
;
}
Event Timeline
Log In to Comment