Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
loumalouomega committed May 7, 2024
1 parent 4bcc373 commit cecfd56
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 81 deletions.
50 changes: 0 additions & 50 deletions kratos/python/add_space_to_python.cpp

This file was deleted.

27 changes: 0 additions & 27 deletions kratos/python/add_space_to_python.h

This file was deleted.

9 changes: 8 additions & 1 deletion kratos/python/add_strategies_to_python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,16 @@ namespace Kratos:: Python

auto sparse_space_binder = CreateSpaceInterface< SparseSpaceType >(m,"UblasSparseSpace");
sparse_space_binder.def("TwoNorm", TwoNorm);
//the dot product of two vectors
// The dot product of two vectors
sparse_space_binder.def("Dot", Dot);
sparse_space_binder.def("TransposeMult", TransposeMult);
// Size functions
sparse_space_binder.def("Size", &SparseSpaceType::Size);
sparse_space_binder.def("Size1", &SparseSpaceType::Size1);
sparse_space_binder.def("Size2", &SparseSpaceType::Size2);
// Information functions
sparse_space_binder.def("IsDistributed", &SparseSpaceType::IsDistributed);
sparse_space_binder.def("FastestDirectSolverList", &SparseSpaceType::FastestDirectSolverList);

auto cplx_sparse_space_binder = CreateSpaceInterface< ComplexSparseSpaceType >(m,"UblasComplexSparseSpace");

Expand Down
2 changes: 0 additions & 2 deletions kratos/python/kratos_python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
#include "add_accessors_to_python.h"
#include "add_globals_to_python.h"
#include "add_geometry_data_to_python.h"
#include "add_space_to_python.h"

namespace Kratos::Python
{
Expand Down Expand Up @@ -157,7 +156,6 @@ PYBIND11_MODULE(Kratos, m)
AddRegistryToPython(m);
AddContainerExpressionToPython(m);
AddGlobalsToPython(m);
AddSpaceToPython(m);

m.def("Hello", Hello);
}
Expand Down
2 changes: 1 addition & 1 deletion kratos/python_scripts/python_linear_solver_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def CreateFastestAvailableDirectLinearSolver():
if kratos_utils.CheckIfApplicationsAvailable("LinearSolversApplication"):
from KratosMultiphysics import LinearSolversApplication

linear_solvers_by_speed = KM.SparseSpace.FastestDirectSolverList()
linear_solvers_by_speed = KM.UblasSparseSpace.FastestDirectSolverList()

for solver_name in linear_solvers_by_speed:
if KM.LinearSolverFactory().Has(solver_name):
Expand Down

0 comments on commit cecfd56

Please sign in to comment.