diff --git a/python/SConscript b/python/SConscript
index d730297..4081cad 100644
--- a/python/SConscript
+++ b/python/SConscript
@@ -1,68 +1,69 @@
# -*- mode:python; coding: utf-8 -*-
# vim: set ft=python:
# @file
# @section LICENSE
#
# Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
# Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
from __future__ import print_function
from os.path import abspath
from SCons.Script import Import, Split, Copy
Import('main_env')
# Pybind11 wrapper
env_pybind = main_env.Clone(SHLIBPREFIX='')
env_pybind.Tool(pybind11)
pybind_sources = Split("""
tamaas_module.cpp
wrap/core.cpp
wrap/percolation.cpp
wrap/surface.cpp
wrap/model.cpp
wrap/solvers.cpp
+wrap/compute.cpp
wrap/test_features.cpp
""")
if main_env['CXX'] != 'icpc':
pybind_sources += ["wrap/bem.cpp"]
env_pybind.AppendUnique(CPPDEFINES="LEGACY_BEM")
# Building the pybind library
tamaas_wrap = env_pybind.SharedLibrary(
target='tamaas/_tamaas',
source=pybind_sources,
LIBS=['Tamaas'],
RPATH=[abspath('../src')]
)
# For some reason link happens too early
Import('libTamaas')
env_pybind.Depends(tamaas_wrap, libTamaas)
# Copying the __init__.py file with extra python classes
copy_env = env_pybind.Clone(
PRINT_CMD_LINE_FUNC=main_env['gen_print']("Copying", "red", main_env))
copy_env.Command(Dir('tamaas'), Dir('#python/tamaas'), Copy("$TARGET", "$SOURCE"))
copy_env.Command('setup.py', '#python/setup.py', Copy("$TARGET", "$SOURCE"))
# Cleaning the tamaas python package
main_env.Execute(Delete('tamaas'))
diff --git a/python/tamaas/compute.py b/python/tamaas/compute.py
new file mode 100644
index 0000000..03b41ee
--- /dev/null
+++ b/python/tamaas/compute.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+# @file
+# @section LICENSE
+#
+# Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
+# Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+
+
+from ._tamaas.compute import * # noqa
diff --git a/python/tamaas_module.cpp b/python/tamaas_module.cpp
index f5c4f4b..1638db8 100644
--- a/python/tamaas_module.cpp
+++ b/python/tamaas_module.cpp
@@ -1,82 +1,83 @@
/**
* @file
* @section LICENSE
*
* Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
*/
/* -------------------------------------------------------------------------- */
#include "tamaas.hh"
#include "tamaas_info.hh"
#include "wrap.hh"
/* -------------------------------------------------------------------------- */
#include
/* -------------------------------------------------------------------------- */
namespace tamaas {
namespace py = pybind11;
/// Creating the tamaas python module
PYBIND11_MODULE(_tamaas, mod) {
mod.doc() = "Tamaas module for python";
// Wrapping the base methods
mod.def("initialize", &initialize, py::arg("num_threads") = 0,
"Initialize tamaas with desired number of threads");
mod.def("finalize", &finalize, "Final cleanup");
// Wrapping release information
auto info = py::class_(mod, "TamaasInfo");
#ifndef STRIP_INFO
info.attr("build_type") = TamaasInfo::build_type;
info.attr("branch") = TamaasInfo::branch;
info.attr("commit") = TamaasInfo::commit;
info.attr("diff") = TamaasInfo::diff;
info.attr("remotes") = TamaasInfo::remotes;
#else
info.attr("build_type") = "";
info.attr("branch") = "";
info.attr("commit") = "";
info.attr("diff") = "";
info.attr("remotes") = "";
#endif
// Wrapping tamaas components
wrap::wrapCore(mod);
wrap::wrapPercolation(mod);
wrap::wrapSurface(mod);
wrap::wrapModel(mod);
wrap::wrapSolvers(mod);
+ wrap::wrapCompute(mod);
/// Wrapping test features
wrap::wrapTestFeatures(mod);
// Legacy wrap
py::class_>(mod, "smart_pointer_UInt")
.def("assign", &wrap::smart_pointer::assign);
py::class_>(mod, "smart_pointer_Real")
.def("assign", &wrap::smart_pointer::assign);
py::class_>(mod, "smart_pointer_long")
.def("assign", &wrap::smart_pointer::assign);
#if defined(LEGACY_BEM)
wrap::wrapBEM(mod);
#endif
}
} // namespace tamaas
diff --git a/python/wrap.hh b/python/wrap.hh
index 2ca2cbc..35f63a1 100644
--- a/python/wrap.hh
+++ b/python/wrap.hh
@@ -1,73 +1,74 @@
/**
* @file
* @section LICENSE
*
* Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
*/
/* -------------------------------------------------------------------------- */
#ifndef __WRAP_HH__
#define __WRAP_HH__
/* -------------------------------------------------------------------------- */
#include "tamaas.hh"
#include "numpy.hh"
#include "cast.hh"
/* -------------------------------------------------------------------------- */
#include
/* -------------------------------------------------------------------------- */
namespace tamaas {
namespace wrap {
namespace py = pybind11;
/// For naming classes templated with dimension
inline std::string makeDimensionName(const std::string& name, UInt dim) {
std::stringstream str;
str << name << dim << "D";
return str.str();
}
template class smart_pointer {
public:
smart_pointer(T* ptr) : ptr(ptr) {}
void assign(T val) { *ptr = val; }
private:
T* ptr;
};
/* -------------------------------------------------------------------------- */
/* Prototypes for wrapping of tamaas components */
/* -------------------------------------------------------------------------- */
void wrapCore(py::module& mod);
void wrapPercolation(py::module& mod);
void wrapSurface(py::module& mod);
void wrapModel(py::module& mod);
void wrapSolvers(py::module& mod);
void wrapTestFeatures(py::module& mod);
+void wrapCompute(py::module& mod);
#if defined(LEGACY_BEM)
void wrapBEM(py::module& mod);
#endif
} // namespace wrap
} // namespace tamaas
#endif // __WRAP_HH__
diff --git a/src/core/eigenvalues.hh b/python/wrap/compute.cpp
similarity index 61%
rename from src/core/eigenvalues.hh
rename to python/wrap/compute.cpp
index fd464fc..6ff493c 100644
--- a/src/core/eigenvalues.hh
+++ b/python/wrap/compute.cpp
@@ -1,49 +1,46 @@
/**
* @file
* @section LICENSE
*
* Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
*/
/* -------------------------------------------------------------------------- */
-#ifndef EIGENVALUES_HH
-#define EIGENVALUES_HH
+#include "computes.hh"
+#include "wrap.hh"
/* -------------------------------------------------------------------------- */
-#include "eigenvalues.hh"
-#include "grid.hh"
-#include "loop.hh"
-#include "model_type.hh"
-#include "ranges.hh"
-#include "static_types.hh"
-#include
namespace tamaas {
+namespace wrap {
-/// Compute eigenvalues of a symmetric matrix field
-template
-void eigenvalues(Grid& eigs, const Grid& field) {
- Loop::loop([](auto eig, auto f) { eig = eigenvalues(f); },
- range>(eigs),
- range>(field));
-}
-
-void eigenvalues(model_type type, GridBase& eigs,
- const GridBase& field);
+using namespace py::literals;
+void wrapCompute(py::module& mod) {
+ auto compute_mod = mod.def_submodule("compute");
+ compute_mod.def(
+ "eigenvalues",
+ [](model_type type, Grid& eigs, const Grid& field) {
+ eigenvalues(type, eigs, field);
+ },
+ "model_type"_a, "eigenvalues_out"_a, "field"_a);
+ compute_mod.def("von_mises",
+ [](model_type type, Grid& vm,
+ const Grid& field) { vonMises(type, vm, field); },
+ "model_type"_a, "von_mises"_a, "field"_a);
+}
+} // namespace wrap
} // namespace tamaas
-
-#endif /* EIGENVALUES_HH */
diff --git a/python/wrap/test_features.cpp b/python/wrap/test_features.cpp
index 14510b8..c9cfdbe 100644
--- a/python/wrap/test_features.cpp
+++ b/python/wrap/test_features.cpp
@@ -1,120 +1,110 @@
/**
* @file
* @section LICENSE
*
* Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
*/
/* -------------------------------------------------------------------------- */
#include "boussinesq.hh"
-#include "eigenvalues.hh"
#include "isotropic_hardening.hh"
#include "kelvin.hh"
#include "mindlin.hh"
#include "model.hh"
#include "model_type.hh"
#include "volume_potential.hh"
#include "wrap.hh"
/* -------------------------------------------------------------------------- */
namespace tamaas {
namespace wrap {
using namespace py::literals;
template class KOp, model_type type,
UInt tensor_order>
void wrapKOp(const std::string& basename, py::module& mod) {
constexpr UInt dim = model_type_traits::dimension;
std::stringstream str;
str << basename << tensor_order;
py::class_>(mod, str.str().c_str())
.def(py::init())
.def("apply",
[](const KOp& engine, Grid& in,
Grid& out) { engine.apply(in, out); });
}
template
void wrapIsotropicHardening(py::module& mod) {
constexpr UInt dim = model_type_traits::dimension;
py::class_>(mod, "IsotropicHardening")
.def(py::init())
.def_property("h", &IsotropicHardening::getHardeningModulus,
&IsotropicHardening::setHardeningModulus)
.def_property("sigma_0", &IsotropicHardening::getYieldStress,
&IsotropicHardening::setYieldStress)
.def("computeStress",
[](IsotropicHardening& iso, Grid& stress,
const Grid& strain,
const Grid& strain_increment) {
iso.template computeStress(stress, strain,
strain_increment);
})
.def("computeStressUpdate",
[](IsotropicHardening& iso, Grid& stress,
const Grid& strain,
const Grid& strain_increment) {
iso.template computeStress(stress, strain, strain_increment);
})
.def("computePlasticIncrement",
[](IsotropicHardening& iso, Grid& stress,
const Grid& strain,
const Grid& strain_increment) {
iso.template computePlasticIncrement(stress, strain,
strain_increment);
})
.def("computePlasticIncrementUpdate",
[](IsotropicHardening& iso, Grid& stress,
const Grid& strain,
const Grid& strain_increment) {
iso.template computePlasticIncrement(stress, strain,
strain_increment);
});
// .def("getPlasticStrain", &IsotropicHardening::getPlasticStrain);
}
-void wrapEigenvalues(py::module& mod) {
- mod.def("eigenvalues",
- [](model_type type, Grid& eigs, const Grid& field) {
- eigenvalues(type, eigs, field);
- },
- "model_type"_a, "eigenvalues_out"_a, "field"_a);
-}
-
/// Wrap temporary features for testing
void wrapTestFeatures(py::module& mod) {
auto test_module = mod.def_submodule("_test_features");
test_module.doc() =
"Module for testing new features.\n"
"DISCLAIMER: this API is subject to frequent and unannounced changes "
"and should **not** be relied upon!";
// wrapKOp("Kelvin_", test_module);
// wrapKOp("Kelvin_", test_module);
// wrapKOp("Kelvin_", test_module);
// wrapKOp("Mindlin_", test_module);
// wrapKOp("Mindlin_", test_module);
// wrapKOp("Boussinesq_", test_module);
// wrapKOp("Boussinesq_", test_module);
wrapIsotropicHardening(test_module);
- wrapEigenvalues(test_module);
}
} // namespace wrap
} // namespace tamaas
diff --git a/src/SConscript b/src/SConscript
index c104817..c10152d 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1,162 +1,162 @@
# -*- mode:python; coding: utf-8 -*-
# vim: set ft=python:
# @file
# @section LICENSE
#
# Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
# Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
import os
Import('main_env')
def prepend(path, list):
return [os.path.join(path, x) for x in list]
env = main_env.Clone()
# Core
core_list = """
fft_plan_manager.cpp
fftransform.cpp
fftransform_fftw.cpp
grid.cpp
grid_hermitian.cpp
statistics.cpp
surface.cpp
tamaas.cpp
legacy_types.cpp
loop.cpp
-eigenvalues.cpp
+computes.cpp
logger.cpp
""".split()
core_list = prepend('core', core_list)
if not main_env['strip_info']:
core_list.append('tamaas_info.cpp')
# Lib roughcontact
generator_list = """
surface_generator.cpp
surface_generator_filter.cpp
surface_generator_filter_fft.cpp
surface_generator_random_phase.cpp
isopowerlaw.cpp
regularized_powerlaw.cpp
""".split()
generator_list = prepend('surface', generator_list)
# Lib PERCOLATION
percolation_list = """
flood_fill.cpp
""".split()
percolation_list = prepend('percolation', percolation_list)
# BEM PERCOLATION
bem_list = """
bem_kato.cpp
bem_polonski.cpp
bem_gigi.cpp
bem_gigipol.cpp
bem_penalty.cpp
bem_uzawa.cpp
bem_fft_base.cpp
bem_functional.cpp
bem_meta_functional.cpp
elastic_energy_functional.cpp
exponential_adhesion_functional.cpp
squared_exponential_adhesion_functional.cpp
maugis_adhesion_functional.cpp
complimentary_term_functional.cpp
bem_grid.cpp
bem_grid_polonski.cpp
bem_grid_kato.cpp
bem_grid_teboulle.cpp
bem_grid_condat.cpp
""".split()
bem_list = prepend('bem', bem_list)
# Model
model_list = """
model.cpp
model_factory.cpp
model_type.cpp
model_template.cpp
be_engine.cpp
westergaard.cpp
elastic_functional.cpp
meta_functional.cpp
adhesion_functional.cpp
volume_potential.cpp
kelvin.cpp
mindlin.cpp
boussinesq.cpp
elasto_plastic/isotropic_hardening.cpp
elasto_plastic/elasto_plastic_model.cpp
elasto_plastic/residual.cpp
integration/element.cpp
""".split()
model_list = prepend('model', model_list)
# Solvers
solvers_list = """
contact_solver.cpp
polonsky_keer_rey.cpp
kato_saturated.cpp
kato.cpp
beck_teboulle.cpp
condat.cpp
polonsky_keer_tan.cpp
ep_solver.cpp
epic.cpp
""".split()
solvers_list = prepend('solvers', solvers_list)
# GPU API
gpu_list = """
fftransform_cufft.cpp
""".split()
gpu_list = prepend('gpu', gpu_list)
# Assembling total list
rough_contact_list = \
core_list + generator_list + percolation_list + model_list + solvers_list
# For some reason collapse OMP loops don't compile on intel
if env['CXX'] != 'icpc':
rough_contact_list += bem_list
# Adding GPU if needed
if env['backend'] == 'cuda':
rough_contact_list += gpu_list
# Generating dependency files
# env.AppendUnique(CXXFLAGS=['-MMD'])
# for file_name in rough_contact_list:
# obj = file_name.replace('.cpp', '.os')
# dep_file_name = file_name.replace('.cpp', '.d')
# env.SideEffect(dep_file_name, obj)
# env.ParseDepends(dep_file_name)
# Adding extra warnings for Tamaas base lib
env.AppendUnique(CXXFLAGS=['-Wextra'])
libTamaas = env.SharedLibrary('Tamaas', rough_contact_list)
Export('libTamaas')
diff --git a/src/core/eigenvalues.cpp b/src/core/computes.cpp
similarity index 62%
rename from src/core/eigenvalues.cpp
rename to src/core/computes.cpp
index 2d55c79..c4fb689 100644
--- a/src/core/eigenvalues.cpp
+++ b/src/core/computes.cpp
@@ -1,47 +1,35 @@
/**
* @file
* @section LICENSE
*
* Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
*/
/* -------------------------------------------------------------------------- */
-#include "eigenvalues.hh"
+#include "computes.hh"
namespace tamaas {
-void eigenvalues(model_type /*type*/, GridBase& eigs,
+void eigenvalues(model_type type, GridBase& eigs,
const GridBase& field) {
- /*
- #define EIG_CASE(_, __, type) \
- case type: { \
- constexpr UInt dim = model_type_traits::dimension; \
- const auto& f = dynamic_cast&>(field); \
- auto& e = dynamic_cast&>(eigs); \
- eigenvalues(e, f); \
- break; \
- }
-
- switch (type) { BOOST_PP_SEQ_FOR_EACH(EIG_CASE, ~, TAMAAS_MODEL_TYPES); }
- //*/
-
- constexpr UInt dim = 3;
- const auto& f = dynamic_cast&>(field);
- auto& e = dynamic_cast&>(eigs);
- eigenvalues(e, f);
+ applyCompute(type, eigs, field);
+}
+void vonMises(model_type type, GridBase& eigs,
+ const GridBase& field) {
+ applyCompute(type, eigs, field);
}
} // namespace tamaas
diff --git a/src/core/computes.hh b/src/core/computes.hh
new file mode 100644
index 0000000..2fba8d7
--- /dev/null
+++ b/src/core/computes.hh
@@ -0,0 +1,89 @@
+/**
+ * @file
+ * @section LICENSE
+ *
+ * Copyright (©) 2016-19 EPFL (École Polytechnique Fédérale de Lausanne),
+ * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ */
+/* -------------------------------------------------------------------------- */
+#ifndef EIGENVALUES_HH
+#define EIGENVALUES_HH
+/* -------------------------------------------------------------------------- */
+#include "grid.hh"
+#include "loop.hh"
+#include "model_type.hh"
+#include "ranges.hh"
+#include "static_types.hh"
+#include
+
+namespace tamaas {
+
+namespace compute {
+/// Compute eigenvalues of a symmetric matrix field
+struct Eigenvalues {
+ template
+ static void call(Grid& eigs, const Grid& field) {
+ Loop::loop([](auto eig, auto f) { eig = eigenvalues(f); },
+ range>(eigs),
+ range>(field));
+ }
+};
+
+/// Compute von Mises stress on a tensor field
+struct VonMises {
+ template
+ static void call(Grid& vm, const Grid& stress) {
+ Loop::loop(
+ [](Real& vm, auto sigma) {
+ SymMatrix dev;
+ dev.deviatoric(sigma, 3);
+ vm = std::sqrt(1.5) * dev.l2norm();
+ },
+ vm, range>(stress));
+ }
+};
+} // namespace compute
+
+template
+void applyCompute(model_type type, GridBase& result,
+ const GridBase& field) {
+#define APPLY_CASE(_, __, type) \
+ case type: { \
+ constexpr UInt dim = model_type_traits::dimension; \
+ const auto& f = dynamic_cast&>(field); \
+ auto& e = dynamic_cast&>(result); \
+ Compute::template call(e, f); \
+ break; \
+ }
+
+ switch (type) {
+ BOOST_PP_SEQ_FOR_EACH(APPLY_CASE, ~, (model_type::volume_2d));
+ default:
+ TAMAAS_EXCEPTION("Model type " << type
+ << " not yet suported for field computation");
+ }
+#undef APPLY_CASE
+}
+
+void eigenvalues(model_type type, GridBase& eigs,
+ const GridBase& field);
+void vonMises(model_type type, GridBase& eigs,
+ const GridBase& field);
+
+} // namespace tamaas
+
+#endif /* EIGENVALUES_HH */