(by DaveK Jan Evangelista Purkyně University in Ústí nad Labem Faculty of Science +420 47528 3306)
LIGGGHTS bug - move/mesh rotate/variable cannot accept store/state compute variable
When using variable input like
fix saveval all store/state 1 v_savevaltemp
compute savevalsum all reduce sum f_saveval
variable omeg equal c_savevalsum
fix rotatemesh all move/mesh mesh inputmesh rotate/variable origin 0 0 0 axis 0 0 1 omega v_omeg
ends up with error
Proposed change:
two lines - marked with *->*
LIGGGHTS-PUBLIC/src/mesh_mover_rotation.cpp
MeshMoverRotateVariable::MeshMoverRotateVariable(LAMMPS *lmp,AbstractMesh *_mesh, FixMoveMesh *_fix_move_mesh,
const char * const * const arg, const int narg) :
...
omega_ = input->variable->compute_equal(myvar1_); *->* omega_ = 0.0; //input->variable->compute_equal(myvar1_); - similarly to MeshMoverLinearVariable
totalPhi_ = 0.;
add_reference_point(point_);
}
void MeshMoverRotateVariable::setup()
{
// check if variable still exists
myvar1_ = input->variable->find(var1str_);
if (myvar1_ < 0)
error->all(FLERR,"Variable name 1 for fix move/mesh rotate dynamic does not exist");
// *->* omega_ = input->variable->compute_equal(myvar1_); // add evaluation - similarly to MeshMoverLinearVariable
}
Attachment | Size |
---|---|
![]() | 2.67 KB |
arnom | Wed, 01/08/2020 - 08:46
Fixed, thank you
Fixed, thank you