Skip to content
Snippets Groups Projects
Commit 3b414b0a authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Explicit template instantiation

parent efa23601
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ run-one-body-sample-gdb: one-body-sample
libtool --mode execute gdb ./one-body-sample
one_body_sample_SOURCES = \
one-body-sample.cc LambertW.cc
one-body-sample.cc assemblers.cc LambertW.cc
one_body_sample_CPPFLAGS = \
$(AM_CPPFLAGS) -Dsrcdir=\"$(srcdir)\"
......
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <dune/fufem/boundarypatch.hh>
#include <dune/fufem/functions/constantfunction.hh>
#include <dune/fufem/assemblers/localassemblers/neumannboundaryassembler.hh>
......@@ -6,6 +10,8 @@
#include <dune/tectonic/globallaursennonlinearity.hh>
#include <dune/tectonic/globalruinanonlinearity.hh>
#include "assemblers.hh"
// Assembles Neumann boundary term in f
template <class GridType, class GridView, class LocalVectorType, class FEBasis>
void assemble_neumann(GridView const &gridView, FEBasis const &feBasis,
......@@ -90,3 +96,5 @@ assemble_nonlinearity(
assert(false);
}
}
#include "assemblers_tmpl.cc"
......@@ -31,5 +31,4 @@ assemble_nonlinearity(
Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>> state,
double h);
#include "assemblers.cc"
#endif
#include <dune/common/fmatrix.hh>
#include <dune/common/fvector.hh>
#include <dune/grid/yaspgrid.hh>
#include <dune/fufem/functionspacebases/p1nodalbasis.hh>
// {{{ 2D
typedef Dune::FieldVector<double, 2> SmallVector2;
typedef Dune::FieldMatrix<double, 2, 2> SmallMatrix2;
typedef Dune::BCRSMatrix<SmallMatrix2> OperatorType2;
typedef Dune::BlockVector<SmallVector2> VectorType2;
typedef Dune::YaspGrid<2> GridType2;
typedef GridType2::LeafGridView GridView2;
typedef P1NodalBasis<GridView2, double> P1Basis2;
template void assemble_neumann<GridType2, GridView2, SmallVector2, P1Basis2>(
GridView2 const &gridView, P1Basis2 const &feBasis,
Dune::BitSetVector<1> const &neumannNodes,
Dune::BlockVector<SmallVector2> &f,
Dune::VirtualFunction<double, double> const &neumann, double time);
template Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>>
assemble_frictional<GridType2, GridView2, SmallVector2, P1Basis2>(
GridView2 const &gridView, P1Basis2 const &feBasis,
Dune::BitSetVector<1> const &frictionalNodes);
template Dune::shared_ptr<
Dune::GlobalNonlinearity<VectorType2, OperatorType2> const>
assemble_nonlinearity<VectorType2, OperatorType2>(
int size, Dune::ParameterTree const &parset,
Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>>
nodalIntegrals,
Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>> state,
double h);
// }}}
// {{{ 3D
typedef Dune::FieldVector<double, 3> SmallVector3;
typedef Dune::FieldMatrix<double, 3, 3> SmallMatrix3;
typedef Dune::BCRSMatrix<SmallMatrix3> OperatorType3;
typedef Dune::BlockVector<SmallVector3> VectorType3;
typedef Dune::YaspGrid<3> GridType3;
typedef GridType3::LeafGridView GridView3;
typedef P1NodalBasis<GridView3, double> P1Basis3;
template void assemble_neumann<GridType3, GridView3, SmallVector3, P1Basis3>(
GridView3 const &gridView, P1Basis3 const &feBasis,
Dune::BitSetVector<1> const &neumannNodes,
Dune::BlockVector<SmallVector3> &f,
Dune::VirtualFunction<double, double> const &neumann, double time);
template Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>>
assemble_frictional<GridType3, GridView3, SmallVector3, P1Basis3>(
GridView3 const &gridView, P1Basis3 const &feBasis,
Dune::BitSetVector<1> const &frictionalNodes);
template Dune::shared_ptr<
Dune::GlobalNonlinearity<VectorType3, OperatorType3> const>
assemble_nonlinearity<VectorType3, OperatorType3>(
int size, Dune::ParameterTree const &parset,
Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>>
nodalIntegrals,
Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>> state,
double h);
// }}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment