Merge pull request #1001 from ashkan2200/develop
Dealii, fixed issue with tests
This commit is contained in:
commit
27bc49d8c8
1 changed files with 36 additions and 27 deletions
|
@ -244,38 +244,47 @@ def install(self, spec, prefix):
|
||||||
print('========= Step-40 Trilinos ==========')
|
print('========= Step-40 Trilinos ==========')
|
||||||
print('=====================================')
|
print('=====================================')
|
||||||
# change Linear Algebra to Trilinos
|
# change Linear Algebra to Trilinos
|
||||||
filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)',
|
# The below filter_file should be different for versions
|
||||||
('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc')
|
# before and after 8.4.0
|
||||||
|
if spec.satisfies('@8.4.0:'):
|
||||||
|
filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)',
|
||||||
|
('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc')
|
||||||
|
else:
|
||||||
|
filter_file(r'(#define USE_PETSC_LA.*)',
|
||||||
|
('// #define USE_PETSC_LA'), 'step-40.cc')
|
||||||
if '^trilinos+hypre' in spec:
|
if '^trilinos+hypre' in spec:
|
||||||
make('release')
|
make('release')
|
||||||
make('run', parallel=False)
|
make('run', parallel=False)
|
||||||
|
|
||||||
print('=====================================')
|
# the rest of the tests on step 40 only works for
|
||||||
print('=== Step-40 Trilinos SuperluDist ====')
|
# dealii version 8.4.0 and after
|
||||||
print('=====================================')
|
if spec.satisfies('@8.4.0:'):
|
||||||
# change to direct solvers
|
print('=====================================')
|
||||||
filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # NOQA: ignore=E501
|
print('=== Step-40 Trilinos SuperluDist ====')
|
||||||
filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)',
|
print('=====================================')
|
||||||
(''), 'step-40.cc')
|
# change to direct solvers
|
||||||
filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)',
|
filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # NOQA: ignore=E501
|
||||||
(''), 'step-40.cc')
|
filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)',
|
||||||
filter_file(r'(preconditioner.initialize\(system_matrix, data\);)',
|
(''), 'step-40.cc')
|
||||||
(''), 'step-40.cc')
|
filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)',
|
||||||
filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # NOQA: ignore=E501
|
(''), 'step-40.cc')
|
||||||
filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
|
filter_file(r'(preconditioner.initialize\(system_matrix, data\);)',
|
||||||
if '^trilinos+superlu-dist' in spec:
|
(''), 'step-40.cc')
|
||||||
make('release')
|
filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # NOQA: ignore=E501
|
||||||
make('run', paralle=False)
|
filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
|
||||||
|
if '^trilinos+superlu-dist' in spec:
|
||||||
|
make('release')
|
||||||
|
make('run', paralle=False)
|
||||||
|
|
||||||
print('=====================================')
|
print('=====================================')
|
||||||
print('====== Step-40 Trilinos MUMPS =======')
|
print('====== Step-40 Trilinos MUMPS =======')
|
||||||
print('=====================================')
|
print('=====================================')
|
||||||
# switch to Mumps
|
# switch to Mumps
|
||||||
filter_file(r'(Amesos_Superludist)',
|
filter_file(r'(Amesos_Superludist)',
|
||||||
('Amesos_Mumps'), 'step-40.cc')
|
('Amesos_Mumps'), 'step-40.cc')
|
||||||
if '^trilinos+mumps' in spec:
|
if '^trilinos+mumps' in spec:
|
||||||
make('release')
|
make('release')
|
||||||
make('run', parallel=False)
|
make('run', parallel=False)
|
||||||
|
|
||||||
print('=====================================')
|
print('=====================================')
|
||||||
print('============ Step-36 ================')
|
print('============ Step-36 ================')
|
||||||
|
|
Loading…
Reference in a new issue