Files
LBPM/tests/lbpm_serial_decomp.cpp

37 lines
793 B
C++
Raw Normal View History

2017-07-06 21:06:34 -04:00
/*
* Pre-processor to generate signed distance function from segmented data
* segmented data should be stored in a raw binary file as 1-byte integer (type char)
* will output distance functions for phases
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include "common/Array.h"
#include "common/Domain.h"
int main(int argc, char **argv)
{
2018-05-26 08:12:31 -04:00
2017-07-06 21:06:34 -04:00
int rank=0;
2018-05-26 08:10:34 -04:00
string filename;
2018-05-26 08:12:31 -04:00
if (argc > 1)
filename=argv[1];
else{
ERROR("lbpm_serial_decomp: no in put database provided \n");
}
int rank_offset=0;
// read the input database
auto db = std::make_shared<Database>( filename );
auto domain_db = db->getDatabase( "Domain" );
2019-02-16 11:22:38 -05:00
2019-08-06 13:02:24 -04:00
std::shared_ptr<Domain> Dm (new Domain(domain_db,comm));
2019-02-16 11:22:38 -05:00
2019-08-06 13:02:24 -04:00
Dm->Decomp(domain_db);
2019-08-03 21:37:59 -04:00
2017-07-06 21:06:34 -04:00
}