diff --git a/CMakeLists.txt b/CMakeLists.txt index 06e5357..2fdca9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ SET(_main source/main.cc) # Normally you shouldn't need to change anything below. ############################################################ # Declare all source files the target consists of: -file(GLOB _files source/*cc) +file(GLOB _files source/*cc include/*h) # Don't compile the main file into the library IF(NOT "${_main}" STREQUAL "") diff --git a/docker/debug-release/Dockerfile b/docker/debug-release/Dockerfile deleted file mode 100644 index 117f910..0000000 --- a/docker/debug-release/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM heltai/deal2lkit:debug-release - -MAINTAINER luca.heltai@gmail.com - -# pi-BEM master image -RUN git clone https://github.com/mathLab/pi-BEM/ &&\ - mkdir pi-BEM/build && cd pi-BEM/build &&\ - cmake -DCMAKE_BUILD_TYPE=DebugRelease \ - -GNinja \ - ../ && \ - ninja -j4 - -# Need this for Travis! -USER root diff --git a/docker/debug/Dockerfile b/docker/debug/Dockerfile deleted file mode 100644 index d2a92fc..0000000 --- a/docker/debug/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM heltai/deal2lkit:debug - -MAINTAINER luca.heltai@gmail.com - -# pi-BEM master image -RUN git clone https://github.com/mathLab/pi-BEM/ &&\ - mkdir pi-BEM/build && cd pi-BEM/build &&\ - cmake -DCMAKE_BUILD_TYPE=Debug \ - -GNinja \ - ../ && \ - ninja -j4 - -# Need this for Travis! -USER root diff --git a/docker/release/Dockerfile b/docker/release/Dockerfile deleted file mode 100644 index 757f0e5..0000000 --- a/docker/release/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM heltai/deal2lkit:release - -MAINTAINER luca.heltai@gmail.com - -# pi-BEM master image -RUN git clone https://github.com/mathLab/pi-BEM/ &&\ - mkdir pi-BEM/build && cd pi-BEM/build &&\ - cmake -DCMAKE_BUILD_TYPE=Release \ - -GNinja \ - ../ && \ - ninja -j4 - -# Need this for Travis! -USER root diff --git a/include/driver.h b/include/driver.h index bab494b..3933161 100644 --- a/include/driver.h +++ b/include/driver.h @@ -1,117 +1,65 @@ #ifndef driver_h #define driver_h -#include -#include -#include -#include -#include -#include +#include #include -#include -#include -#include -#include -#include -#include -#include -// -//#include -//#include -//#include -//#include -//#include -// -//#include -//#include -//#include -//#include -//#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -// And here are a few C++ standard header -// files that we will need: -#include -#include -#include -#include -#include - #include "bem_problem.h" #include "bem_fma.h" #include "boundary_conditions.h" #include "computational_domain.h" + #include +#include using namespace dealii; -//using namespace TrilinosWrappers::MPI::Vector; -//using namespace TrilinosWrappers::MPI::SparseMatrix; - /** -* This class is in charge of organising the overall BEM simulation. It has interfaces with all the other classes in order to have a complete simulation. -*/ + * This class is in charge of organising the overall BEM simulation, + * while timing the various phases. It has interfaces with all the + * other classes in order to have a complete simulation. + */ template class Driver : public ParameterAcceptor { public: - + /** + * Initialize variables and setup parameters. + */ Driver(); - ~Driver(); - - /// method to declare the parameters - /// to be read from the parameters file - - virtual void declare_parameters(ParameterHandler &prm); - - /// method to parse the needed parameters - /// from the parameters file - - virtual void parse_parameters(ParameterHandler &prm); - - + /** + * Sets up BEMProblem and ComputationalDomain, then solve BEM. + */ void run(); private: + /// Monitor output only on first processor. ConditionalOStream pcout; + /// Mpi communicator object. MPI_Comm mpi_communicator; + /// Domain related object. ComputationalDomain computational_domain; + /// The actual bem solver. BEMProblem bem_problem; + /// Boundary conditions. BoundaryConditions boundary_conditions; - ParameterHandler prm; - + /// Flag to use global refinement. bool global_refinement; + /// Total number of processors const unsigned int n_mpi_processes; + + /// The id of this processor. const unsigned int this_mpi_process; + + /// Time monitor object. + TimeMonitor timer; }; #endif diff --git a/source/bem_fma.cc b/source/bem_fma.cc index 373b058..09922d7 100644 --- a/source/bem_fma.cc +++ b/source/bem_fma.cc @@ -2774,7 +2774,7 @@ void BEMFMA::compute_geometry_cache() FESystem gradient_fe(*fma_fe, dim); - DoFHandler gradient_dh(fma_dh->get_tria()); + DoFHandler gradient_dh(fma_dh->get_triangulation()); //double tol = 1e-8; std::vector > support_points(fma_dh->n_dofs()); @@ -2827,7 +2827,7 @@ void BEMFMA::compute_geometry_cache() - for (; cell!=endc,gradient_cell!=gradient_endc; ++cell,++gradient_cell) + for (; cell!=endc; ++cell,++gradient_cell) { Assert(cell->index() == gradient_cell->index(), ExcInternalError()); @@ -2997,7 +2997,7 @@ void BEMFMA::generate_octree_blocking() delete blocks[ii]; } - types::global_dof_index maxNumBlocks = num_octree_levels*fma_dh->get_tria().n_active_cells()*fe_v.n_quadrature_points; + types::global_dof_index maxNumBlocks = num_octree_levels*fma_dh->get_triangulation().n_active_cells()*fe_v.n_quadrature_points; //unsigned int maxNumBlocks = 0; //for (unsigned int ii = 0; ii < num_octree_levels + 1; ii++) // { diff --git a/source/driver.cc b/source/driver.cc index 6f353d0..0eddc5f 100644 --- a/source/driver.cc +++ b/source/driver.cc @@ -1,17 +1,4 @@ #include "../include/driver.h" -#include - - -#include "Teuchos_TimeMonitor.hpp" - -using Teuchos::Time; -using Teuchos::TimeMonitor; -using Teuchos::RCP; - -RCP