Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
landinjm committed Jan 16, 2025
1 parent 5fc0490 commit 782a625
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Checks: >
cppcoreguidelines-*,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-avoid-magic-numbers,
hicpp-*,
misc-*,
-misc-non-private-member-variables-in-classes,
Expand All @@ -19,5 +20,6 @@ Checks: >
readability-*,
-readability-else-after-return,
-readability-identifier-length,
-readability-magic-numbers,
WarningsAsErrors: '*'
20 changes: 20 additions & 0 deletions applications/multigrid_test/custom_PDE.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <core/matrix_free_operator.h>

using namespace dealii;

/**
* \brief This is a derived class of `matrixFreeOperator` where the user implements their
* PDEs.
*
* \tparam dim The number of dimensions in the problem.
* \tparam degree The polynomial degree of the shape functions.
* \tparam number Datatype to use. Either double or float.
*/
template <int dim, int degree, typename number>
class customPDE : public matrixFreeOperator<dim, degree, number>
{
/**
* \brief Constructor.
*/
customPDE();
};
11 changes: 5 additions & 6 deletions include/core/temp_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ LaplaceProblem<dim>::setup_system()
setup_time += time.wall_time();
conditionalOStreams::pout_base << "Distribute DoFs & B.C. (CPU/wall) "
<< time.cpu_time() << "s/" << time.wall_time() << 's'
<< std::endl;
<< '\n';
time.restart();
{
{
Expand All @@ -140,7 +140,7 @@ LaplaceProblem<dim>::setup_system()
setup_time += time.wall_time();
conditionalOStreams::pout_base << "Setup matrix-free system (CPU/wall) "
<< time.cpu_time() << "s/" << time.wall_time() << 's'
<< std::endl;
<< '\n';
time.restart();

{
Expand Down Expand Up @@ -184,7 +184,7 @@ LaplaceProblem<dim>::setup_system()
setup_time += time.wall_time();
conditionalOStreams::pout_base << "Setup matrix-free levels (CPU/wall) "
<< time.cpu_time() << "s/" << time.wall_time() << 's'
<< std::endl;
<< '\n';
}

template <int dim>
Expand All @@ -211,7 +211,7 @@ LaplaceProblem<dim>::assemble_rhs()
setup_time += time.wall_time();
conditionalOStreams::pout_base << "Assemble right hand side (CPU/wall) "
<< time.cpu_time() << "s/" << time.wall_time() << 's'
<< std::endl;
<< '\n';
}

template <int dim>
Expand Down Expand Up @@ -336,8 +336,7 @@ LaplaceProblem<dim>::run()

conditionalOStreams::pout_base
<< "Vectorization over " << n_vect_doubles << " doubles = " << n_vect_bits
<< " bits (" << Utilities::System::get_current_vectorization_level() << ')'
<< std::endl;
<< " bits (" << Utilities::System::get_current_vectorization_level() << ')' << '\n';
}

GridGenerator::hyper_cube(triangulation, 0.0, 1.0);
Expand Down

0 comments on commit 782a625

Please sign in to comment.