Commit 24f3848d authored by Chernyshenko's avatar Chernyshenko

Merge branch 'master' of https://github.com/INMOST-DEV/INMOST

parents 91124c3e 1e58380d
......@@ -5,10 +5,14 @@ SyncToy*
*.iml
.idea/*.xml
.idea/
Source/Solver/solver_fcbiilu2/fcbiilu2.cpp
Source/Solver/solver_k3biilu2/k3d.cpp
Source/Solver/solver_k3biilu2/k3d.h
.vscode/*
.DS_Store
......@@ -16,6 +16,7 @@ option(USE_MPI_P2P "Use MPI point to point functionality, may be faster with har
option(USE_MPI_FILE "Use MPI extension to work with files, may save a lot of memory" ON)
option(USE_MPI2 "Use MPI-2 extensions, useful if your MPI library warns you to use new functions" ON)
option(USE_OMP "Compile with OpenMP support (experimental)" OFF)
option(USE_OPENCL "Use OpenCL where possible (experimental)" OFF)
option(USE_MESH "Compile mesh capabilities" ON)
option(USE_SOLVER "Compile solver capabilities" ON)
......@@ -33,13 +34,12 @@ option(USE_SOLVER_MONDRIAAN "Use Mondriaan for matrix reordering" OFF)
option(USE_SOLVER_PETSC "Use PETSc solvers" OFF)
option(USE_SOLVER_TRILINOS "Use Trilinos solvers" OFF)
option(USE_SOLVER_SUPERLU "Use SuperLU solver" OFF)
#option(USE_AUTODIFF_OPENCL "Use OpenCL for automatic differentiation (under work)" OFF)
#option(USE_AUTODIFF_ASMJIT "Use AsmJit for automatic differentiation" OFF)
#option(USE_AUTODIFF_EXPRESSION_TEMPLATES "Use c++ expression templates for automatic differentiation" OFF)
if( MSVC )
option(USE_MT "Use /MT switch instead of /MD switch for libraries generated with Visual Studio" OFF)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "/EHsc")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
endif( MSVC )
add_subdirectory(Source)
......@@ -206,13 +206,13 @@ if(USE_SOLVER_SUPERLU)
endif()
endif()
if(USE_AUTODIFF_OPENCL)
if(USE_OPENCL)
find_package(OpenCL)
if(OPENCL_FOUND)
include_directories(${OPENCL_INCLUDE_DIRS})
link_directories(${PETSC_LIBRARY_DIRS})
link_directories(${OpenCL_LIBRARY})
else()
set(USE_AUTODIFF_OPENCL OFF CACHE BOOL "Use OpenCL for automatic differentiation" FORCE)
set(USE_OPENCL OFF CACHE BOOL "Use OpenCL where possible (experimental)" FORCE)
message("OpenCL not found")
endif()
endif()
......@@ -265,6 +265,9 @@ endif(COMPILE_TESTS)
set(INMOST_INSTALL_HEADERS Source/Headers/inmost.h
Source/Headers/inmost_autodiff.h
Source/Headers/inmost_residual.h
Source/Headers/inmost_model.h
Source/Headers/inmost_operator.h
Source/Headers/inmost_common.h
Source/Headers/inmost_data.h
Source/Headers/inmost_dense.h
......@@ -276,6 +279,7 @@ set(INMOST_INSTALL_HEADERS Source/Headers/inmost.h
Source/Headers/inmost_sparse.h
Source/Headers/inmost_xml.h
Source/Headers/inmost_variable.h
Source/Headers/inmost_block_variable.h
Source/Headers/container.hpp)
......@@ -295,6 +299,9 @@ set_property(TARGET inmost PROPERTY PUBLIC_HEADER
"${PROJECT_BINARY_DIR}/inmost_options.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_autodiff.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_residual.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_operator.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_model.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_common.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_data.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_dense.h"
......@@ -305,6 +312,7 @@ set_property(TARGET inmost PROPERTY PUBLIC_HEADER
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_solver.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_sparse.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_variable.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_block_variable.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_xml.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/container.hpp")
......
#include "inmost.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "inmost.h"
using namespace INMOST;
#ifndef M_PI
......@@ -90,7 +90,7 @@ int main(int argc,char ** argv)
{ // currently only non-distributed meshes are supported by Inner_RCM partitioner
ttt = Timer();
Partitioner * p = new Partitioner(m);
p->SetMethod(Partitioner::Inner_RCM,Partitioner::Partition); // Specify the partitioner
p->SetMethod(Partitioner::INNER_KMEANS,Partitioner::Partition); // Specify the partitioner
p->Evaluate(); // Compute the partitioner and store new processor ID in the mesh
delete p;
BARRIER;
......
#include "inmost.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "inmost.h"
using namespace INMOST;
#ifndef M_PI
......@@ -125,7 +125,7 @@ int main(int argc,char ** argv)
{ // Compute mesh partitioning
ttt = Timer();
Partitioner p(m); //Create Partitioning object
p.SetMethod(Partitioner::Inner_RCM,repartition ? Partitioner::Repartition : Partitioner::Partition); // Specify the partitioner
p.SetMethod(Partitioner::INNER_KMEANS,repartition ? Partitioner::Repartition : Partitioner::Partition); // Specify the partitioner
p.Evaluate(); // Compute the partitioner and store new processor ID in the mesh
BARRIER
if( m->GetProcessorRank() == 0 ) std::cout << "Evaluate: " << Timer()-ttt << std::endl;
......
......@@ -332,13 +332,15 @@ namespace INMOST
//free created tag
DeleteTag(indicator,FACE|EDGE);
//11. Restore parallel connectivity, global ids
//ResolveModification();
ResolveShared(true);
ResolveModification();
//12. Let the user update their data
//todo: call back function for New() cells
//13. Delete old elements of the mesh
ApplyModification();
//14. Done
EndModification();
//ExchangeData(hanging_nodes,CELL | FACE,0);
//reorder element's data to free up space
ReorderEmpty(CELL|FACE|EDGE|NODE);
//return number of refined cells
......@@ -640,12 +642,14 @@ namespace INMOST
//free created tag
DeleteTag(indicator,FACE|EDGE);
//todo:
//ResolveModification();
ResolveShared(true);
ResolveModification();
//todo:
//let the user update their data
ApplyModification();
//done
EndModification();
//ExchangeData(hanging_nodes,CELL | FACE,0);
//cleanup null links to hanging nodes
for(ElementType etype = FACE; etype <= CELL; etype = NextElementType(etype))
{
......@@ -666,4 +670,4 @@ namespace INMOST
call_counter++;
return ret != 0;
}
}
\ No newline at end of file
}
......@@ -9,6 +9,7 @@ int main(int argc, char ** argv)
if( argc > 1 )
{
AdaptiveMesh m;
m.SetCommunicator(INMOST_MPI_COMM_WORLD);
m.Load(argv[1]);
//m.SetTopologyCheck(NEED_TEST_CLOSURE);
//m.SetTopologyCheck(PROHIBIT_MULTILINE);
......@@ -29,6 +30,8 @@ int main(int argc, char ** argv)
if( it->Coords()[d] < cmin[d] ) cmin[d] = it->Coords()[d];
}
}
m.AggregateMax(cmax,3);
m.AggregateMin(cmin,3);
r = 1;
for(int d = 0; d < 3; ++d)
{
......@@ -47,18 +50,20 @@ int main(int argc, char ** argv)
numref = 0;
for(Mesh::iteratorCell it = m.BeginCell(); it != m.EndCell(); ++it) if( m.GetLevel(it->self()) < max_levels )
{
it->Centroid(xyz);
it->Barycenter(xyz);
//refine a circle
q = 0;
for(int d = 0; d < 3; ++d)
q += (xyz[d]-cnt[d])*(xyz[d]-cnt[d]);
q = sqrt(q);
if( q < r*(k+1) && q > r*k)
//if( q < 0.02 )
{
indicator[it->self()] = 1;
numref++;
}
}
numref = m.Integrate(numref);
if( numref )
{
std::cout << "k " << k << " refcnt " << refcnt << " " << r*k << " < r < " << r*(k+1) << " numref " << numref << " cells " << m.NumberOfCells() << std::endl;
......@@ -89,7 +94,7 @@ int main(int argc, char ** argv)
numref = 0;
for(Mesh::iteratorCell it = m.BeginCell(); it != m.EndCell(); ++it) if( m.GetLevel(it->self()) > 0 )
{
it->Centroid(xyz);
it->Barycenter(xyz);
//refine a circle
q = 0;
for(int d = 0; d < 3; ++d)
......@@ -101,6 +106,7 @@ int main(int argc, char ** argv)
numref++;
}
}
numref = m.Integrate(numref);
if( numref )
{
std::cout << "k " << k << " crscnt " << refcnt << " " << r*k << " < r < " << r*(k+1) << " numcrs " << numref << " cells " << m.NumberOfCells() << std::endl;
......@@ -131,11 +137,19 @@ int main(int argc, char ** argv)
{
std::stringstream file;
file << "step_" << k << ".vtk";
file << "step_" << k << ".pvtk";
m.Save(file.str());
}
{
TagInteger tag_owner = m.CreateTag("OWN",DATA_INTEGER,CELL,NONE,1);
TagInteger tag_owner0 = m.GetTag("OWNER_PROCESSOR");
TagInteger tag_stat = m.CreateTag("STAT",DATA_INTEGER,CELL,NONE,1);
for(Mesh::iteratorCell it = m.BeginCell(); it != m.EndCell(); ++it)
{
tag_owner[*it] = tag_owner0[*it];
tag_stat[*it] = it->GetStatus();
}
std::stringstream file;
file << "step_" << k << ".pmf";
m.Save(file.str());
......@@ -143,4 +157,6 @@ int main(int argc, char ** argv)
}
}
else std::cout << "Usage: " << argv[0] << " mesh_file [max_levels=2]" << std::endl;
}
\ No newline at end of file
Mesh::Finalize();
}
......@@ -17,8 +17,9 @@ Sparse::Matrix * m = NULL;
int zoom = 200;
int block_size = 0;
int draw_color = 0;
//~ Storage::real min = 1e20,max = -1e20;
double amin = 1e20,amax = -1e20;
void printtext(const char * fmt, ...)
{
......@@ -379,6 +380,18 @@ void keyboard(unsigned char key, int x, int y)
}
}
if( key == 'd' )
{
draw_color = (draw_color+1)%5;
switch(draw_color)
{
case 0: std::cout << "color diagonal" << std::endl; break;
case 1: std::cout << "color by min:max" << std::endl; break;
case 2: std::cout << "color by min:max in log scale" << std::endl; break;
case 3: std::cout << "color by min:max per row" << std::endl; break;
case 4: std::cout << "color by min:max per row in log scale" << std::endl; break;
}
}
if (key == 'c') ord->clear();
if (key == 'r')
{
......@@ -415,53 +428,128 @@ void draw()
glVertex2i(m->Size(), m->Size() - ord->GetMatrixPartSize());
glEnd();
*/
glColor3f(0,0,0);
glBegin(GL_QUADS);
for(Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
for(Sparse::Row::iterator jt = it->Begin(); jt != it->End(); ++jt)
if( jt->first != it - m->Begin() )
//DrawEntry(ord->position((it - m->Begin())), m->Size() - ord->position(jt->first));//, sqrt((jt->second-min)/(max-min)));
DrawEntry(jt->first, m->Size() - (it - m->Begin()));//, sqrt((jt->second-min)/(max-min)));
glEnd();
/*
glColor3f(0.0, 1.0, 0);
glBegin(GL_QUADS);
for (Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
glColor3f(0.0, 1.0, 0);
glBegin(GL_QUADS);
for (Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
{
int ind = it - m->Begin();
if (fabs((*it)[ind]) > row_sum[it-m->Begin()]) //DrawEntry(ord->position((it - m->Begin())), m->Size() - ord->position(ind));
DrawEntry((it - m->Begin()), m->Size() - ind);
}
glEnd();
*/
if( draw_color == 0 )
{
int ind = it - m->Begin();
if (fabs((*it)[ind]) > row_sum[it-m->Begin()]) //DrawEntry(ord->position((it - m->Begin())), m->Size() - ord->position(ind));
DrawEntry((it - m->Begin()), m->Size() - ind);
glColor3f(0,0,0);
glBegin(GL_QUADS);
for(Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
for(Sparse::Row::iterator jt = it->Begin(); jt != it->End(); ++jt)
if( jt->first != it - m->Begin() && jt->second)
{
//double r = jt->second
//DrawEntry(ord->position((it - m->Begin())), m->Size() - ord->position(jt->first));//, sqrt((jt->second-min)/(max-min)));
DrawEntry(jt->first, m->Size() - (it - m->Begin()));//, sqrt((jt->second-min)/(max-min)));
}
glEnd();
glBegin(GL_QUADS);
for (Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
{
int ind = it - m->Begin();
double t = fabs((*it)[ind]) / row_sum[ind];
//if (fabs((*it)[ind]) < row_sum[ind]) //DrawEntry(ord->position((it - m->Begin())), m->Size() - ord->position(ind));
glColor3f(0.0, t, 1.0-t);
DrawEntry(ind, m->Size() - ind);
}
glEnd();
//zoom += 1;
glColor3f(1.0, 0, 0);
glBegin(GL_QUADS);
for (Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
{
int ind = it - m->Begin();
if (fabs((*it)[ind]) < 1e-13) //DrawEntry(ord->position((it - m->Begin())), m->Size() - ord->position(ind));
DrawEntry((it - m->Begin()), m->Size() - ind);
}
glEnd();
//zoom -= 1;
}
glEnd();
*/
glBegin(GL_QUADS);
for (Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
else if( draw_color == 1 )
{
int ind = it - m->Begin();
double t = fabs((*it)[ind]) / row_sum[ind];
//if (fabs((*it)[ind]) < row_sum[ind]) //DrawEntry(ord->position((it - m->Begin())), m->Size() - ord->position(ind));
glColor3f(0.0, t, 1.0-t);
DrawEntry(ind, m->Size() - ind);
glBegin(GL_QUADS);
for(Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
for(Sparse::Row::iterator jt = it->Begin(); jt != it->End(); ++jt)
{
double r = (fabs(jt->second) - amin)/(amax-amin);
glColor3f(1-r,1-r,1-r);
DrawEntry(jt->first, m->Size() - (it - m->Begin()));
}
glEnd();
}
glEnd();
zoom += 1;
glColor3f(1.0, 0, 0);
glBegin(GL_QUADS);
for (Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
else if( draw_color == 2 )
{
int ind = it - m->Begin();
if (fabs((*it)[ind]) < 1e-9) //DrawEntry(ord->position((it - m->Begin())), m->Size() - ord->position(ind));
DrawEntry((it - m->Begin()), m->Size() - ind);
glBegin(GL_QUADS);
for(Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
for(Sparse::Row::iterator jt = it->Begin(); jt != it->End(); ++jt)
{
double r = log((fabs(jt->second) - amin)/(amax-amin)*63 + 1)/log(64);
glColor3f(1-r,1-r,1-r);
DrawEntry(jt->first, m->Size() - (it - m->Begin()));
}
glEnd();
}
else if( draw_color == 3 )
{
glBegin(GL_QUADS);
for(Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
{
double rmax = -1.0e20, rmin = 1.0e20;
for(Sparse::Row::iterator jt = it->Begin(); jt != it->End(); ++jt)
{
if( fabs(jt->second) < rmin ) rmin = fabs(jt->second);
if( fabs(jt->second) > rmax ) rmax = fabs(jt->second);
}
if( rmin > rmax ) continue;
//if( rmax - rmin < 1.0e-13 ) continue;
for(Sparse::Row::iterator jt = it->Begin(); jt != it->End(); ++jt)
{
double r = (fabs(jt->second) - rmin)/(rmax-rmin);
glColor3f(1-r,1-r,1-r);
DrawEntry(jt->first, m->Size() - (it - m->Begin()));
}
}
glEnd();
}
else if( draw_color == 4 )
{
glBegin(GL_QUADS);
for(Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
{
double rmax = -1.0e20, rmin = 1.0e20;
for(Sparse::Row::iterator jt = it->Begin(); jt != it->End(); ++jt)
{
if( fabs(jt->second) < rmin ) rmin = fabs(jt->second);
if( fabs(jt->second) > rmax ) rmax = fabs(jt->second);
}
if( rmin > rmax ) continue;
//if( rmax - rmin < 1.0e-13 ) continue;
for(Sparse::Row::iterator jt = it->Begin(); jt != it->End(); ++jt)
{
double r = log((fabs(jt->second) - rmin)/(rmax-rmin)*63 + 1)/log(64);
glColor3f(1-r,1-r,1-r);
DrawEntry(jt->first, m->Size() - (it - m->Begin()));
}
}
glEnd();
}
glEnd();
zoom -= 1;
if (CommonInput != NULL)
{
......@@ -575,23 +663,23 @@ int main(int argc, char ** argv)
std::cout << "Nonzeros: " << nnz << std::endl;
zoom = m->Size() / 1000;
//~ for(Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
//~ for(Sparse::Row::iterator jt = it->Begin(); jt != it->End(); ++jt)
//~ {
//~ if(jt->second < min )
//~ {
//~ min = jt->second;
//~ std::cout << (it-m->Begin()) << " " << jt->first << " " << jt->second << std::endl;
//~ }
//~ if(jt->second > max )
//~ {
//~ max = jt->second;
//~ std::cout << (it-m->Begin()) << " " << jt->first << " " << jt->second << std::endl;
//~ }
//~ }
//~ std::cout << "max: " << max << " min: " << min << std::endl;
zoom = 1;//m->Size() / 1000;
for(Sparse::Matrix::iterator it = m->Begin(); it != m->End(); ++it)
for(Sparse::Row::iterator jt = it->Begin(); jt != it->End(); ++jt)
{
if(fabs(jt->second) < amin )
{
amin = fabs(jt->second);
//std::cout << (it-m->Begin()) << " " << jt->first << " " << jt->second << std::endl;
}
if(fabs(jt->second) > amax )
{
amax = fabs(jt->second);
//std::cout << (it-m->Begin()) << " " << jt->first << " " << jt->second << std::endl;
}
}
std::cout << "absolute max: " << amax << " min: " << amin << std::endl;
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA);
glutInitWindowSize(width, height);
......
#include "inmost.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "inmost.h"
using namespace INMOST;
#ifndef M_PI
......@@ -92,7 +92,7 @@ int main(int argc,char ** argv)
{ // currently only non-distributed meshes are supported by Inner_RCM partitioner
ttt = Timer();
Partitioner * p = new Partitioner(m);
p->SetMethod(Partitioner::Inner_RCM,Partitioner::Partition); // Specify the partitioner
p->SetMethod(Partitioner::INNER_KMEANS,Partitioner::Partition); // Specify the partitioner
p->Evaluate(); // Compute the partitioner and store new processor ID in the mesh
delete p;
BARRIER
......@@ -327,4 +327,4 @@ int main(int argc,char ** argv)
#endif
Solver::Finalize(); // Finalize solver and close MPI activity
return 0;
}
\ No newline at end of file
}
#include "inmost.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "inmost.h"
using namespace INMOST;
#define MESH_SIZE 32
......@@ -227,7 +227,7 @@ Mesh * ParallelGenerator(INMOST_MPI_Comm comm, int ng, int nx, int ny, int nz)
{
CreateCubeElement(m,verts);
}
else if ((i + j) % 2 == 0) // Create two prism cells
else if ((i + j) % 2 == 0 || ng == 6) // Create two prism cells
{
CreateNWPrismElements(m,verts);
}
......@@ -327,4 +327,4 @@ int main(int argc, char *argv[])
delete mesh;
Mesh::Finalize();
return 0;
}
\ No newline at end of file
}
......@@ -9,6 +9,16 @@ add_executable(SliceFunc slice_func.cpp)
add_executable(SplitNonplanar split_nonplanar.cpp)
add_executable(CollapseDegenerate collapse_degenerate.cpp)
add_executable(Bnd2Stl bnd2stl.cpp)
add_executable(Sector sector.cpp)
add_executable(Sew sew.cpp)
add_executable(Scale scale.cpp)
add_executable(Move move.cpp)
add_executable(Convert convert.cpp)
add_executable(SameMeshDifference difference_same.cpp)
add_executable(MeshDifference difference_map.cpp)
add_executable(Kmeans kmeans.cpp)
add_executable(Agglomerate agglomerate.cpp)
add_library(FractureLib fracture.cpp fracture.h)
target_link_libraries(FixFaults inmost)
if(USE_MPI)
......@@ -106,4 +116,102 @@ if(USE_MPI)
endif(USE_MPI)
install(TARGETS Bnd2Stl EXPORT inmost-targets RUNTIME DESTINATION bin)
target_link_libraries(Sector inmost)
if(USE_MPI)
message("linking Sector with MPI")
target_link_libraries(Sector ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(Sector PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS Sector EXPORT inmost-targets RUNTIME DESTINATION bin)
target_link_libraries(Sew inmost)
if(USE_MPI)
message("linking Sew with MPI")
target_link_libraries(Sew ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(Sew PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS Sew EXPORT inmost-targets RUNTIME DESTINATION bin)
target_link_libraries(Scale inmost)
if(USE_MPI)
message("linking Scale with MPI")
target_link_libraries(Scale ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(Scale PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS Scale EXPORT inmost-targets RUNTIME DESTINATION bin)
target_link_libraries(Move inmost)
if(USE_MPI)
message("linking Move with MPI")
target_link_libraries(Move ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(Move PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS Move EXPORT inmost-targets RUNTIME DESTINATION bin)
target_link_libraries(Convert inmost)
if(USE_MPI)
message("linking Convert with MPI")
target_link_libraries(Convert ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(Convert PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS Convert EXPORT inmost-targets RUNTIME DESTINATION bin)
target_link_libraries(SameMeshDifference inmost)
if(USE_MPI)
message("linking SameMeshDifference with MPI")
target_link_libraries(SameMeshDifference ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(SameMeshDifference PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS SameMeshDifference EXPORT inmost-targets RUNTIME DESTINATION bin)
target_link_libraries(MeshDifference inmost)
if(USE_MPI)
message("linking MeshDifference with MPI")
target_link_libraries(MeshDifference ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(MeshDifference PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS MeshDifference EXPORT inmost-targets RUNTIME DESTINATION bin)
target_link_libraries(Kmeans inmost)
if(USE_MPI)
message("linking Kmeans with MPI")
target_link_libraries(Kmeans ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(Kmeans PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS Kmeans EXPORT inmost-targets RUNTIME DESTINATION bin)
target_link_libraries(Agglomerate inmost)
if(USE_MPI)
message("linking Agglomerate with MPI")
target_link_libraries(Agglomerate ${MPI_LIBRARIES})
if(MPI_LINK_FLAGS)
set_target_properties(Agglomerate PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
endif(USE_MPI)
install(TARGETS Agglomerate EXPORT inmost-targets RUNTIME DESTINATION bin)
set_property(TARGET FractureLib PROPERTY PUBLIC_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/fracture.h")
install(TARGETS FractureLib EXPORT inmost-targets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include)
#include "inmost.h"
using namespace INMOST;
//todo: want to separate all faces into those that share edges
//see todo: inside text
int main(int argc, char ** argv)
{
if (argc < 2)
{
std::cout << "Usage: " << argv[0] << " mesh [tag=MATERIAL] [mesh_out=grid.vtk]" << std::endl;
return -1;