-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a first version of the parallel Grad-Div solver finished with u…
…nit tests This solver has similar unit test as the GLS solvers and can also work in transient TODO - Fix the linear algebra of the grad-div solver and make it more generic Begun a first version of a refactoring of the navier-stokes to remove redundancy,but this is not satisfactory at the moment. Having a mother class for all NS solvers is maybe not a good idea Re-indented the entire code
- Loading branch information
Showing
35 changed files
with
5,776 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Usually, you will not need to modify anything beyond this point... | ||
#Method of manufactured solution 2D | ||
|
||
# Set the name of the project and target: | ||
SET(TARGET "gdNS2d") | ||
|
||
INCLUDE_DIRECTORIES( | ||
lethe | ||
${CMAKE_SOURCE_DIR}/src/ | ||
) | ||
ADD_EXECUTABLE(gdNS2d gdNS2d.cc) | ||
DEAL_II_SETUP_TARGET(gdNS2d) | ||
TARGET_LINK_LIBRARIES(gdNS2d lethe) | ||
|
||
install(TARGETS gdNS2d RUNTIME DESTINATION bin) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#include <deal.II/base/convergence_table.h> | ||
|
||
#include "gdNS.h" | ||
|
||
int | ||
main(int argc, char *argv[]) | ||
{ | ||
try | ||
{ | ||
if (argc != 2) | ||
{ | ||
std::cout << "Usage:" << argv[0] << " input_file" << std::endl; | ||
std::exit(1); | ||
} | ||
Utilities::MPI::MPI_InitFinalize mpi_initialization( | ||
argc, argv, numbers::invalid_unsigned_int); | ||
|
||
ParameterHandler prm; | ||
NavierStokesSolverParameters<2> NSparam; | ||
NSparam.declare(prm); | ||
// Parsing of the file | ||
prm.parse_input(argv[1]); | ||
NSparam.parse(prm); | ||
|
||
GDNavierStokesSolver<2> problem_2d(NSparam, | ||
NSparam.femParameters.velocityOrder, | ||
NSparam.femParameters.pressureOrder); | ||
problem_2d.solve(); | ||
} | ||
catch (std::exception &exc) | ||
{ | ||
std::cerr << std::endl | ||
<< std::endl | ||
<< "----------------------------------------------------" | ||
<< std::endl; | ||
std::cerr << "Exception on processing: " << std::endl | ||
<< exc.what() << std::endl | ||
<< "Aborting!" << std::endl | ||
<< "----------------------------------------------------" | ||
<< std::endl; | ||
return 1; | ||
} | ||
catch (...) | ||
{ | ||
std::cerr << std::endl | ||
<< std::endl | ||
<< "----------------------------------------------------" | ||
<< std::endl; | ||
std::cerr << "Unknown exception!" << std::endl | ||
<< "Aborting!" << std::endl | ||
<< "----------------------------------------------------" | ||
<< std::endl; | ||
return 1; | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Usually, you will not need to modify anything beyond this point... | ||
#Method of manufactured solution 2D | ||
|
||
# Set the name of the project and target: | ||
SET(TARGET "gdNS3d") | ||
|
||
INCLUDE_DIRECTORIES( | ||
lethe | ||
${CMAKE_SOURCE_DIR}/src/ | ||
) | ||
|
||
ADD_EXECUTABLE(gdNS3d gdNS3d.cc) | ||
DEAL_II_SETUP_TARGET(gdNS3d) | ||
TARGET_LINK_LIBRARIES(gdNS3d lethe) | ||
|
||
install(TARGETS gdNS3d RUNTIME DESTINATION bin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#include "gdNS.h" | ||
|
||
int | ||
main(int argc, char *argv[]) | ||
{ | ||
try | ||
{ | ||
if (argc != 2) | ||
{ | ||
std::cout << "Usage:" << argv[0] << " input_file" << std::endl; | ||
std::exit(1); | ||
} | ||
Utilities::MPI::MPI_InitFinalize mpi_initialization( | ||
argc, argv, numbers::invalid_unsigned_int); | ||
|
||
ParameterHandler prm; | ||
NavierStokesSolverParameters<3> NSparam; | ||
NSparam.declare(prm); | ||
// Parsing of the file | ||
prm.parse_input(argv[1]); | ||
NSparam.parse(prm); | ||
|
||
GDNavierStokesSolver<3> problem_3d(NSparam, | ||
NSparam.femParameters.velocityOrder, | ||
NSparam.femParameters.pressureOrder); | ||
problem_3d.solve(); | ||
} | ||
catch (std::exception &exc) | ||
{ | ||
std::cerr << std::endl | ||
<< std::endl | ||
<< "----------------------------------------------------" | ||
<< std::endl; | ||
std::cerr << "Exception on processing: " << std::endl | ||
<< exc.what() << std::endl | ||
<< "Aborting!" << std::endl | ||
<< "----------------------------------------------------" | ||
<< std::endl; | ||
return 1; | ||
} | ||
catch (...) | ||
{ | ||
std::cerr << std::endl | ||
<< std::endl | ||
<< "----------------------------------------------------" | ||
<< std::endl; | ||
std::cerr << "Unknown exception!" << std::endl | ||
<< "Aborting!" << std::endl | ||
<< "----------------------------------------------------" | ||
<< std::endl; | ||
return 1; | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.