  Simulating space plasma in a global scale is computationally demanding.
Modeling different regions with different resolution can save computational
resources without compromising too much on simulation accuracy. This thesis
examines adaptive mesh refinement as a method of optimizing simulation in
Vlasiator. The thesis examines behavior of plasma and different characteristic
scales that need to be factored in simulation. Kinetic models using statistical
methods and fluid methods are examined. Both have their advantages, and
Vlasiator uses a combination of these methods. Modeling electrons kinetically
requires a resolution orders of magnitude greater than ions, so ions are
modeled kinetically and electrons as a fluid. Targeted refinement used in
Vlasiator is introduced as a method to save memory and computation. Due to the
structure of the magnetosphere, the required resolution isn't uniform in the
simulation region. Regions where a higher resolution is required can be refined
such that the refined area is given as simulation parameters. Adaptive mesh
refinement based on the simulation data is introduced as an evolution of this
method. Refinement is done based on dimensionless gradients of different
variables; regions where the examined variables change rapidly are refined, and
conversely regions with little change are coarsened. Test results show adaptive
refinement to be a promising way to improve Vlasiator. Refinement parameters
produce results similar to the static method, while giving somewhat different
refinement regions. A further goal is runtime refinement.
