Commit 1681e00a authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

renamed path dune/amdis to amdis

parent 91f95d14
......@@ -5,9 +5,9 @@
#include <dune/common/std/apply.hh>
#include <dune/amdis/common/IndexSeq.hpp>
#include <dune/amdis/common/Mpl.hpp>
#include <dune/amdis/operations/Basic.hpp>
#include <amdis/common/IndexSeq.hpp>
#include <amdis/common/Mpl.hpp>
#include <amdis/operations/Basic.hpp>
namespace AMDiS
{
......
#pragma once
#include <dune/amdis/common/FieldMatVec.hpp>
#include <dune/amdis/operations/Arithmetic.hpp>
#include <dune/amdis/operations/Basic.hpp>
#include <dune/amdis/operations/CMath.hpp>
#include <dune/amdis/operations/Composer.hpp>
#include <amdis/common/FieldMatVec.hpp>
#include <amdis/operations/Arithmetic.hpp>
#include <amdis/operations/Basic.hpp>
#include <amdis/operations/CMath.hpp>
#include <amdis/operations/Composer.hpp>
namespace AMDiS
{
......
#include <dune/amdis/AMDiS.hpp>
#include <dune/amdis/ProblemStat.hpp>
#include <dune/amdis/common/Literals.hpp>
#include <amdis/AMDiS.hpp>
#include <amdis/ProblemStat.hpp>
#include <amdis/common/Literals.hpp>
#define TEST_EQ(expr1, expr2) test_exit( (expr1) == (expr2), "'" , #expr1 , "' != '" , #expr2 , "'" )
......
#include <dune/amdis/AMDiS.hpp>
#include <dune/amdis/ProblemStat.hpp>
#include <dune/amdis/common/Literals.hpp>
#include <amdis/AMDiS.hpp>
#include <amdis/ProblemStat.hpp>
#include <amdis/common/Literals.hpp>
#ifndef DIM
#define DIM 2
......@@ -12,7 +12,7 @@
using namespace AMDiS;
namespace {
using TestParam = ProblemStatTraits<DIM, DOW, 1>;
using TestProblem = ProblemStat<TestParam>;
using Op = TestProblem::OperatorType;
......@@ -26,80 +26,80 @@ namespace {
{
prob->initialize(INIT_ALL);
}
void test1() // AddOperators
{
auto const& u = prob->getSolution<0>();
// define operators
Op op1;
op1.addZOT( 1.0 );
op1.addZOT( 1.0 );
op1.addZOT( constant(1.0) );
// value of DOFVector at QPs
op1.addZOT( valueOf(u) );
op1.addZOT( valueOfFunc(u, [](auto const& U) { return U; }) );
op1.addZOT( valueOfFunc(u, [](auto const& U) { return U; }, 1) );
// partial derivative of DOFVector
op1.addZOT( derivativeOf(u, 0) );
op1.addZOT( derivativeOf(u, 1) );
// op1.addFOT( gradientOf(u), GRD_PSI );
// evaluate functor at coordinates
op1.addZOT( eval([](auto const& x) { return x[0]; }) );
op1.addZOT( [](auto const& x) { return 1.0; } );
// add operator to system
prob->addMatrixOperator(op1, 0, 0);
prob->addVectorOperator(op1, 0);
// define operators with factor argument
Op op2;
op2.addZOT( valueOf(u, 1.0) );
op2.addZOT( derivativeOf(u, 0, 1.0) );
op2.addZOT( derivativeOf(u, 1, 1.0) );
// add operator to system, with optional factor as pointer
double* factor = new double(1.0);
prob->addMatrixOperator(op2, 0, 0, factor);
prob->addVectorOperator(op2, 0, factor);
}
void test2() // MatrixVector
void test2() // MatrixVector
{
auto const& u = prob->getSolution<0>();
using GradOp = std::decay_t< decltype(gradientOf(u)) >;
using DerivOp = std::decay_t< decltype(derivativeOf(u,0)) >;
using Jacobian = typename GradOp::value_type;
using Derivative = typename DerivOp::value_type;
Jacobian v, w;
double erg = v[0].dot(w[0]);
}
protected:
shared_ptr<TestProblem> prob;
};
} // end namespace
int main(int argc, char* argv[])
{
int main(int argc, char* argv[])
{
AMDiS::init(argc, argv);
auto tester = make_shared<AMDiSTester>("test");
tester->test1();
tester->test2();
AMDiS::finalize();
return 0;
}
\ No newline at end of file
#install headers
target_include_directories(amdis PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src>)
target_compile_definitions(amdis PUBLIC AMDIS_BACKEND_MTL=1)
target_compile_options(amdis PUBLIC -Wall -pedantic -Wno-unused-parameter) #-ftemplate-backtrace-limit=0
dune_library_add_sources(amdis SOURCES
Filesystem.cpp
)
......@@ -14,4 +19,4 @@ install(FILES
TreeData.hpp
TreePath.hpp
Visitor.hpp
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/amdis/utility)
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/amdis/utility)
......@@ -17,7 +17,7 @@
#include <fstream>
#include <string>
#include <dune/amdis/Output.hpp>
#include <amdis/Output.hpp>
template <class... Args>
void inline _ignore_(Args&&...) {}
......
......@@ -3,7 +3,7 @@
#include <string>
#include <vector>
#include <dune/amdis/utility/String.hpp>
#include <amdis/utility/String.hpp>
namespace AMDiS
{
......
......@@ -2,9 +2,9 @@
#include <cmath>
#include <dune/amdis/common/Loops.hpp>
#include <dune/amdis/common/Mpl.hpp>
#include <dune/amdis/common/Tags.hpp>
#include <amdis/common/Loops.hpp>
#include <amdis/common/Mpl.hpp>
#include <amdis/common/Tags.hpp>
namespace AMDiS
{
......
......@@ -4,7 +4,7 @@
#include <dune/functions/common/indexaccess.hh>
#include <dune/functions/functionspacebases/flatmultiindex.hh>
#include <dune/amdis/common/Mpl.hpp>
#include <amdis/common/Mpl.hpp>
namespace AMDiS
{
......
......@@ -4,8 +4,8 @@
#include <dune/common/fvector.hh>
#include <dune/amdis/common/IndexSeq.hpp>
#include <dune/amdis/common/MultiTypeVector.hpp>
#include <amdis/common/IndexSeq.hpp>
#include <amdis/common/MultiTypeVector.hpp>
namespace AMDiS
{
......
......@@ -6,7 +6,7 @@
#include <vector>
#include <dune/typetree/typetree.hh>
#include <dune/amdis/utility/Visitor.hpp>
#include <amdis/utility/Visitor.hpp>
namespace AMDiS
{
......
#pragma once
#include <dune/typetree/visitor.hh>
#include <dune/amdis/common/Mpl.hpp>
#include <dune/amdis/utility/Traversal.hpp>
#include <amdis/common/Mpl.hpp>
#include <amdis/utility/Traversal.hpp>
namespace AMDiS
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment