I have attached the CMake file and the source file. This is as minimal as I
can make it. The complete error is as follows
/home/dealii/app/mock/step-3.cc: In constructor ‘Test::mock::mock()’:
/home/dealii/app/mock/step-3.cc:28:65: error: no matching function for call
to
‘dealii::parallel::distributed::Triangulation<2>::Triangulation(ompi_communicator_t*&,
dealii::Triangulation<2, 2>::MeshSmoothing)’
Triangulation<DIM>::smoothing_on_coarsening))
^
In file included from /home/dealii/app/mock/step-3.cc:1:0:
/home/dealii/dealii-v8.5.0/include/deal.II/distributed/tria.h:1043:7: note:
candidate:
dealii::parallel::distributed::Triangulation<dim,
spacedim>::Triangulation() [with int dim = 2; int spacedim = 2]
Triangulation ();
^~~~~~~~~~~~~
/home/dealii/dealii-v8.5.0/include/deal.II/distributed/tria.h:1043:7: note:
candidate expects 0 arguments, 2 provided
/home/dealii/dealii-v8.5.0/include/deal.II/distributed/tria.h:1037:11: note:
candidate:
dealii::parallel::distributed::Triangulation<2>::Triangulation(const
dealii::parallel::distributed::Triangulation<2>&)
class Triangulation : public
dealii::parallel::Triangulation<dim,spacedim>
^~~~~~~~~~~~~
/home/dealii/dealii-v8.5.0/include/deal.II/distributed/tria.h:1037:11: note:
candidate expects 1 argument, 2 provided
/home/dealii/dealii-v8.5.0/include/deal.II/distributed/tria.h:1037:11: note:
candidate:
dealii::parallel::distributed::Triangulation<2>::Triangulation(dealii::parallel::distributed::Triangulation<2>&&)
/home/dealii/dealii-v8.5.0/include/deal.II/distributed/tria.h:1037:11: note:
candidate expects 1 argument, 2 provided
CMakeFiles/step-3.dir/build.make:62: recipe for target
'CMakeFiles/step-3.dir/step-3.cc.o' failed
make[2]: *** [CMakeFiles/step-3.dir/step-3.cc.o] Error 1
CMakeFiles/Makefile2:227: recipe for target 'CMakeFiles/step-3.dir/all'
failed
make[1]: *** [CMakeFiles/step-3.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
On Thursday, May 11, 2017 at 11:42:18 AM UTC+2, Daniel Arndt wrote:
>
> Ashkan,
>
> I tried to compile my application with the new dealii 8.5.0 but it fails.
>>
>> In my program I user distributed triangulation and I get the error
>>
>> error: no matching function for call to
>> ‘dealii::parallel::distributed::Triangulation<2>::Triangulation(ompi_communicator_t*&,
>>
>> dealii::Triangulation<2, 2>::MeshSmoothing)’
>>
>> Is there any changes that I have to do? From the documentation I see that
>> this is still available. Also the same code is compiling fine with version
>> 8.4.2
>>
> That sounds strange. As far as I know, the constructor of
> ‘dealii::parallel::distributed::Triangulation'
> didn't change.
> Can you provide us with a minimal example showing that problem? Does this
> issue also appear with a recent developer version?
>
> Best,
> Daniel
>
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
#include <deal.II/distributed/tria.h>
#define DIM 2
using namespace dealii;
using namespace std;
namespace Test {
class mock{
public:
mock();
void run();
private:
MPI_Comm mpi_communicator;
dealii::parallel::distributed::Triangulation<DIM> triangulation;
};
}
Test::mock::mock() :
mpi_communicator(MPI_COMM_WORLD),
triangulation (mpi_communicator,
typename Triangulation<DIM>::MeshSmoothing
(Triangulation<DIM>::smoothing_on_refinement |
Triangulation<DIM>::smoothing_on_coarsening))
{}
void Test::mock::run()
{
// Nothing
}
int main (int argc, char** argv)
{
try{
// Initialize MPI
Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
Test::mock mockp;
mockp.run();
}
catch (exception &exc){
cerr << exc.what() << endl;
return EXIT_FAILURE;
}
catch (...){
cerr << "Unknown exception!" << endl;
return EXIT_FAILURE;
}
return 0;
}
##
# CMake script for the step-3 tutorial program:
##
# Set the name of the project and target:
SET(TARGET "step-3")
# Declare all source files the target consists of. Here, this is only
# the one step-X.cc file, but as you expand your project you may wish
# to add other source files as well. If your project becomes much larger,
# you may want to either replace the following statement by something like
# FILE(GLOB_RECURSE TARGET_SRC "source/*.cc")
# FILE(GLOB_RECURSE TARGET_INC "include/*.h")
# SET(TARGET_SRC ${TARGET_SRC} ${TARGET_INC})
# or switch altogether to the large project CMakeLists.txt file discussed
# in the "CMake in user projects" page accessible from the "User info"
# page of the documentation.
SET(TARGET_SRC
${TARGET}.cc
)
# Usually, you will not need to modify anything beyond this point...
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
FIND_PACKAGE(deal.II 8.5.0 QUIET
HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
)
IF(NOT ${deal.II_FOUND})
MESSAGE(FATAL_ERROR "\n"
"*** Could not locate a (sufficiently recent) version of deal.II. ***\n\n"
"You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to
cmake\n"
"or set an environment variable \"DEAL_II_DIR\" that contains this path."
)
ENDIF()
DEAL_II_INITIALIZE_CACHED_VARIABLES()
PROJECT(${TARGET})
DEAL_II_INVOKE_AUTOPILOT()