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

Allow to set the parameters of the skyrmion energy from the parameter file

[[Imported from SVN: r10014]]
parent 9eabc322
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,12 @@ class ChiralSkyrmionEnergy
public:
ChiralSkyrmionEnergy(const Dune::ParameterTree& parameters)
{
h_ = parameters.template get<double>("h");
kappa_ = parameters.template get<double>("kappa");
}
//! Dimension of a tangent space
enum { blocksize = TargetSpace::TangentVector::dimension };
......@@ -39,8 +45,8 @@ public:
const LocalFiniteElement& localFiniteElement,
const std::vector<TargetSpace>& localConfiguration) const;
field_type h_ = 3;
field_type kappa_ = 1;
field_type h_;
field_type kappa_;
};
template <class GridView, class LocalFiniteElement, class field_type>
......
......@@ -198,7 +198,7 @@ int main (int argc, char *argv[]) try
} else if (energy == "chiral_skyrmion")
{
localEnergy.reset(new GFE::ChiralSkyrmionEnergy<GridType::LeafGridView, FEBasis::LocalFiniteElement, adouble>);
localEnergy.reset(new GFE::ChiralSkyrmionEnergy<GridType::LeafGridView, FEBasis::LocalFiniteElement, adouble>(parameterSet.sub("energyParameters")));
} else
DUNE_THROW(Exception, "Unknown energy type '" << energy << "'");
......
......@@ -54,8 +54,17 @@ energy = chiral_skyrmion
structuredGrid = true
lower = -10 -10
upper = 10 10
upper = 10 10
elements = 100 100
[energyParameters]
h = 1
kappa = 1
[]
# Inverse stereographic projection
initialIterate = "[2*x[0] / (x[0]*x[0]+x[1]*x[1]+1), 2*x[1] / (x[0]*x[0]+x[1]*x[1]+1), (x[0]*x[0]+x[1]*x[1]-1)/ (x[0]*x[0]+x[1]*x[1]+1)]"
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