GithubHelp home page GithubHelp logo

weno-of / wenoext Goto Github PK

View Code? Open in Web Editor NEW
118.0 13.0 63.0 24.88 MB

Weighted essentially non-oscillatory library for the framework of OpenFOAM

License: GNU General Public License v3.0

Shell 0.05% C 1.99% C++ 97.84% Python 0.05% CSS 0.01% HTML 0.01% CMake 0.06% Makefile 0.01%
openfoam weno-schemes

wenoext's Introduction

OpenFOAM Org OpenFOAM ESI DOI

WENO framework

Weighted essentially non-oscillatory library for the framework of OpenFOAM. Detailed information about the theoretical background and the implementation can be found in:

A quick overview of the WENO scheme is provided in this presentation:

Please also check out the Discussion board of GitHub for more information about features or if you want to post a new idea.

Versions:

Major development stages of the library are marked by tags and recently also have a release with a DOI.

Supported OpenFOAM Versions:

  • OpenFOAM (ORG) v5.x - 8
  • OpenFOAM (ESI) v1912-v2012

Authors

When using this work please cite:

J. W. Gärtner, A. Kronenburg, and T. Martin, “SoftwareX Efficient WENO library for OpenFOAM”, SoftwareX, vol. 12, p. 100611, 2020, doi: 10.1016/j.softx.2020.100611.

T. Martin, and I. Shevchuk, “SoftwareX Efficient WENO library for OpenFOAM,” Computation, vol. 6(6), 2018, doi: 10.3390/computation6010006.

Installation

  1. Clone the directory with git clone https://github.com/WENO-OF/WENOEXT.git

  2. Execute Allwmake to build the library The compilation of the library uses cmake instead of wmake files!

Options

Parallel compilation can be activated with: ./Allwmake -j <# of cores> if the number of cores is omitted, it is determined automatically.

On the master branch only clean git commits can be compiled. If a dirty git state shall be compiled the -f|--force option has to be used on the master branch.

CMake Options

Several options can be set over CMake commands with,

./Allwmake -D<CMAKE_OPTION>
Cmake Command Options Description
MARCH_NATIVE ON/OFF Activates march=native flag. Default ON
Use this flag if you get an "illegal instruction error" during execution.
USE_LAPACK ON/OFF Use LAPACK library for matrix operations such as eigen values
If switched on, check with the WENO-PerformanceTests if the performance improves or decreases.
USE_FMA ON/OFF Use std::fma for WENO math functions. Default ON
CMAKE_BUILD_TYPE Release/Debug/None When the debug option is selected the OpenFOAM FULLDEBUG flag is activated

Commands not listed in the table are forwarded to cmake, allowing to use all standard CMake commands.

Note to GNU compiler:

GNU compiler version must be higher than 7. For g++ < v7 an error is reported for the specialisation template syntax. The syntax in the code is according to C++11 standard which is available for g++ v7 and higher.

Usage

To use the WENO scheme you have to add the library to your controlDict by editing system/controlDict

libs("libWENOEXT.so")

Within your system/fvSchemes file,

divSchemes
{
    div(phi,U) 	Gauss WENOUpwindFit 2 1;
}

Here the first index '2' represents the order of the WENO scheme and the second index can be either '1' for bounded or '0' for unbounded.

Further options can be set in the WENODict located in the 'system/' folder:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      WENODict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
// This dict contains expert parameters, which modify the standard WENO scheme.

    //- Stencil extension ratio:
    //  - < 2.5 :   decreased computational effort. May also decrease stability
    //              and accuracy
    //  - > 2.5 :   higher stability. May influence the accuracy of the SVD
    extendRatio     2.5;

    //- WENO stencil weighting parameters:
    p               4.0;
    dm              1000.0;

    //- Calculate best conditioned matrix
    //  This can save memory especially for high order WENO scheme
    //  Increases the calculation time! Default is off
    bestConditioned true;
    
    writeData       true; // Write out the collected stencil list and matrix data
                          // default is 'true' 

    maxCondition    1E-05;// Inverse of the maximum condition that the pseudo 
                          // inverse can have. Only change if you know what you
                          // are doing!

    checkCondition  false;// Check the condition of the pseudo inverse matrix
                          // If the central stencil has at least one zero entry
                          // the matrix is removed for all stencils of this cell.
// ************************************************************************* /

Specialized Version for Scalar Transport

The limited WENOUpwindFit scheme uses a cell limited approach known from other schemes such as linearUpwind. For scalar transport in the range 0 to 1 a specialized scheme called WENOUpwindFit01 is available. This schemes limits the value using the limiter of Zhang and Shu.

Tutorials

The code contains two tutorials from the standard cavity test. To run the tutorials execute ./Allrun in the tutorial/ directory.

Tests

Testing is performed with the CATCH2 framework. You can compile and execute the tests by executing ./runTest in the test directory. Further instructions are found in here

Contineous Integration

To check the code for different OpenFOAM implementations, e.g. OpenFOAM 8, OpenFOAM v1912, etc. the code is copied into different docker containers created with the Dockerfiles in CI/. In the docker container the code is compiled and unit tests executed.

Executing the tests is controlled over the Makefile in the root directory. The different OpenFOAM versions can be tested with

# Just executing make runs all tests
make

# For OpenFOAM v5.x
make runTestsOF5

# For OpenFOAM 8
make runTestsOF8

This implementation allows to have the same testing on the local and remote branch.

License

This OpenFOAM library is under the GNU General Public License. This library contains the Blaze library licensed under the BSD license. Redistribution and use of the Blaze source code with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the names of the Blaze development group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

wenoext's People

Contributors

fracturist avatar jangaertner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wenoext's Issues

Does WENOEXT work on 1d advection test case?

Hi there,

I am trying to test the package by trying it on a 1D test case running with scalarTransportFoam. When using the package directly by replacing the divScheme for div(phi, T) to "Gauss WENOUpwindFit 4 0", or with any other order number, the result is extremely diffusively, behaving like a basic upwind scheme.

After checking the constant/WENOBase* folder, particularly the file "StencilIDs", I realize that for most elements in the file, it is empty,
image

whereas for your tutorials, it looks like this.
image

Therefore, I am wondering if there is some limit/check in the implementation that prevents the scheme from working on 1D cases, therefore it simply behaves as an upwind scheme (as in no explicit correction is applied)?

Thank you very much and looking forward to hearing your replies!

Best wishes,
Sen

Compiling error with OpenFOAM 6

Hello,

I am trying to compile WENOEXT on a docker container where OpenFOAM 6 is installed. I run into the following error.

/home/openfoam/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.C: In function 'Foam::autoPtr<Foam::fvMesh> Foam::reconstructRegionalMesh::reconstruct(const labelList&, const labelList&, const Foam::fvMesh&)':
/home/openfoam/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.C:102:13: error: no matching function for call to 'Foam::fvMesh::fvMesh(Foam::IOobject, Foam::pointField, Foam::faceList, Foam::labelList, Foam::labelList)'
             )
             ^
In file included from /opt/openfoam6/src/finiteVolume/lnInclude/volMesh.H:42:0,
                 from /opt/openfoam6/src/finiteVolume/lnInclude/volFields.H:38,
                 from /opt/openfoam6/src/dynamicMesh/lnInclude/fvMeshAdderTemplates.C:26,
                 from /opt/openfoam6/src/dynamicMesh/lnInclude/fvMeshAdder.H:168,
                 from /home/openfoam/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.H:43,
                 from /home/openfoam/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.C:30:

Other info

OpenFOAM-6(715) g++ --version
g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

OpenFOAM-6(716) cmake --version
cmake version 3.10.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Please see log file attached. Any help is most welcome.

===========================================================================
       ██╗    ██╗███████╗███╗   ██╗ ██████╗     ███████╗██╗  ██╗████████╗  
       ██║    ██║██╔════╝████╗  ██║██╔═══██╗    ██╔════╝╚██╗██╔╝╚══██╔══╝  
       ██║ █╗ ██║█████╗  ██╔██╗ ██║██║   ██║    █████╗   ╚███╔╝    ██║     
       ██║███╗██║██╔══╝  ██║╚██╗██║██║   ██║    ██╔══╝   ██╔██╗    ██║     
       ╚███╔███╔╝███████╗██║ ╚████║╚██████╔╝    ███████╗██╔╝ ██╗   ██║     
        ╚══╝╚══╝ ╚══════╝╚═╝  ╚═══╝ ╚═════╝     ╚══════╝╚═╝  ╚═╝   ╚═╝     
===========================================================================
                                                                           
License                                                                    
   This file is part of WENOExt.                                           
                                                                           
   WENOExt is free software: you can redistribute it and/or modify         
   it under the terms of the GNU General Public License as published by    
   the Free Software Foundation, either version 3 of the License, or       
   (at your option) any later version.                                     
                                                                           
   WENOExt is distributed in the hope that it will be useful, but          
   WITHOUT ANY WARRANTY; without even the implied warranty of              
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                    
   See the GNU General Public License for more details.                    
                                                                           
   You should have received a copy of the GNU General Public License       
   along with  WENOExt.  If not, see <http://www.gnu.org/licenses/>.       
===========================================================================
                                                                           
Build with these options:                                                  
Parallel:        YES                                               
Number of cores: 4                                              
                                                                           
===========================================================================
                        Start CMake Process                                
===========================================================================
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done

-------------------------------------------------------------------
	Generate WENO code rules for OpenFOAM version 6
-------------------------------------------------------------------
OF_VERSION: 6

-------------------------------------------------------------------
	Set blaze cache size
-------------------------------------------------------------------
Cache size is automatically set if not provided by the user with
	cmake ../ -DBLAZE_CACHE_SIZE=<Cache Size>
Automatic Cache Size Configuration
CMake Warning at blaze-3.8/CMakeLists.txt:75 (message):
  Cache size not found automatically.  Using default value as cache size.


Configuring Cache Size : 3145728UL
-------------------------------------------------------------------

-------------------------------------------------------------------
	Build State
-------------------------------------------------------------------
Built state is: unspecified
Building tests
This can be deactivated by using CMAKE_BUILD_TYPE=Release
-------------------------------------------------------------------

-- Configuring done
-- Generating done
-- Build files have been written to: /home/openfoam/WENOEXT/build
Scanning dependencies of target KDTree
[  1%] Building CXX object tests/src/KDTree/CMakeFiles/KDTree.dir/KDTree.cpp.o
[  2%] Linking CXX static library libKDTree.a
[  2%] Built target KDTree
Scanning dependencies of target vtkWriter
[  3%] Building CXX object tests/src/vtkWriter/CMakeFiles/vtkWriter.dir/vtkWriter.C.o
Scanning dependencies of target Catch2
[  4%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_automake.cpp.o
[  5%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_combined_tu.cpp.o
[  6%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_compact.cpp.o
[  7%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_console.cpp.o
[  8%] Linking CXX static library libvtkWriter.a
[  8%] Built target vtkWriter
[  9%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_cumulative_base.cpp.o
[ 10%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_junit.cpp.o
[ 11%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_multi.cpp.o
[ 12%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_sonarqube.cpp.o
[ 13%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_streaming_base.cpp.o
[ 14%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_tap.cpp.o
[ 15%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_teamcity.cpp.o
[ 16%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_xml.cpp.o
[ 17%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_approx.cpp.o
[ 18%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_assertion_handler.cpp.o
[ 19%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_assertion_result.cpp.o
[ 20%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/matchers/internal/catch_matchers_combined_tu.cpp.o
[ 21%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o
[ 22%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_commandline.cpp.o
[ 23%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_source_line_info.cpp.o
[ 24%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_config.cpp.o
[ 25%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_case_insensitive_comparisons.cpp.o
[ 26%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_console_colour.cpp.o
[ 27%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_context.cpp.o
[ 28%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_debug_console.cpp.o
[ 29%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_debugger.cpp.o
[ 30%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_enforce.cpp.o
[ 31%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_enum_values_registry.cpp.o
[ 32%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_exception_translator_registry.cpp.o
[ 33%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_fatal_condition_handler.cpp.o
[ 34%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_floating_point_helpers.cpp.o
[ 35%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/generators/internal/catch_generators_combined_tu.cpp.o
[ 36%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/interfaces/catch_interfaces_combined_tu.cpp.o
[ 37%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/interfaces/catch_interfaces_reporter.cpp.o
[ 38%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_list.cpp.o
[ 39%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_floating_point.cpp.o
[ 40%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_string.cpp.o
[ 41%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_templated.cpp.o
[ 42%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_message.cpp.o
[ 43%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_output_redirect.cpp.o
[ 44%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_registry_hub.cpp.o
[ 45%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_combined_tu.cpp.o
[ 46%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_random_number_generator.cpp.o
[ 47%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_random_seed_generation.cpp.o
[ 48%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_reporter_registry.cpp.o
[ 49%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_result_type.cpp.o
[ 50%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_run_context.cpp.o
[ 51%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_section.cpp.o
[ 52%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_session.cpp.o
[ 53%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_singletons.cpp.o
[ 54%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_stream.cpp.o
[ 55%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_stringref.cpp.o
[ 56%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_string_manip.cpp.o
[ 57%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_tag_alias_registry.cpp.o
[ 58%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_test_case_info.cpp.o
[ 59%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_test_case_registry_impl.cpp.o
[ 60%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_test_case_tracker.cpp.o
[ 61%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_test_registry.cpp.o
[ 62%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_textflow.cpp.o
[ 63%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_test_spec.cpp.o
[ 64%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_test_spec_parser.cpp.o
[ 65%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_timer.cpp.o
[ 66%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_tostring.cpp.o
[ 67%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_totals.cpp.o
[ 68%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/catch_version.cpp.o
[ 69%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_wildcard_pattern.cpp.o
Scanning dependencies of target WENOEXT
[ 70%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_xmlwriter.cpp.o
[ 71%] Building CXX object libWENOEXT/CMakeFiles/WENOEXT.dir/BlazeIO/BlazeIO.C.o
[ 72%] Building CXX object libWENOEXT/CMakeFiles/WENOEXT.dir/WENOBase/geometryWENO/geometryWENO.C.o
[ 73%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/benchmark/internal/catch_benchmark_combined_tu.cpp.o
[ 74%] Building CXX object libWENOEXT/CMakeFiles/WENOEXT.dir/WENOBase/WENOBase.C.o
[ 75%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/benchmark/detail/catch_stats.cpp.o
[ 76%] Linking CXX static library libCatch2.a
[ 76%] Built target Catch2
[ 77%] Building CXX object libWENOEXT/CMakeFiles/WENOEXT.dir/WENOBase/globalfvMesh.C.o
Scanning dependencies of target Catch2WithMain
[ 78%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2WithMain.dir/catch2/internal/catch_main.cpp.o
[ 79%] Building CXX object libWENOEXT/CMakeFiles/WENOEXT.dir/WENOBase/matrixDB.C.o
In file included from /home/openfoam/WENOEXT/libWENOEXT/WENOBase/geometryWENO/mathFunctionsWENO.H:40:0,
                 from /home/openfoam/WENOEXT/libWENOEXT/WENOBase/geometryWENO/geometryWENO.C:32:
/home/openfoam/WENOEXT/libWENOEXT/WENOBase/geometryWENO/realEigenValues.H: In member function 'void Foam::mathFunctionsWENO::realEigenValues::hqr()':
/home/openfoam/WENOEXT/libWENOEXT/WENOBase/geometryWENO/realEigenValues.H:338:34: warning: 'q' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if ((s=sign(std::sqrt(p*p+q*q+r*r),p)) != 0.0) 
                                 ~^~
/home/openfoam/WENOEXT/libWENOEXT/WENOBase/geometryWENO/realEigenValues.H:338:38: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if ((s=sign(std::sqrt(p*p+q*q+r*r),p)) != 0.0) 
                                     ~^~
[ 80%] Linking CXX static library libCatch2Main.a
[ 80%] Built target Catch2WithMain
[ 81%] Building CXX object libWENOEXT/CMakeFiles/WENOEXT.dir/WENOBase/reconstructRegionalMesh.C.o
[ 82%] Building CXX object libWENOEXT/CMakeFiles/WENOEXT.dir/WENOUpwindFit/makeWENOUpwindFit.C.o
/home/openfoam/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.C: In function 'Foam::autoPtr<Foam::fvMesh> Foam::reconstructRegionalMesh::reconstruct(const labelList&, const labelList&, const Foam::fvMesh&)':
/home/openfoam/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.C:102:13: error: no matching function for call to 'Foam::fvMesh::fvMesh(Foam::IOobject, Foam::pointField, Foam::faceList, Foam::labelList, Foam::labelList)'
             )
             ^
In file included from /opt/openfoam6/src/finiteVolume/lnInclude/volMesh.H:42:0,
                 from /opt/openfoam6/src/finiteVolume/lnInclude/volFields.H:38,
                 from /opt/openfoam6/src/dynamicMesh/lnInclude/fvMeshAdderTemplates.C:26,
                 from /opt/openfoam6/src/dynamicMesh/lnInclude/fvMeshAdder.H:168,
                 from /home/openfoam/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.H:43,
                 from /home/openfoam/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.C:30:
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:211:9: note: candidate: Foam::fvMesh::fvMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const Foam::Xfer<Foam::List<Foam::face> >&, const Foam::Xfer<Foam::List<Foam::cell> >&, bool)
         fvMesh
         ^~~~~~
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:211:9: note:   no known conversion for argument 2 from 'Foam::pointField {aka Foam::Field<Foam::Vector<double> >}' to 'const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&'
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:199:9: note: candidate: Foam::fvMesh::fvMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const Foam::Xfer<Foam::List<Foam::face> >&, const Foam::Xfer<Foam::List<int> >&, const Foam::Xfer<Foam::List<int> >&, bool)
         fvMesh
         ^~~~~~
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:199:9: note:   no known conversion for argument 2 from 'Foam::pointField {aka Foam::Field<Foam::Vector<double> >}' to 'const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&'
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:184:9: note: candidate: Foam::fvMesh::fvMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const cellShapeList&, const faceListList&, const wordList&, const Foam::PtrList<Foam::dictionary>&, const Foam::word&, const Foam::word&, bool)
         fvMesh
         ^~~~~~
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:184:9: note:   candidate expects 9 arguments, 5 provided
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:181:18: note: candidate: Foam::fvMesh::fvMesh(const Foam::IOobject&)
         explicit fvMesh(const IOobject& io);
                  ^~~~~~
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:181:18: note:   candidate expects 1 argument, 5 provided
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:160:9: note: candidate: Foam::fvMesh::fvMesh(const Foam::fvMesh&)
         fvMesh(const fvMesh&);
         ^~~~~~
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:160:9: note:   candidate expects 1 argument, 5 provided
/home/openfoam/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.C:134:9: error: no matching function for call to 'Foam::fvMesh::fvMesh(Foam::IOobject, std::remove_reference<Foam::Field<Foam::Vector<double> >&>::type, std::remove_reference<Foam::List<Foam::face>&>::type, std::remove_reference<Foam::List<int>&>::type, std::remove_reference<Foam::List<int>&>::type, bool)'
         );
         ^
In file included from /opt/openfoam6/src/finiteVolume/lnInclude/volMesh.H:42:0,
                 from /opt/openfoam6/src/finiteVolume/lnInclude/volFields.H:38,
                 from /opt/openfoam6/src/dynamicMesh/lnInclude/fvMeshAdderTemplates.C:26,
                 from /opt/openfoam6/src/dynamicMesh/lnInclude/fvMeshAdder.H:168,
                 from /home/openfoam/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.H:43,
                 from /home/openfoam/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.C:30:
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:211:9: note: candidate: Foam::fvMesh::fvMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const Foam::Xfer<Foam::List<Foam::face> >&, const Foam::Xfer<Foam::List<Foam::cell> >&, bool)
         fvMesh
         ^~~~~~
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:211:9: note:   candidate expects 5 arguments, 6 provided
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:199:9: note: candidate: Foam::fvMesh::fvMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const Foam::Xfer<Foam::List<Foam::face> >&, const Foam::Xfer<Foam::List<int> >&, const Foam::Xfer<Foam::List<int> >&, bool)
         fvMesh
         ^~~~~~
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:199:9: note:   no known conversion for argument 2 from 'std::remove_reference<Foam::Field<Foam::Vector<double> >&>::type {aka Foam::Field<Foam::Vector<double> >}' to 'const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&'
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:184:9: note: candidate: Foam::fvMesh::fvMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const cellShapeList&, const faceListList&, const wordList&, const Foam::PtrList<Foam::dictionary>&, const Foam::word&, const Foam::word&, bool)
         fvMesh
         ^~~~~~
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:184:9: note:   candidate expects 9 arguments, 6 provided
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:181:18: note: candidate: Foam::fvMesh::fvMesh(const Foam::IOobject&)
         explicit fvMesh(const IOobject& io);
                  ^~~~~~
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:181:18: note:   candidate expects 1 argument, 6 provided
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:160:9: note: candidate: Foam::fvMesh::fvMesh(const Foam::fvMesh&)
         fvMesh(const fvMesh&);
         ^~~~~~
/opt/openfoam6/src/finiteVolume/lnInclude/fvMesh.H:160:9: note:   candidate expects 1 argument, 6 provided
libWENOEXT/CMakeFiles/WENOEXT.dir/build.make:182: recipe for target 'libWENOEXT/CMakeFiles/WENOEXT.dir/WENOBase/reconstructRegionalMesh.C.o' failed
make[2]: *** [libWENOEXT/CMakeFiles/WENOEXT.dir/WENOBase/reconstructRegionalMesh.C.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/openfoam/WENOEXT/libWENOEXT/WENOBase/matrixDB.C: In member function 'Foam::matrixDB::iterType Foam::matrixDB::similar(const scalarRectangularMatrix&&)':
/home/openfoam/WENOEXT/libWENOEXT/WENOBase/matrixDB.C:120:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (blaze::size(cmpA) == A.size())
             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
CMakeFiles/Makefile2:103: recipe for target 'libWENOEXT/CMakeFiles/WENOEXT.dir/all' failed
make[1]: *** [libWENOEXT/CMakeFiles/WENOEXT.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Edit: pasted contents of log file

Add Continous Integration

With GitHub Actions a workflow can be added that compiles and runs a test case for commits or merges. For this a custom runner with OpenFOAM installed is required.

For CI on GitLab I already have a docker container with OpenFOAM installed on ubuntu 18.04. On this runner we then can compile and test the application within a clean environment.

Invalid cells and stencils using Version 4.1

Discussed in #46

Originally posted by Fracturist June 29, 2022
Hello,

I have recently noticed appearance of extra invalid cells and stencils in my own test case when using Version 4.1.

image

Then I checked the log file stored previously for same case using Version 4.0. It seems that everything is fine.

image2

So I did a rerun for tutorial case using Version 4.1. Serial Cavity case is OK but parallel Cavity case showed an extra invalid cell. Moreover, all cells in Wedge case seem invalid. I am pretty sure that these case was fine with Version 4.0.

Selection_004

The log fie for tutorial cases is here
log.txt

Can someone give me a hint as to how these happened? Is it due to my compilation or some feature related to new version?

compile errors for OpenFOAM-v2012

There were errors when I compiled the library for OpenFOAM-v2012. Is the library compatible with OpenFOAM-v2012?
No errors for OpenFOAM-v2006.

Environment:
System: Ubuntu-20.04
gcc: 9.4.0
OpenFOAM: ESI, v2012

sy@sy-hpc:~/OpenFOAM/sy-v2012/WENOEXT$ g++ --version
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

sy@sy-hpc:~/OpenFOAM/sy-v2012/WENOEXT$ ls
Allwclean  Allwmake  bashrc  blaze-3.8  CONTRIBUTORS  documentation  foamVersionThisIsCompiledFor  libWENOEXT  LICENSE  README.md  tests  tutorials  versionRules
sy@sy-hpc:~/OpenFOAM/sy-v2012/WENOEXT$ ./Allwmake 
Current OpenFOAM version is v2012.
Previously compiled for OpenFOAM (v2012)
OpenFOAM-version: Major 2012 Minor 0 Patch 0 (-1 == x / 0) Fork: com
No change to versionRules/foamVersion4weno.H

Please include the output above when reporting a problem in the compilation. It helps diagnosing the problem    

wmake libso libWENOEXT
g++ -std=c++11 -m64 -pthread -DOPENFOAM=2012 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas  -O3  -DNoRepository -ftemplate-depth-100 -Wno-deprecated -I/home/sy/OpenFOAM/OpenFOAM-v2012/src/dynamicMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-v2012/src/triSurface/lnInclude  -I/home/sy/OpenFOAM/OpenFOAM-v2012/src/finiteVolume/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-v2012/src/meshTools/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-v2012/src/surfMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-v2012/src/fileFormats/lnInclude -DGIT_BUILD=\"2.1\" -std=c++14 -I../versionRules -I../blaze-3.8 -iquote. -IlnInclude -I/home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-v2012/src/OSspecific/POSIX/lnInclude   -fPIC -c WENOBase/WENOBase.C -o Make/linux64GccDPInt32Opt/WENOBase/WENOBase.o
WENOBase/WENOBase.C: In member function ‘Foam::scalarRectangularMatrix Foam::WENOBase::calcMatrix(const Foam::fvMesh&, const Foam::fvMesh&, Foam::label, Foam::label)’:
WENOBase/WENOBase.C:520:38: error: use of deleted function ‘void Foam::autoPtr<T>::operator=(const Foam::autoPtr<T>&) [with T = Foam::SVD]’
  520 |                     svdBestCondPtr = svdCurrPtr;
      |                                      ^~~~~~~~~~
In file included from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:43,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/token.H:52,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/Istream.H:50,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/ISstream.H:42,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/IOstreams.H:41,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/VectorSpace.C:29,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/VectorSpace.H:279,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/Vector.H:48,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/vector.H:42,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/fieldTypes.H:37,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/finiteVolume/lnInclude/volFieldsFwd.H:41,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:41,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/finiteVolume/lnInclude/linear.H:43,
                 from WENOBase/WENOBase.H:42,
                 from WENOBase/WENOBase.C:31:
/home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/autoPtr.H:265:14: note: declared here
  265 |         void operator=(const autoPtr<T>& ap) = delete;
      |              ^~~~~~~~
WENOBase/WENOBase.C:525:34: error: use of deleted function ‘void Foam::autoPtr<T>::operator=(const Foam::autoPtr<T>&) [with T = Foam::SVD]’
  525 |                 svdBestCondPtr = svdCurrPtr;
      |                                  ^~~~~~~~~~
In file included from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:43,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/token.H:52,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/Istream.H:50,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/ISstream.H:42,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/IOstreams.H:41,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/VectorSpace.C:29,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/VectorSpace.H:279,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/Vector.H:48,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/vector.H:42,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/fieldTypes.H:37,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/finiteVolume/lnInclude/volFieldsFwd.H:41,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:41,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/finiteVolume/lnInclude/linear.H:43,
                 from WENOBase/WENOBase.H:42,
                 from WENOBase/WENOBase.C:31:
/home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/autoPtr.H:265:14: note: declared here
  265 |         void operator=(const autoPtr<T>& ap) = delete;
      |              ^~~~~~~~
WENOBase/WENOBase.C:533:22: error: use of deleted function ‘void Foam::autoPtr<T>::operator=(const Foam::autoPtr<T>&) [with T = Foam::SVD]’
  533 |         svdCurrPtr = svdBestCondPtr;
      |                      ^~~~~~~~~~~~~~
In file included from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:43,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/token.H:52,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/Istream.H:50,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/ISstream.H:42,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/IOstreams.H:41,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/VectorSpace.C:29,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/VectorSpace.H:279,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/Vector.H:48,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/vector.H:42,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/fieldTypes.H:37,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/finiteVolume/lnInclude/volFieldsFwd.H:41,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:41,
                 from /home/sy/OpenFOAM/OpenFOAM-v2012/src/finiteVolume/lnInclude/linear.H:43,
                 from WENOBase/WENOBase.H:42,
                 from WENOBase/WENOBase.C:31:
/home/sy/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/autoPtr.H:265:14: note: declared here
  265 |         void operator=(const autoPtr<T>& ap) = delete;
      |              ^~~~~~~~
make: *** [/home/sy/OpenFOAM/OpenFOAM-v2012/wmake/rules/General/transform:35: Make/linux64GccDPInt32Opt/WENOBase/WENOBase.o] Error 1

Compile errors

Platform: OpenFOAM 5.x/v1912
g++/gcc version: 7.5

I found the following errors in compiling the code:

Current OpenFOAM version is 5.x.
This is a clean install
OpenFOAM-version: Major 5 Minor 0 Patch 0 (-1 == x / 0) Fork: org
No versionRules/foamVersion4weno.H. Generating!

Please include the output above when reporting a problem in the compilation. It helps diagnosing the problem    

wmake libso libWENOEXT
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file makeWENOCentredFit.C
Making dependency list for source file makeWENOHybrid.C
Making dependency list for source file makeWENOUpwindFit.C
Making dependency list for source file reconstructRegionalMesh.C
Making dependency list for source file matrixDB.C
Making dependency list for source file globalfvMesh.C
Making dependency list for source file WENOBase.C
Making dependency list for source file geometryWENO.C
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -Wno-deprecated -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/dynamicMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/triSurface/lnInclude  -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/meshTools/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/surfMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/fileFormats/lnInclude -DGIT_BUILD=\"2.1\" -std=c++14 -I../versionRules -I../blaze-3.8 -IlnInclude -I. -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OSspecific/POSIX/lnInclude   -fPIC -c WENOBase/geometryWENO/geometryWENO.C -o Make/linux64GccDPInt32Opt/WENOBase/geometryWENO/geometryWENO.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -Wno-deprecated -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/dynamicMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/triSurface/lnInclude  -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/meshTools/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/surfMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/fileFormats/lnInclude -DGIT_BUILD=\"2.1\" -std=c++14 -I../versionRules -I../blaze-3.8 -IlnInclude -I. -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OSspecific/POSIX/lnInclude   -fPIC -c WENOBase/WENOBase.C -o Make/linux64GccDPInt32Opt/WENOBase/WENOBase.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -Wno-deprecated -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/dynamicMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/triSurface/lnInclude  -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/meshTools/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/surfMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/fileFormats/lnInclude -DGIT_BUILD=\"2.1\" -std=c++14 -I../versionRules -I../blaze-3.8 -IlnInclude -I. -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OSspecific/POSIX/lnInclude   -fPIC -c WENOBase/globalfvMesh.C -o Make/linux64GccDPInt32Opt/WENOBase/globalfvMesh.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -Wno-deprecated -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/dynamicMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/triSurface/lnInclude  -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/meshTools/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/surfMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/fileFormats/lnInclude -DGIT_BUILD=\"2.1\" -std=c++14 -I../versionRules -I../blaze-3.8 -IlnInclude -I. -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OSspecific/POSIX/lnInclude   -fPIC -c WENOBase/matrixDB.C -o Make/linux64GccDPInt32Opt/WENOBase/matrixDB.o
WENOBase/matrixDB.C: In member function ‘std::multimap<int, blaze::DynamicMatrix<double> >::const_iterator Foam::matrixDB::similar(const scalarRectangularMatrix&&)’:
WENOBase/matrixDB.C:120:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (blaze::size(cmpA) == A.size())
             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -Wno-deprecated -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/dynamicMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/triSurface/lnInclude  -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/meshTools/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/surfMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/fileFormats/lnInclude -DGIT_BUILD=\"2.1\" -std=c++14 -I../versionRules -I../blaze-3.8 -IlnInclude -I. -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OSspecific/POSIX/lnInclude   -fPIC -c WENOBase/reconstructRegionalMesh.C -o Make/linux64GccDPInt32Opt/WENOBase/reconstructRegionalMesh.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -Wno-deprecated -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/dynamicMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/triSurface/lnInclude  -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/meshTools/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/surfMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/fileFormats/lnInclude -DGIT_BUILD=\"2.1\" -std=c++14 -I../versionRules -I../blaze-3.8 -IlnInclude -I. -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OSspecific/POSIX/lnInclude   -fPIC -c WENOUpwindFit/makeWENOUpwindFit.C -o Make/linux64GccDPInt32Opt/WENOUpwindFit/makeWENOUpwindFit.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -Wno-deprecated -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/dynamicMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/triSurface/lnInclude  -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/meshTools/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/surfMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/fileFormats/lnInclude -DGIT_BUILD=\"2.1\" -std=c++14 -I../versionRules -I../blaze-3.8 -IlnInclude -I. -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OSspecific/POSIX/lnInclude   -fPIC -c WENOHybrid/makeWENOHybrid.C -o Make/linux64GccDPInt32Opt/WENOHybrid/makeWENOHybrid.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -Wno-deprecated -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/dynamicMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/triSurface/lnInclude  -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/meshTools/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/surfMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/fileFormats/lnInclude -DGIT_BUILD=\"2.1\" -std=c++14 -I../versionRules -I../blaze-3.8 -IlnInclude -I. -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OSspecific/POSIX/lnInclude   -fPIC -c WENOCentredFit/makeWENOCentredFit.C -o Make/linux64GccDPInt32Opt/WENOCentredFit/makeWENOCentredFit.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -Wno-deprecated -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/dynamicMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/triSurface/lnInclude  -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/meshTools/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/surfMesh/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/fileFormats/lnInclude -DGIT_BUILD=\"2.1\" -std=c++14 -I../versionRules -I../blaze-3.8 -IlnInclude -I. -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude -I/home/sy/OpenFOAM/OpenFOAM-5.x/src/OSspecific/POSIX/lnInclude   -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/WENOBase/geometryWENO/geometryWENO.o Make/linux64GccDPInt32Opt/WENOBase/WENOBase.o Make/linux64GccDPInt32Opt/WENOBase/globalfvMesh.o Make/linux64GccDPInt32Opt/WENOBase/matrixDB.o Make/linux64GccDPInt32Opt/WENOBase/reconstructRegionalMesh.o Make/linux64GccDPInt32Opt/WENOUpwindFit/makeWENOUpwindFit.o Make/linux64GccDPInt32Opt/WENOHybrid/makeWENOHybrid.o Make/linux64GccDPInt32Opt/WENOCentredFit/makeWENOCentredFit.o -L/home/sy/OpenFOAM/OpenFOAM-5.x/platforms/linux64GccDPInt32Opt/lib \
    -ldynamicMesh -ltriSurface -lfiniteVolume -lmeshTools -lspecie -lsurfMesh -lfileFormats -lOpenFOAM  -o /home/sy/OpenFOAM/sy-5.x/platforms/linux64GccDPInt32Opt/lib/libWENOEXT.so
/usr/bin/ld: cannot find -ldynamicMesh
/usr/bin/ld: cannot find -ltriSurface
/usr/bin/ld: cannot find -lfiniteVolume
/usr/bin/ld: cannot find -lmeshTools
/usr/bin/ld: cannot find -lspecie
/usr/bin/ld: cannot find -lsurfMesh
/usr/bin/ld: cannot find -lfileFormats
/usr/bin/ld: cannot find -lOpenFOAM
collect2: error: ld returned 1 exit status
/home/sy/OpenFOAM/OpenFOAM-5.x/wmake/makefiles/general:167: recipe for target '/home/sy/OpenFOAM/sy-5.x/platforms/linux64GccDPInt32Opt/lib/libWENOEXT.so' failed
make: *** [/home/sy/OpenFOAM/sy-5.x/platforms/linux64GccDPInt32Opt/lib/libWENOEXT.so] Error 1

Why did my installation fail?


Build State

Built state is: unspecified
Building tests
This can be deactivated by using CMAKE_BUILD_TYPE=Release
CMake Error at tests/CMakeLists.txt:2 (add_subdirectory):
The source directory

/home/wen/Desktop/WENOEXT/tests/Catch2

does not contain a CMakeLists.txt file.


-- Configuring incomplete, errors occurred!
See also "/home/wen/Desktop/WENOEXT/build/CMakeFiles/CMakeOutput.log".

Parallisation

Problems arise at the boundary of processor patches within regions that require limiting of the WENO scheme. I assume this is due to the use of the halo cells and that maybe only the patch neighbour cells are available.

I have following proposal:

  • Make use of OpenFOAM parallisation handling by making intBasTrans_ within the WENOBase class a GeometricField. This has the GeometricField::Boundary class which can handle the processor boundaries correctly. In practice this field will then be
    GeometricField<WENOBase::volIntegralType,fvsPatchField,surfaceMesh>
    Updating the boundary could be done then with intBasTrans_.correctBoundaryConditions or directly with intBasTrans_.evaluate(). Accessing neighbour patch field values is then possible by accesing the boundary field and calling patchNeighbourField on a coupled fvPatch type.
  • Developing this feature is done in a parallelOF branch which will be merged into master after a review process.

It would be great if someone would be willing to help me check the code and to look over my changes. Especially to make sure that no new errors are introduced.

warning: comparison of integer expressions of different signedness:

Hello! When I am compiling on Ubuntu 20.04, I get a warning such that:

WENOBase/matrixDB.C:120:31: warning: comparison of integer expressions of different signedness: ‘std::size_t’ {aka ‘long unsigned int’} and ‘Foam::label’ {aka ‘int’} [-Wsign-compare]

What might be the reason? I think it might be safely ignored but I just wonder the reason, just out of curiosity.

Collated File I/O

When the collated file I/O of OpenFOAM is used the WENO scheme gets stuck when it reconstructs the global mesh. The reason for this is found in two locations of which one can be fixed.

Using File Handler for Boundary Patch Stream

The file handler is used to get the file stream for the boundary patch pointers. This causes a problem as the collated file handler will be applied causing the mpi to get stuck. This can be easily solved by using readHeader() first and then readList.

Constructing the PolyMesh

When the polyMesh is constructed each constructor calls Foam::polyMesh::readTetBasePtIs(). Within this function the Foam::IOobject::typeHeaderOk() function is called to check the file header which in return calls the general function typeFilePath() defined in IOObject. This calls the Foam::IOobject::localFilePath() which uses the file handler.

In the file handler the filePath() function is either implemented in Foam::fileOperations::masterUncollatedFileOperation::filePath() or Foam::fileOperations::uncollatedFileOperation::filePath(). If the collated file I/O option is chosen the masterUncollatedFileOperations path is chosen and within this function the masterOp<>() function is called which then causes the MPI to get stuck as a gatherList is called. The MPI gets stuck as not all processors are calling this function, caused by each processor reconstructing only a part of the mesh and not the global mesh.

Make in openfoam v9 error

Hi, WENOEXT,
Do you have a plan to update the WENOEXT to openfoam v9?

Now, there is a bug, below:

[ 54%] Building CXX object libWENOEXT/CMakeFiles/WENOEXT.dir/WENOUpwindFit/makeWENOUpwindFit.C.o
[ 55%] Building CXX object tests/Catch2/src/CMakeFiles/Catch2.dir/catch2/internal/catch_reporter_registry.cpp.o
/dssg/home/acct-medgm/medgm/projectUserDir-9/src/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.C: In function 'Foam::autoPtr<Foam::fvMesh> Foam::reconstructRegionalMesh::reconstruct(const labelList&, const labelList&, const Foam::fvMesh&)':
/dssg/home/acct-medgm/medgm/projectUserDir-9/src/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.C:172:13: error: no matching function for call to 'Foam::faceCoupleInfo::faceCoupleInfo(Foam::fvMesh&, Foam::fvMesh&, const scalar&, bool)'
             )
             ^
In file included from /opt/OpenFOAM/OpenFOAM-9/src/dynamicMesh/lnInclude/polyMeshAdder.H:44:0,
                 from /dssg/home/acct-medgm/medgm/projectUserDir-9/src/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.H:41,
                 from /dssg/home/acct-medgm/medgm/projectUserDir-9/src/WENOEXT/libWENOEXT/WENOBase/reconstructRegionalMesh.C:30:
/opt/OpenFOAM/OpenFOAM-9/src/dynamicMesh/lnInclude/faceCoupleInfo.H:132:9: note: candidate: Foam::faceCoupleInfo::faceCoupleInfo(const Foam::polyMesh&, const labelList&, const Foam::polyMesh&, const labelList&)
         faceCoupleInfo
         ^~~~~~~~~~~~~~
/opt/OpenFOAM/OpenFOAM-9/src/dynamicMesh/lnInclude/faceCoupleInfo.H:132:9: note:   no known conversion for argument 2 from 'Foam::fvMesh' to 'const labelList& {aka const Foam::List<int>&}'
/opt/OpenFOAM/OpenFOAM-9/src/dynamicMesh/lnInclude/faceCoupleInfo.H:55:7: note: candidate: Foam::faceCoupleInfo::faceCoupleInfo(const Foam::faceCoupleInfo&)
 class faceCoupleInfo
       ^~~~~~~~~~~~~~
/opt/OpenFOAM/OpenFOAM-9/src/dynamicMesh/lnInclude/faceCoupleInfo.H:55:7: note:   candidate expects 1 argument, 4 provided
libWENOEXT/CMakeFiles/WENOEXT.dir/build.make:182: recipe for target 'libWENOEXT/CMakeFiles/WENOEXT.dir/WENOBase/reconstructRegionalMesh.C.o' failed
make[2]: *** [libWENOEXT/CMakeFiles/WENOEXT.dir/WENOBase/reconstructRegionalMesh.C.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Installation problem in OpenFOAM-v2006

Hello, I have a problem with the installation of WENOEXT with OpenFOAM-v2006.

Operating system/version: Cray XC50 SUSE Linux Enterprise Server 12 SP3 (x86_64)

Attached file is detailed installation log and Allwmake, because I rewrote the Allwmake in order to detect cmake binary and try to fix the error.

inst_log.txt
Allwmake.txt

The following is an example of an error message.

 Linking CXX executable writeWENOStats
/usr/bin/ld: cannot find -ldynamicMesh
/usr/bin/ld: cannot find -lfiniteVolume
/usr/bin/ld: cannot find -lmeshTools
/usr/bin/ld: cannot find -lspecie
/usr/bin/ld: cannot find -lsurfMesh
/usr/bin/ld: cannot find -lfileFormats
/usr/bin/ld: cannot find -lOpenFOAM
collect2: error: ld returned 1 exit status
utilities/writeWENOStats/CMakeFiles/writeWENOStats.dir/build.make:97: recipe for target 'utilities/writeWENOStats/writeWENOStats' failed

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.