Skip to content

Commit

Permalink
comments and renaming makeTriangulation function
Browse files Browse the repository at this point in the history
  • Loading branch information
landinjm committed Dec 16, 2024
1 parent 3371b5f commit eff0922
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 18 deletions.
4 changes: 2 additions & 2 deletions applications/CHiMaD_benchmarks/CHiMaD_benchmark1c/customPDE.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class customPDE : public MatrixFreePDE<dim, degree>
// ================================================================

void
makeTriangulation(parallel::distributed::Triangulation<dim> &) const override;
create_triangulation(parallel::distributed::Triangulation<dim> &tria) const override;

// ================================================================
// Model constants specific to this subclass
Expand All @@ -104,7 +104,7 @@ class customPDE : public MatrixFreePDE<dim, degree>

template <int dim, int degree>
void
customPDE<dim, degree>::makeTriangulation(
customPDE<dim, degree>::create_triangulation(
parallel::distributed::Triangulation<dim> &tria) const
{
parallel::distributed::Triangulation<dim> tria_horizontal_box(MPI_COMM_WORLD);
Expand Down
4 changes: 2 additions & 2 deletions applications/CHiMaD_benchmarks/CHiMaD_benchmark6b/customPDE.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class customPDE : public MatrixFreePDE<dim, degree>

// Virtual method in MatrixFreePDE
void
makeTriangulation(parallel::distributed::Triangulation<dim> &) const override;
create_triangulation(parallel::distributed::Triangulation<dim> &tria) const override;

// ================================================================
// Model constants specific to this subclass
Expand All @@ -108,7 +108,7 @@ class customPDE : public MatrixFreePDE<dim, degree>

template <int dim, int degree>
void
customPDE<dim, degree>::makeTriangulation(
customPDE<dim, degree>::create_triangulation(
parallel::distributed::Triangulation<dim> &tria) const
{
parallel::distributed::Triangulation<dim> tria_box(MPI_COMM_WORLD);
Expand Down
33 changes: 21 additions & 12 deletions include/core/matrixFreePDE.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,36 +52,45 @@ using vectorType = LinearAlgebra::distributed::Vector<double>;
// macro for constants
#define constV(a) make_vectorized_array(a)

//
// base class for matrix free PDE's
//
/**
* This is the abstract base class for the matrix free implementation of
* Parabolic and Elliptic BVP's, and supports MPI, Threads and Vectorization
* (Hybrid Parallel). This class contains the parallel data structures, mesh
* (referred to as triangulation), parallel degrees of freedom distribution,
* constraints, and general utility methods.
* \brief This is the abstract base class for the matrix free implementation of parabolic
* and elliptic BVP's, and supports MPI, threads and vectorization (Hybrid Parallel). This
* class contains the parallel data structures, mesh (referred to as triangulation),
* parallel degrees of freedom distribution, constraints, and general utility methods.
*
* All the physical models in this package inherit this base class.
*
* \tparam dim The number of dimensions in the problem.
* \tparam degree The polynomial degree of the shape functions.
*/
template <int dim, int degree>
class MatrixFreePDE : public Subscriptor
{
public:
/**
* Class contructor
* \brief Class contructor.
*/
MatrixFreePDE(userInputParameters<dim>);
~MatrixFreePDE();

/**
* \brief Class destructor.
*/
~MatrixFreePDE() override;

/**
* Initializes the mesh, degrees of freedom, constraints and data structures
* \brief Initializes the mesh, degrees of freedom, constraints and data structures
* using the user provided inputs in the application parameters file.
*/
virtual void
init();

/**
* \brief Create the mesh with the user provided domain sizes.
*
* \param tria Triangulation object. It must be empty prior to calling this function.
*/
virtual void
makeTriangulation(parallel::distributed::Triangulation<dim> &) const;
create_triangulation(parallel::distributed::Triangulation<dim> &tria) const;

/**
* Initializes the data structures for enabling unit tests.
Expand Down
4 changes: 2 additions & 2 deletions src/core/init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MatrixFreePDE<dim, degree>::init()

pcout << "creating problem mesh...\n";
// Create the coarse mesh and mark the boundaries
makeTriangulation(triangulation);
create_triangulation(triangulation);

// Set which (if any) faces of the triangulation are periodic
setPeriodicity();
Expand Down Expand Up @@ -376,7 +376,7 @@ MatrixFreePDE<dim, degree>::init()

template <int dim, int degree>
void
MatrixFreePDE<dim, degree>::makeTriangulation(
MatrixFreePDE<dim, degree>::create_triangulation(
parallel::distributed::Triangulation<dim> &tria) const
{
if (dim == 3)
Expand Down

0 comments on commit eff0922

Please sign in to comment.