Skip to content

Commit

Permalink
Using sub .clang-format to ignore fortran directory
Browse files Browse the repository at this point in the history
  • Loading branch information
lsawade committed Jan 10, 2025
1 parent ff4096d commit 36679cb
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v19.1.6"
rev: "v14.0.6"
hooks:
- id: clang-format
types_or: [c++]
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ Table below shows various features available and tested in this package on vario
-

.. note::
While we work towards building this package and making the
code/documentation more complete, please refer relevant SPECFEM package
While we work towards building this package and making the
code/documentation more complete, please refer relevant SPECFEM package
documentations for technical details on SPECFEM theory.

.. raw:: html
Expand Down
2 changes: 2 additions & 0 deletions fortran/.clang-format-ignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file will only work from clang-format 18 onwards, keeping it for future
# clang-format update
# ignore fortran header files in the fortran directory:
./meshfem2d/*.h
./meshfem3d/setup/*.h
Expand Down
28 changes: 11 additions & 17 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ package-mode = false
[tool.poetry.dependencies]
python = ">=3.12,<4.0"
pre-commit = "^2.19.0"
clang-format = "^19.1.6"
clang-format = "^14.0.6"
sphinx-rtd-theme = "^1.0.0"
doc8 = ">=0.3.6"
rstcheck = ">=6.2.4"
Expand Down
2 changes: 1 addition & 1 deletion src/IO/mesh/impl/fortran/read_material_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ std::vector<specfem::mesh::materials::material_specification> read_materials(
std::ifstream &stream, const int numat,
specfem::mesh::materials::material<elastic, isotropic> &elastic_isotropic,
specfem::mesh::materials::material<acoustic, isotropic> &acoustic_isotropic,

const specfem::MPI::MPI *mpi) {

input_holder read_values;
Expand Down
16 changes: 8 additions & 8 deletions src/plotter/plot_wavefield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#include <vtkLookupTable.h>
#include <vtkNamedColors.h>
#ifdef __APPLE__
#include <vtkCocoaRenderWindow.h>
#include <vtkCocoaRenderWindow.h>
#else
#include <vtkOpenGLRenderWindow.h>
#include <vtkOpenGLRenderWindow.h>
#endif
#include <vtkPNGWriter.h>
#include <vtkPointData.h>
Expand Down Expand Up @@ -314,12 +314,12 @@ void specfem::plotter::plot_wavefield::plot() {
throw std::runtime_error("Unsupported output format");
}
} else {
// Create a render window interactor
#ifdef __APPLE__
auto render_window = vtkSmartPointer<vtkCocoaRenderWindow>::New();
#else
auto render_window = vtkSmartPointer<vtkOpenGLRenderWindow>::New();
#endif
// Create a render window interactor
#ifdef __APPLE__
auto render_window = vtkSmartPointer<vtkCocoaRenderWindow>::New();
#else
auto render_window = vtkSmartPointer<vtkOpenGLRenderWindow>::New();
#endif
render_window->AddRenderer(renderer);
render_window->SetSize(1280, 1280);
render_window->SetWindowName("Wavefield");
Expand Down

0 comments on commit 36679cb

Please sign in to comment.