Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92297304
test_facet_extraction_triangle1.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
Tue, Nov 19, 04:43
Size
2 KB
Mime Type
text/x-c
Expires
Thu, Nov 21, 04:43 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22416300
Attached To
rAKA akantu
test_facet_extraction_triangle1.cc
View Options
/**
* @file test_facet_extraction.cc
* @author Guillaume ANCIAUX <anciaux@lsmscluster1.epfl.ch>
* @date Thu Aug 19 13:05:27 2010
*
* @brief test of internal facet extraction
*
* @section LICENSE
*
* <insert license here>
*
*/
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
#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 "material.hh"
/* -------------------------------------------------------------------------- */
#ifdef AKANTU_USE_IOHELPER
# include "io_helper.h"
#endif
//AKANTU_USE_IOHELPER
using
namespace
akantu
;
int
main
(
int
argc
,
char
*
argv
[])
{
int
dim
=
2
;
Mesh
mesh
(
dim
);
MeshIOMSH
mesh_io
;
mesh_io
.
read
(
"square.msh"
,
mesh
);
MeshUtils
::
buildFacets
(
mesh
,
1
,
1
);
unsigned
int
nb_nodes
=
mesh
.
getNbNodes
();
#ifdef AKANTU_USE_IOHELPER
DumperParaview
dumper
;
dumper
.
SetMode
(
TEXT
);
dumper
.
SetPoints
(
mesh
.
getNodes
().
values
,
dim
,
nb_nodes
,
"test-facet-extraction"
);
dumper
.
SetConnectivity
((
int
*
)
mesh
.
getConnectivity
(
_triangle_1
).
values
,
TRIANGLE1
,
mesh
.
getNbElement
(
_triangle_1
),
C_MODE
);
dumper
.
SetPrefix
(
"paraview/"
);
dumper
.
Init
();
dumper
.
Dump
();
DumperParaview
dumper_facet
;
dumper_facet
.
SetMode
(
TEXT
);
dumper_facet
.
SetPoints
(
mesh
.
getNodes
().
values
,
dim
,
nb_nodes
,
"test-facet-extraction_boundary"
);
dumper_facet
.
SetConnectivity
((
int
*
)
mesh
.
getConnectivity
(
_line_1
).
values
,
LINE1
,
mesh
.
getNbElement
(
_line_1
),
C_MODE
);
dumper_facet
.
SetPrefix
(
"paraview/"
);
dumper_facet
.
Init
();
dumper_facet
.
Dump
();
dumper_facet
.
SetPoints
(
mesh
.
getNodes
().
values
,
dim
,
nb_nodes
,
"test-facet-extraction_internal"
);
dumper_facet
.
SetConnectivity
((
int
*
)
mesh
.
getInternalFacetsMesh
().
getConnectivity
(
_line_1
).
values
,
LINE1
,
mesh
.
getInternalFacetsMesh
().
getNbElement
(
_line_1
),
C_MODE
);
dumper_facet
.
Init
();
dumper_facet
.
Dump
();
#endif
//AKANTU_USE_IOHELPER
return
EXIT_SUCCESS
;
}
Event Timeline
Log In to Comment