boutproject / merging-filaments

Simulation of reconnection during merging of current filaments
0 stars 1 forks source link

Error in merging-filaments #1

Closed seob1 closed 4 years ago

seob1 commented 4 years ago

Hi,

I've got an error while doing this simulation. The error is as below. I would appreciate if you give me any comment on this. Thanks!

$ make Compiling merging-flux.cxx merging-flux.cxx: In member function ‘virtual int MergingFlux::init(bool)’: merging-flux.cxx:11:32: error: ‘class Mesh’ has no member named ‘coordinates’; did you mean ‘getCoordinates’? Coordinates coord = mesh->coordinates(); ^~~ getCoordinates merging-flux.cxx:75:78: error: cannot convert ‘std::unique_ptr’ to ‘Laplacian’ in assignment phiSolver = Laplacian::create(Options::getRoot()->getSection("phisolver")); ^ merging-flux.cxx:76:78: error: cannot convert ‘std::unique_ptr’ to ‘Laplacian*’ in assignment psiSolver = Laplacian::create(Options::getRoot()->getSection("psisolver")); ^ merging-flux.cxx: In member function ‘virtual int MergingFlux::rhs(BoutReal)’: merging-flux.cxx:90:20: warning: unused parameter ‘t’ [-Wunused-parameter] int rhs(BoutReal t) { ^ ../..//make.config:317: recipe for target 'merging-flux.o' failed make: *** [merging-flux.o] Error 1

bendudson commented 4 years ago

Please try again with the latest master branch. I've just merged PR #2 , which included updates for the latest BOUT++ master. It also includes some examples with external poloidal field coils.

seob1 commented 4 years ago

Hi @bendudson Thanks, Unfortunately, I've still got an error as below:

$ make Compiling merging-flux.cxx merging-flux.cxx: In member function ‘virtual BoutReal CoilGenerator::generate(BoutReal, BoutReal, BoutReal, BoutReal)’: merging-flux.cxx:44:40: warning: ‘virtual double FieldGenerator::generate(BoutReal, BoutReal, BoutReal, BoutReal)’ is deprecated [-Wdeprecated-declarations] BoutReal R = Rgen->generate(x,y,z,t); ^ In file included from ../..//include/bout_types.hxx:25:0, from ../..//include/datafile.hxx:17, from ../..//include/bout.hxx:40, from ../..//include/bout/physicsmodel.hxx:40, from merging-flux.cxx:2: ../..//include/bout/sys/expressionparser.hxx:69:29: note: declared here DEPRECATED(virtual double generate(BoutReal x, BoutReal y, BoutReal z, BoutReal t)) { ^ ../..//include/bout/deprecated.hxx:18:55: note: in definition of macro ‘DEPRECATED’

define DEPRECATED(func) attribute ((deprecated)) func

                                                   ^~~~

merging-flux.cxx:45:40: warning: ‘virtual double FieldGenerator::generate(BoutReal, BoutReal, BoutReal, BoutReal)’ is deprecated [-Wdeprecated-declarations] BoutReal Z = Zgen->generate(x,y,z,t); ^ In file included from ../..//include/bout_types.hxx:25:0, from ../..//include/datafile.hxx:17, from ../..//include/bout.hxx:40, from ../..//include/bout/physicsmodel.hxx:40, from merging-flux.cxx:2: ../..//include/bout/sys/expressionparser.hxx:69:29: note: declared here DEPRECATED(virtual double generate(BoutReal x, BoutReal y, BoutReal z, BoutReal t)) { ^ ../..//include/bout/deprecated.hxx:18:55: note: in definition of macro ‘DEPRECATED’

define DEPRECATED(func) attribute ((deprecated)) func

                                                   ^~~~

merging-flux.cxx: In member function ‘virtual FieldGeneratorPtr CoilGenerator::clone(std::__cxx11::list<std::shared_ptr >)’: merging-flux.cxx:55:52: warning: ‘virtual double FieldGenerator::generate(BoutReal, BoutReal, BoutReal, BoutReal)’ is deprecated [-Wdeprecated-declarations] BoutReal Rc_new = (*argsit++)->generate(0,0,0,0); ^ In file included from ../..//include/bout_types.hxx:25:0, from ../..//include/datafile.hxx:17, from ../..//include/bout.hxx:40, from ../..//include/bout/physicsmodel.hxx:40, from merging-flux.cxx:2: ../..//include/bout/sys/expressionparser.hxx:69:29: note: declared here DEPRECATED(virtual double generate(BoutReal x, BoutReal y, BoutReal z, BoutReal t)) { ^ ../..//include/bout/deprecated.hxx:18:55: note: in definition of macro ‘DEPRECATED’

define DEPRECATED(func) attribute ((deprecated)) func

                                                   ^~~~

merging-flux.cxx:56:52: warning: ‘virtual double FieldGenerator::generate(BoutReal, BoutReal, BoutReal, BoutReal)’ is deprecated [-Wdeprecated-declarations] BoutReal Zc_new = (*argsit++)->generate(0,0,0,0); ^ In file included from ../..//include/bout_types.hxx:25:0, from ../..//include/datafile.hxx:17, from ../..//include/bout.hxx:40, from ../..//include/bout/physicsmodel.hxx:40, from merging-flux.cxx:2: ../..//include/bout/sys/expressionparser.hxx:69:29: note: declared here DEPRECATED(virtual double generate(BoutReal x, BoutReal y, BoutReal z, BoutReal t)) { ^ ../..//include/bout/deprecated.hxx:18:55: note: in definition of macro ‘DEPRECATED’

define DEPRECATED(func) attribute ((deprecated)) func

                                                   ^~~~

merging-flux.cxx: In member function ‘virtual int MergingFlux::init(bool)’: merging-flux.cxx:159:78: error: cannot convert ‘std::unique_ptr’ to ‘Laplacian’ in assignment phiSolver = Laplacian::create(Options::getRoot()->getSection("phisolver")); ^ merging-flux.cxx:160:78: error: cannot convert ‘std::unique_ptr’ to ‘Laplacian’ in assignment psiSolver = Laplacian::create(Options::getRoot()->getSection("psisolver")); ^ ../..//make.config:317: recipe for target 'merging-flux.o' failed make: *** [merging-flux.o] Error 1

bendudson commented 4 years ago

I think you are trying to compile it with the next branch of BOUT++, as I get the same errors if I try compiling with the next branch. That branch of BOUT++ includes breaking changes which will become the 5.0 release. The master branch of merging-filaments works with the master branch of BOUT++ (there is a next branch of both too...)

seob1 commented 4 years ago

@bendudson Thank you so much, I appreciate. It works well.