Skip to content
Snippets Groups Projects
Commit d14c6b63 authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Use the separate NeumannEnergy class now

[[Imported from SVN: r10119]]
parent a11788b8
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#include <dune/gfe/localadolcstiffness.hh> #include <dune/gfe/localadolcstiffness.hh>
#include <dune/gfe/stvenantkirchhoffenergy.hh> #include <dune/gfe/stvenantkirchhoffenergy.hh>
#include <dune/gfe/neumannenergy.hh>
#include <dune/gfe/sumenergy.hh>
#include <dune/gfe/feassembler.hh> #include <dune/gfe/feassembler.hh>
#include <dune/gfe/trustregionsolver.hh> #include <dune/gfe/trustregionsolver.hh>
...@@ -239,16 +241,21 @@ int main (int argc, char *argv[]) try ...@@ -239,16 +241,21 @@ int main (int argc, char *argv[]) try
} }
// Assembler using ADOL-C // Assembler using ADOL-C
auto elasticEnergy = std::make_shared<StVenantKirchhoffEnergy<GridView,
FEBasis::LocalFiniteElement,
adouble> >(materialParameters);
StVenantKirchhoffEnergy<GridView, auto neumannEnergy = std::make_shared<NeumannEnergy<GridView,
FEBasis::LocalFiniteElement, FEBasis::LocalFiniteElement,
adouble> elasticEnergy(materialParameters, adouble> >(&neumannBoundary,neumannFunction.get());
&neumannBoundary,
neumannFunction.get()); SumEnergy<GridView,
FEBasis::LocalFiniteElement,
adouble> totalEnergy(elasticEnergy, neumannEnergy);
LocalADOLCStiffness<GridView, LocalADOLCStiffness<GridView,
FEBasis::LocalFiniteElement, FEBasis::LocalFiniteElement,
SolutionType> localADOLCStiffness(&elasticEnergy); SolutionType> localADOLCStiffness(&totalEnergy);
FEAssembler<FEBasis,SolutionType> assembler(gridView, &localADOLCStiffness); FEAssembler<FEBasis,SolutionType> assembler(gridView, &localADOLCStiffness);
......
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