jeff-hugh / genpormed Goto Github PK
View Code? Open in Web Editor NEWGenerate random porous media with Quartet Structure Generation Set (QSGS) method.
License: GNU General Public License v3.0
Generate random porous media with Quartet Structure Generation Set (QSGS) method.
License: GNU General Public License v3.0
hello, please help me, After I compile at window and I used the visual studio 2019 to run the code, the following error is happen:
Failed to continue executing the code because BOOST_IOstreams - VC142-MT-GD-X64-1_77.dll could not be found. Reinstalling the program may resolve this problem.
作者你好,我在编译过程中出现了
CMake Error at D:/CLion 2023.3.4/bin/cmake/win/x64/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Boost (missing: regex iostreams system) (found suitable
version "1.72.0", minimum required is "1.60")
请问我应该从哪里排查,我已经正常安装并配置了boost库,但是报错信息还是这样
你好,你的代码里面Porous3D类里面没有生成png图片的方法。
#ifndef POROUS3D_H
#define POROUS3D_H
#include<string>
#include<vector>
using namespace std;
class Porous3D
{
public:
const int NX; /// grid number in x direction
const int NY; /// grid number in y direction
const int NZ; /// grid number in y direction
int* Solid; /// the return value
double phi; /// target porosity
const double p_cd; /// core distribution probability
const double p_surface; /// probability to grow on surface
const double p_edge; /// probability to grow on edge, default value (p_surface / 12.0)
const double p_point; /// probability to grow on point, default value (p_surface / 96.0)
/// Constructor
Porous3D(int nx, int ny, int nz, double por, double p, double p_s, double p_e, double p_p);
~Porous3D();
void Generation(int* s);
void output2tecplot(std::string filename);
double CalcPor();
int NearSolid(int i, int j, int k);
void DeleteDeadZone();
private:
int Grow_Times; /// for iteration
void grow();
int CellIndex(int x, int y, int z);
void InfectFluid(int i, int j, int k);
int DifferentNumber(int i, int j, int k, int core_id);
};
#endif
Dear @Jeff-Hugh ,
It seems that there is no output2png method in the Porous3D class. Could you check this information, please?
Thank you in advance.
你好,请教一下,起初我用这份代码中的2D文件去生成图片,如何发现每一张图片都是,一样的,然后我就发现是随机种子的问题,于是问我就在run.cpp的文件中Generate2D函数中写了一个for循环,但是生成出来的图片堆叠起来生成的3D模型特别奇怪,我不知道是哪里的问题,麻烦回答一下,谢谢。我现在想要的是用这份代码去生成一系列图片,这些图片可以堆叠起来一个类似你在readme中的3D模型的效果。
Dear Dr Jeff
when I 'make' on the terminal,I get some error , the error are as follows:
g++ -std=c++11 -fopenmp -c Porous2D.cpp -o Porous2D.o
g++ -std=c++11 -fopenmp -c run.cpp -o run.o
g++ -std=c++11 -fopenmp -c Porous3D.cpp -o Porous3D.o
g++ -fopenmp -lboost_system -lboost_iostreams -o run ./Porous2D.o ./run.o ./Porous3D.o
/usr/bin/ld: ./Porous2D.o: in function boost::iostreams::stream<boost::iostreams::file_descriptor_sink, std::char_traits<char>, std::allocator<char> >::stream<int, boost::iostreams::file_descriptor_flags>(int const&, boost::iostreams::file_descriptor_flags const&, boost::disable_if<boost::is_same<int, boost::iostreams::file_descriptor_sink>, void>::type*)': Porous2D.cpp:(.text._ZN5boost9iostreams6streamINS0_20file_descriptor_sinkESt11char_traitsIcESaIcEEC2IiNS0_21file_descriptor_flagsEEERKT_RKT0_PNS_10disable_ifINS_7is_sameIS9_S2_EEvE4typeE[_ZN5boost9iostreams6streamINS0_20file_descriptor_sinkESt11char_traitsIcESaIcEEC2IiNS0_21file_descriptor_flagsEEERKT_RKT0_PNS_10disable_ifINS_7is_sameIS9_S2_EEvE4typeE]+0x8e): undefined reference to
boost::iostreams::file_descriptor_sink::file_descriptor_sink(int, boost::iostreams::file_descriptor_flags)'
/usr/bin/ld: ./Porous2D.o: in function boost::iostreams::file_descriptor_sink boost::iostreams::detail::wrap<boost::iostreams::file_descriptor_sink>(boost::iostreams::file_descriptor_sink const&, boost::disable_if<boost::iostreams::is_std_io<boost::iostreams::file_descriptor_sink>, void>::type*)': Porous2D.cpp:(.text._ZN5boost9iostreams6detail4wrapINS0_20file_descriptor_sinkEEET_RKS4_PNS_10disable_ifINS0_9is_std_ioIS4_EEvE4typeE[_ZN5boost9iostreams6detail4wrapINS0_20file_descriptor_sinkEEET_RKS4_PNS_10disable_ifINS0_9is_std_ioIS4_EEvE4typeE]+0x27): undefined reference to
boost::iostreams::file_descriptor_sink::file_descriptor_sink(boost::iostreams::file_descriptor_sink const&)'
/usr/bin/ld: ./Porous2D.o: in function boost::iostreams::detail::concept_adapter<boost::iostreams::file_descriptor_sink>::concept_adapter(boost::iostreams::file_descriptor_sink const&)': Porous2D.cpp:(.text._ZN5boost9iostreams6detail15concept_adapterINS0_20file_descriptor_sinkEEC2ERKS3_[_ZN5boost9iostreams6detail15concept_adapterINS0_20file_descriptor_sinkEEC5ERKS3_]+0x23): undefined reference to
boost::iostreams::file_descriptor_sink::file_descriptor_sink(boost::iostreams::file_descriptor_sink const&)'
/usr/bin/ld: ./Porous2D.o: in function boost::iostreams::detail::concept_adapter<boost::iostreams::file_descriptor_sink>::concept_adapter(boost::iostreams::detail::concept_adapter<boost::iostreams::file_descriptor_sink> const&)': Porous2D.cpp:(.text._ZN5boost9iostreams6detail15concept_adapterINS0_20file_descriptor_sinkEEC2ERKS4_[_ZN5boost9iostreams6detail15concept_adapterINS0_20file_descriptor_sinkEEC5ERKS4_]+0x23): undefined reference to
boost::iostreams::file_descriptor_sink::file_descriptor_sink(boost::iostreams::file_descriptor_sink const&)'
/usr/bin/ld: ./Porous2D.o: in function long boost::iostreams::detail::write_device_impl<boost::iostreams::output>::write<boost::iostreams::file_descriptor_sink>(boost::iostreams::file_descriptor_sink&, boost::iostreams::char_type_of<boost::iostreams::file_descriptor_sink>::type const*, long)': Porous2D.cpp:(.text._ZN5boost9iostreams6detail17write_device_implINS0_6outputEE5writeINS0_20file_descriptor_sinkEEElRT_PKNS0_12char_type_ofIS7_E4typeEl[_ZN5boost9iostreams6detail17write_device_implINS0_6outputEE5writeINS0_20file_descriptor_sinkEEElRT_PKNS0_12char_type_ofIS7_E4typeEl]+0x2b): undefined reference to
boost::iostreams::file_descriptor::write(char const*, long)'
/usr/bin/ld: ./Porous2D.o: in function std::fpos<__mbstate_t> boost::iostreams::detail::seek_device_impl<boost::iostreams::any_tag>::seek<boost::iostreams::file_descriptor_sink>(boost::iostreams::file_descriptor_sink&, long, std::_Ios_Seekdir, std::_Ios_Openmode)': Porous2D.cpp:(.text._ZN5boost9iostreams6detail16seek_device_implINS0_7any_tagEE4seekINS0_20file_descriptor_sinkEEESt4fposI11__mbstate_tERT_lSt12_Ios_SeekdirSt13_Ios_Openmode[_ZN5boost9iostreams6detail16seek_device_implINS0_7any_tagEE4seekINS0_20file_descriptor_sinkEEESt4fposI11__mbstate_tERT_lSt12_Ios_SeekdirSt13_Ios_Openmode]+0x3b): undefined reference to
boost::iostreams::file_descriptor::seek(long, std::_Ios_Seekdir)'
/usr/bin/ld: ./Porous2D.o: in function void boost::iostreams::detail::close_impl<boost::iostreams::closable_tag>::close<boost::iostreams::file_descriptor_sink>(boost::iostreams::file_descriptor_sink&, std::_Ios_Openmode)': Porous2D.cpp:(.text._ZN5boost9iostreams6detail10close_implINS0_12closable_tagEE5closeINS0_20file_descriptor_sinkEEEvRT_St13_Ios_Openmode[_ZN5boost9iostreams6detail10close_implINS0_12closable_tagEE5closeINS0_20file_descriptor_sinkEEEvRT_St13_Ios_Openmode]+0x25): undefined reference to
boost::iostreams::file_descriptor::close()'
collect2: error: ld returned 1 exit status
make: *** [Makefile:9:run] error 1
Could you tell me how can I solve this problem?
Thankyou very much!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.