Gromacs  2027.0-dev-20261108-5b0710e1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions | Variables
langevin.cpp File Reference
#include "gmxpre.h"
#include <cmath>
#include <array>
#include <memory>
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "gromacs/gpu_utils/capabilities.h"
#include "gromacs/hardware/device_management.h"
#include "gromacs/math/paddedvector.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/real.h"
#include "gromacs/utility/stringutil.h"
#include "gromacs/utility/vectypes.h"
#include "testutils/hardware_test_fixture.h"
#include "testutils/naming.h"
#include "testutils/refdata.h"
#include "testutils/testasserts.h"
#include "langevintestdata.h"
#include "gromacs/math/arrayrefwithpadding.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
#include "gromacs/mdlib/update.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/matrix.h"
+ Include dependency graph for langevin.cpp:

Description

Tests for the Langevin integrator.

The test creates a system of independent particles exerting constant external forces and makes several numerical integration timesteps. The results are compared with pre-computed reference values.

Todo:
Add PBC handling test.
Author
Artem Zhmurov zhmur.nosp@m.ov@g.nosp@m.mail..nosp@m.com
Magnus Lundborg magnu.nosp@m.s.lu.nosp@m.ndbor.nosp@m.g@sc.nosp@m.ilife.nosp@m.lab..nosp@m.se

Classes

class  gmx::test::anonymous_namespace{langevin.cpp}::LangevinTest
 Test fixture for Langevin integrator. More...
 

Typedefs

using gmx::test::anonymous_namespace{langevin.cpp}::LangevinInputConfig = std::tuple< int, real, int, int, real, real, int >
 Input configuration for Langevin tests.
 
using gmx::test::anonymous_namespace{langevin.cpp}::LangevinTestHelper = HardwareAndExecutionTestHelper< LangevinInputConfig, std::tuple<>>
 Hardware test helper for Langevin. More...
 

Functions

void gmx::test::anonymous_namespace{langevin.cpp}::integrateLangevinCpu (LangevinTestData *testData, int numSteps)
 
std::string gmx::test::anonymous_namespace{langevin.cpp}::formatTimestep (real timestep)
 Format timestep as integer for test names.
 
std::string gmx::test::anonymous_namespace{langevin.cpp}::formatTauT (real tauT)
 Format tau as integer for test names.
 
std::string gmx::test::anonymous_namespace{langevin.cpp}::formatTemperature (real temperature)
 Format temperature as integer for test names.
 

Variables

static const RVec gmx::test::anonymous_namespace{langevin.cpp}::sc_initialVelocity { 1.0, -2.0, 3.0 }
 
static const RVec gmx::test::anonymous_namespace{langevin.cpp}::sc_force { -3.0, 2.0, -1.0 }
 
static const auto gmx::test::anonymous_namespace{langevin.cpp}::sc_configInfoFormatters
 Formatters for parameters in the config info. More...
 
static const auto gmx::test::anonymous_namespace{langevin.cpp}::sc_executionModeFormatters = std::make_tuple()
 Formatters for parameters in the execution mode (currently empty)
 
static const
NameOfTestFromTuple
< LangevinTestHelper::DynamicParameters > 
gmx::test::anonymous_namespace{langevin.cpp}::sc_testNamer
 Helper object to name tests using all parameters. More...
 
const std::array
< LangevinInputConfig, 17 > 
gmx::test::anonymous_namespace{langevin.cpp}::sc_langevinConfigs
 The set of parameters combinations to run the test on. More...