Commit f416901f authored by Edward Vigmond's avatar Edward Vigmond

forgot surfaces from 2D elements

parent 78adb42f
HOSTMACHINE := $(shell uname)
#HDF5=1
HDF5=1
include make.conf
CXX:=c++
HDF5API_ROOT := ./hdf5api
......@@ -22,7 +22,6 @@ COMMON_INC += -DUSE_HDF5
else
LIB_CH5 :=
LIB_HDF5 :=
OBJS := $(OBJS:HDF5DataBrowser.o= )
OBJS := $(OBJS:HDF5DataBrowser.o=)
endif
......@@ -35,6 +34,7 @@ endif
COMMON_LIBS = $(FLTK_LIBS) -lpng -lpthread -lm -lz $(LIB_HDF5)
#LDFLAGS = -fopenmp
CXXFLAGS = -std=c++11 -I$(HDF5_ROOT)/include -I$(HDF5API_ROOT)/include $(FLTK_INC) $(COMMON_INC)
HDF5_CXXFLAGS=£(CXXFLAGS)
LIBS = -L$(HDF5API_ROOT)/lib $(FLTK_LD_FLAGS) $(COMMON_LIBS)
CPPFLAGS = $(CFLAGS) -g
......@@ -59,7 +59,6 @@ mesalyzer: $(LIB_CH5) $(FLTK_SOURCES:.fl=.cc) $(OS_OBJS) $(LIB_CH5)
ifdef HDF5
$(LIB_CH5):
cd hdf5api && make all $(LIB_CH5) $(FLTK_SOURCES:.fl=.cc) $(OBJS) $(LIB_CH5)
endif
$(OS_files:.o=_os.o): %_os.o: %.cc
......
......@@ -31,6 +31,7 @@ class Model
bool read_instance( gzFile, gzFile );
int add_surface_from_tri( const char * );
int add_surface_from_surf( const char * );
int add_surface_from_elem( const char *fn );
int add_region_surfaces( void );
int add_cnnx_from_elem( string );
inline int reg_first( int s, Object_t t ){return _region[s]->first(t); }
......@@ -101,7 +102,6 @@ class Model
void add_surfaces(hid_t hdf_file);
void add_surfaces(int *elements, int count, int max_width, char *name);
#endif
int add_surface_from_elem( const char *fn );
bool check_element( SurfaceElement *e );
......
......@@ -61,12 +61,13 @@ void
compute_write_surfaces( Model *model, string sf )
{
int ns = model->numSurf();
int nsa = model->add_region_surfaces();
model->add_region_surfaces();
model->add_surface_from_elem( model->file().c_str() );
if(sf[sf.length()-1] != '.')
sf += ".";
sf += "surf";
ofstream of(sf);
for( int i=ns; i<ns+nsa; i++ )
for( int i=ns; i<model->numSurf(); i++ )
model->surface(i)->to_file(of);
cout << "Finished writing " << sf << endl;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment