The mentioned approach and also most other approaches for kinematically coupling operators between both scales yield linear constraints for the DOFs of the RVE.
Some simple couplings, e.g. rule of mixture, homogeneous or linear surface displacements, can be realised by Dirichlet boundary conditions.
Many more approaches, e.g. periodic BCs on periodic meshes, yield inhomogeneous linear constraint with two DOFs involved in each constraint.
Such constraints are relatively easy to realise and implemented in FEAP, see PERIodic which is an extension of the ELINk feature.
The other kinematically coupling operators, e.g. stochastic periodic BCs, weak periodic boundary conditions, minimal constraint coupling (Blanco 2014), etc., yield to general inhomogeneous linear equations with variable number of involved DOFs.
There are multiple methods to handle such constraints in FEM formulations, e.g. penalty method, Lagrange multipliers, elimination (condensation) method.
The penalty method is easy to implement but have poor properties, e.g. problem depending penalty values, compromise between constraint approximation and condition number of the globel system of equations.
Lagrange multipliers are frequently used in literature. Linear and nonlinear constraints can be realised and the implementation can be done on top of standard FEM, e.g. as user macro before the solver. However, the method adds an additional DOF for each constraint, which rapidely increase the computational effort, and the system of equations gets equations with zero diagonal terms, which cannot be handled by every solver.
The elimination method, also called condensation method, assembles constraints similar like Dirichlet boundary conditions into the system of equitations. Thus, one DOF per constraint is removed from the system of equation, which speeds up the solution process. Moreover, the constraints are fulfilled exactly and the properties of the system of equations are preserved. However, an efficient implementation is more complex compared to the two previous methods (see appendix B in DOI:10.1016/j.ijsolstr.2018.02.006 for an overview).
I have very good experiences with the elimination method in FEAP applied to various problems, e.g. homogenisation, adaptive meshing, fracture mechanics, sub-modelling.
I further has implemented reference nodes (nodes not attached to an element), which allow to transform the constraints to homogeneous constraints and make use of all the nice loading features, e.g. PROPortional etc., from FEAP for the macroscopic deformations for an RVE.
Recently, my colleague has extended the implementation for sparse matrices, for parFEAP, which was challenging, and also added Lagrange multipliers for the purpose of direct comparison.
We have structured the code as package to standard FEAP.
FEAP's user interfaces are used wherever possible and only a minimum of FEAP's core files are modified.
After the testing period in FEAP 8.4 and 8.6, we plan to provide the updated package again to Berkeley. Maybe it can become available to others this way.