Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92351916
testcpp.cpp
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, 15:08
Size
1 KB
Mime Type
text/x-c
Expires
Thu, Nov 21, 15:08 (2 d)
Engine
blob
Format
Raw Data
Handle
21436000
Attached To
rAKA akantu
testcpp.cpp
View Options
/*
Copyright 2008 Guillaume ANCIAUX (guillaume.anciaux@epfl.ch)
This file is part of ParaViewHelper.
ParaViewHelper 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 of the License, or
(at your option) any later version.
ParaViewHelper 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 ParaViewHelper. If not, see <http://www.gnu.org/licenses/>.
*/
extern "C" {
extern void BuildGridMesh(double ** pos,int ** conn,
int * nb_nodes,int * nb_elements,
double L, double D, double W,
double NL,double ND, double NW);
}
#include "../src/dumper_paraview.h"
int main(){
double * positions;
int * connectivity;
int nb_nodes;
int nb_elements;
int D=1,W=1,L=1,ND=1,NL=1,NW=1;
BuildGridMesh(&positions,&connectivity,&nb_nodes,&nb_elements,
L,D,W,NL,ND,NW);
DumperParaview dumper;
dumper.SetPoints(positions,3,nb_nodes,"cube-mesh");
dumper.SetConnectivity(connectivity,TETRA2,nb_elements,FORTRAN_MODE);
dumper.AddNodeDataField(positions,3,"positions");
dumper.SetMode(TEXT);
dumper.Init();
dumper.Dump();
}
Event Timeline
Log In to Comment