amrex icon indicating copy to clipboard operation
amrex copied to clipboard

STLtest tutorial

Open PhDFlo opened this issue 2 years ago • 2 comments

Hello,

I'm using AMReX 22.05, and I was trying the STLtest tutorial. However, I can not compile it. I'm using the GNUMakefile, and all other tutorials seem to be working. I have the following error:

mpicxx -MMD -MP -Werror=return-type -g -O3 -pthread -DBL_USE_MPI -DAMREX_USE_MPI -DBL_SPACEDIM=3 -DAMREX_SPACEDIM=3 -DBL_FORT_USE_UNDERSCORE -DAMREX_FORT_USE_UNDERSCORE -DBL_Linux -DAMREX_Linux -DAMREX_USE_EB -DNDEBUG -DOMPI_SKIP_MPICXX -Itmp_build_dir/s/3d.gnu.MPI.EXE -I. -I/AMR/amrex-22.05/Src/Base -I//AMR/amrex-22.05/Src/Base/Parser -I//AMR/amrex-22.05/Src/EB -I//AMR/amrex-22.05/Src/Boundary -I//AMR/amrex-22.05/Src/AmrCore -c main.cpp -o tmp_build_dir/o/3d.gnu.MPI.EXE/main.o main.cpp: In function 'int main(int, char*)': main.cpp:62:45: error: no matching function for call to 'amrex::STLtools::read_ascii_stl_file(std::__cxx11::string&)' stlobj.read_ascii_stl_file(stl_fname); ^ In file included from main.cpp:10: /visu/fgranger/AMR/amrex-22.05/Src/EB/AMReX_EB_STL_utils.H:37:10: note: candidate: 'void amrex::STLtools::read_ascii_stl_file(const string&, amrex::Real, amrex::Array<double, 3>&, int)' void read_ascii_stl_file (std::string const& fname, Real scale, ^~~~~~~~~~~~~~~~~~~ /visu/fgranger/AMR/amrex-22.05/Src/EB/AMReX_EB_STL_utils.H:37:10: note: candidate expects 4 arguments, 1 provided main.cpp:67:16: error: 'class amrex::STLtools' has no member named 'stl_to_markerfab' stlobj.stl_to_markerfab(marker,geom,po_arr); ^~~~~~~~~~~~~~~~ make: *** [tmp_build_dir/o/3d.gnu.MPI.EXE/main.o] Error 1

PhDFlo avatar Jun 15 '22 13:06 PhDFlo

Hi PhDFlo,

I can confirm I am able to recreate the error. I will look into it and get back to you.

Thanks for bringing this up,

Erik

etpalmer63 avatar Jun 15 '22 14:06 etpalmer63

We need to update that tutorial or merge it with amrex-tutorials/ExampleCodes/EB/GeometryGeneration/. The old stl reader was a work-in-process. Recently it has been updated and integrated into the standard EB generation method. See https://amrex-codes.github.io/amrex/docs_html/EB.html for more detail on how to initialize EB from STL.

WeiqunZhang avatar Jun 15 '22 15:06 WeiqunZhang