Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented changes to move to deal.II version 9.6.0 #55

Merged
merged 5 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# The clang-format (Clang 11) style file used by deal.II.
# The clang-format (Clang 16) style file used by deal.II.
#

AccessModifierOffset: -2
Expand Down Expand Up @@ -160,6 +160,8 @@ PointerAlignment: Right
ReflowComments: true
CommentPragmas: '( \| |\*--|<li>|@ref | @p |@param |@name |@returns |@warning |@ingroup |@author |@date |@related |@relates |@relatesalso |@deprecated |@image |@return |@brief |@attention |@copydoc |@addtogroup |@todo |@tparam |@see |@note |@skip |@skipline |@until |@line |@dontinclude |@include)'

QualifierAlignment: Left

SortIncludes: true
SortUsingDeclarations: true

Expand All @@ -175,7 +177,7 @@ SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false

Standard: Cpp11
Standard: c++20

TabWidth: 2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/indentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

runs-on: ubuntu-latest
container:
image: dealii/dealii:v9.5.0-jammy
image: dealii/dealii:v9.6.0-jammy
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: dealii/dealii:v9.5.0-jammy
image: dealii/dealii:v9.6.0-jammy
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

steps:
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: dealii/dealii:v9.5.0-jammy
image: dealii/dealii:v9.6.0-jammy
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

steps:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.5.0
9.6.0
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM dealii/dealii:v9.5.0-jammy
FROM dealii/dealii:v9.6.0-jammy

# pi-BEM master image
RUN git clone https://github.com/mathLab/pi-BEM/ &&\
Expand Down
12 changes: 6 additions & 6 deletions include/bem_fma.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ class BEMFMA : public ParameterAcceptor
/// Mapping in the BEMFMA class. It also sets up some useful vector for,
/// mixed boundary conditions and double nodes handling.
void
init_fma(const DoFHandler<dim - 1, dim> & input_dh,
init_fma(const DoFHandler<dim - 1, dim> &input_dh,
const std::vector<std::set<types::global_dof_index>> &db_in,
const TrilinosWrappers::MPI::Vector & input_sn,
const Mapping<dim - 1, dim> & input_mapping =
const TrilinosWrappers::MPI::Vector &input_sn,
const Mapping<dim - 1, dim> &input_mapping =
StaticMappingQ1<dim - 1, dim>::mapping,
unsigned int quad_order = 4,
unsigned int sing_quad_order = 5);
Expand Down Expand Up @@ -173,8 +173,8 @@ class BEMFMA : public ParameterAcceptor
multipole_matr_vect_products(
const TrilinosWrappers::MPI::Vector &phi_values,
const TrilinosWrappers::MPI::Vector &dphi_dn_values,
TrilinosWrappers::MPI::Vector & matrVectProdN,
TrilinosWrappers::MPI::Vector & matrVectProdD) const;
TrilinosWrappers::MPI::Vector &matrVectProdN,
TrilinosWrappers::MPI::Vector &matrVectProdD) const;


// void compute_m2l_flags();
Expand Down Expand Up @@ -209,7 +209,7 @@ class BEMFMA : public ParameterAcceptor
/// architectures.
TrilinosWrappers::PreconditionILU &
FMA_preconditioner(const TrilinosWrappers::MPI::Vector &alpha,
AffineConstraints<double> & c);
AffineConstraints<double> &c);

protected:
/// Three pointers to the problem parameters to be set equal to
Expand Down
26 changes: 13 additions & 13 deletions include/bem_problem.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
#include <deal.II/lac/trilinos_vector.h>
#include <deal.II/lac/vector.h>

//#include <deal.II/lac/petsc_vector.h>
//#include <deal.II/lac/petsc_parallel_vector.h>
//#include <deal.II/lac/petsc_parallel_sparse_matrix.h>
//#include <deal.II/lac/petsc_solver.h>
//#include <deal.II/lac/petsc_precondition.h>
// #include <deal.II/lac/petsc_vector.h>
// #include <deal.II/lac/petsc_parallel_vector.h>
// #include <deal.II/lac/petsc_parallel_sparse_matrix.h>
// #include <deal.II/lac/petsc_solver.h>
// #include <deal.II/lac/petsc_precondition.h>

#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_handler.h>
Expand Down Expand Up @@ -126,8 +126,8 @@ class BEMProblem : public ParameterAcceptor
const MPI_Comm comm = MPI_COMM_WORLD);

void
solve(TrilinosWrappers::MPI::Vector & phi,
TrilinosWrappers::MPI::Vector & dphi_dn,
solve(TrilinosWrappers::MPI::Vector &phi,
TrilinosWrappers::MPI::Vector &dphi_dn,
const TrilinosWrappers::MPI::Vector &tmp_rhs);

/// This function takes care of the proper initialization of all the elements
Expand All @@ -151,8 +151,8 @@ class BEMProblem : public ParameterAcceptor
/// have kept this function serial. We stress that it needs to be called only
/// once.
void
compute_constraints(IndexSet & c_cpu_set,
AffineConstraints<double> & constraints,
compute_constraints(IndexSet &c_cpu_set,
AffineConstraints<double> &constraints,
const TrilinosWrappers::MPI::Vector &tmp_rhs);

// private:
Expand Down Expand Up @@ -198,15 +198,15 @@ class BEMProblem : public ParameterAcceptor
/// vector src. The result is stored
/// in the vector dst.
void
vmult(TrilinosWrappers::MPI::Vector & dst,
vmult(TrilinosWrappers::MPI::Vector &dst,
const TrilinosWrappers::MPI::Vector &src) const;

/// The second method computes the
/// right hand side vector of the
/// system.

void
compute_rhs(TrilinosWrappers::MPI::Vector & dst,
compute_rhs(TrilinosWrappers::MPI::Vector &dst,
const TrilinosWrappers::MPI::Vector &src) const;

/// The third method computes the
Expand All @@ -223,8 +223,8 @@ class BEMProblem : public ParameterAcceptor
/// Depending on the resolution stategy we go whether for the direct or fma
/// strategy.
void
solve_system(TrilinosWrappers::MPI::Vector & phi,
TrilinosWrappers::MPI::Vector & dphi_dn,
solve_system(TrilinosWrappers::MPI::Vector &phi,
TrilinosWrappers::MPI::Vector &dphi_dn,
const TrilinosWrappers::MPI::Vector &tmp_rhs);


Expand Down
2 changes: 1 addition & 1 deletion include/boundary_conditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class BoundaryConditions : public ParameterAcceptor
{
public:
BoundaryConditions(ComputationalDomain<dim> &comp_dom,
BEMProblem<dim> & bem,
BEMProblem<dim> &bem,
const MPI_Comm comm = MPI_COMM_WORLD)
: wind(dim)
, comp_dom(comp_dom)
Expand Down
6 changes: 3 additions & 3 deletions include/constrained_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ template <class VEC, class MATRIX>
class ConstrainedOperator
{
public:
ConstrainedOperator(const MATRIX & m,
ConstrainedOperator(const MATRIX &m,
const AffineConstraints<double> &c,
const IndexSet & c_cpu_set,
const IndexSet &c_cpu_set,
MPI_Comm comm = MPI_COMM_WORLD)
: constraints(c)
, matrix(m)
Expand All @@ -74,7 +74,7 @@ class ConstrainedOperator

private:
const AffineConstraints<double> &constraints;
const MATRIX & matrix;
const MATRIX &matrix;
const IndexSet constr_cpu_set;
MPI_Comm mpi_communicator;
unsigned int n_mpi_processes;
Expand Down
20 changes: 10 additions & 10 deletions include/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@
#include <deal.II/lac/sparse_matrix.h>
#include <deal.II/lac/vector.h>
//
//#include <deal.II/lac/trilinos_vector.h>
//#include <deal.II/lac/trilinos_vector.h>
//#include <deal.II/lac/trilinos_sparse_matrix.h>
//#include <deal.II/lac/trilinos_solver.h>
//#include <deal.II/lac/trilinos_precondition.h>
// #include <deal.II/lac/trilinos_vector.h>
// #include <deal.II/lac/trilinos_vector.h>
// #include <deal.II/lac/trilinos_sparse_matrix.h>
// #include <deal.II/lac/trilinos_solver.h>
// #include <deal.II/lac/trilinos_precondition.h>
//
//#include <deal.II/lac/petsc_vector.h>
//#include <deal.II/lac/petsc_parallel_vector.h>
//#include <deal.II/lac/petsc_parallel_sparse_matrix.h>
//#include <deal.II/lac/petsc_solver.h>
//#include <deal.II/lac/petsc_precondition.h>
// #include <deal.II/lac/petsc_vector.h>
// #include <deal.II/lac/petsc_parallel_vector.h>
// #include <deal.II/lac/petsc_parallel_sparse_matrix.h>
// #include <deal.II/lac/petsc_solver.h>
// #include <deal.II/lac/petsc_precondition.h>

#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_in.h>
Expand Down
6 changes: 3 additions & 3 deletions include/laplace_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ namespace LaplaceKernel
template <int dim> // mio//
void
kernels(const Tensor<1, dim> &R,
Tensor<2, dim> & H,
Tensor<1, dim> & D,
double & d)
Tensor<2, dim> &H,
Tensor<1, dim> &D,
double &d)
{
double r = R.norm();
double r2 = r * r;
Expand Down
2 changes: 1 addition & 1 deletion include/local_expansion.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class LocalExpansion

LocalExpansion(const unsigned int order,
const dealii::Point<3> &center,
const AssLegFunction * assLegFunction);
const AssLegFunction *assLegFunction);

LocalExpansion(const LocalExpansion &other);

Expand Down
4 changes: 2 additions & 2 deletions include/local_expansion_coeff.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LocalExpansionCoeff
const unsigned int &m,
const unsigned int &nn,
const unsigned int &mm,
const double & value);
const double &value);
unsigned int
getNumberOfElements();
unsigned int
Expand All @@ -49,7 +49,7 @@ class LocalExpansionCoeff

private:
unsigned int _p;
double * _coeff;
double *_coeff;
};

#endif /* LOCALEXPANSIONCOEFF_HPP */
4 changes: 2 additions & 2 deletions include/multipole_expansion.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class MultipoleExpansion

MultipoleExpansion(const unsigned int order,
const dealii::Point<3> &center,
const AssLegFunction * assLegFunction);
const AssLegFunction *assLegFunction);

MultipoleExpansion(const MultipoleExpansion &other);

Expand All @@ -68,7 +68,7 @@ class MultipoleExpansion

void
AddNormDer(const double strength,
const dealii::Point<3> & point,
const dealii::Point<3> &point,
const dealii::Tensor<1, 3> &normal);

double
Expand Down
13 changes: 6 additions & 7 deletions include/singular_kernel_integral.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <deal.II/grid/tria_iterator.h>
// Here are some functions to generate standard grids:
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_reordering.h>
#include <deal.II/grid/grid_tools.h>

// Output of grids in various graphics formats:
Expand All @@ -60,9 +59,9 @@ class SingularKernelIntegral
public:
SingularKernelIntegral(
const typename DoFHandler<dim - 1, dim>::active_cell_iterator &in_cell,
const FiniteElement<dim - 1, dim> & in_fe,
const Mapping<dim - 1, dim> & in_mapping,
const Point<dim - 1> & in_eta);
const FiniteElement<dim - 1, dim> &in_fe,
const Mapping<dim - 1, dim> &in_mapping,
const Point<dim - 1> &in_eta);



Expand All @@ -80,9 +79,9 @@ class SingularKernelIntegral

private:
const typename DoFHandler<dim - 1, dim>::active_cell_iterator &cell;
const FiniteElement<dim - 1, dim> & fe;
const Mapping<dim - 1, dim> & mapping;
const Point<dim - 1> & eta;
const FiniteElement<dim - 1, dim> &fe;
const Mapping<dim - 1, dim> &mapping;
const Point<dim - 1> &eta;
// to be read from input file
unsigned int rho_quadrature_order = 4;
unsigned int theta_quadrature_order = 20;
Expand Down
10 changes: 5 additions & 5 deletions include/true_constrained_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ template <class VEC, class MATRIX>
class ConstrainedOperator
{
public:
ConstrainedOperator(const MATRIX & m,
ConstrainedOperator(const MATRIX &m,
const AffineConstraints<double> &c,
const IndexSet & c_cpu_set,
const IndexSet &c_cpu_set,
MPI_Comm comm = MPI_COMM_WORLD)
: cm(c)
, matrix(m)
Expand Down Expand Up @@ -82,7 +82,7 @@ class ConstrainedOperator

private:
const AffineConstraints<double> &cm;
const MATRIX & matrix;
const MATRIX &matrix;
const IndexSet constr_cpu_set;
AffineConstraints<double> cmt;
MPI_Comm mpi_communicator;
Expand Down Expand Up @@ -112,7 +112,7 @@ class ConstrainedOperator

template <class VEC, class MATRIX>
void
ConstrainedOperator<VEC, MATRIX>::constraint_vmult(VEC & dst,
ConstrainedOperator<VEC, MATRIX>::constraint_vmult(VEC &dst,
const VEC &src) const
{
VEC loc_src(src.locally_owned_elements(), constr_cpu_set, mpi_communicator);
Expand Down Expand Up @@ -141,7 +141,7 @@ ConstrainedOperator<VEC, MATRIX>::constraint_vmult(VEC & dst,

template <class VEC, class MATRIX>
void
ConstrainedOperator<VEC, MATRIX>::constraint_tvmult(VEC & dst,
ConstrainedOperator<VEC, MATRIX>::constraint_tvmult(VEC &dst,
const VEC &src) const
{
VEC loc_dst(constr_cpu_set);
Expand Down
2 changes: 1 addition & 1 deletion scripts/dr.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
docker run --user $(id -u):$(id -g) -i -t --rm -P -v `pwd`:/app:rw dealii/dealii:v9.5.0-jammy /bin/sh -c "cd /app; $@"
docker run --user $(id -u):$(id -g) -i -t --rm -P -v `pwd`:/app:rw dealii/dealii:v9.6.0-jammy /bin/sh -c "cd /app; $@"
Loading
Loading