Weak-formulated physics-informed modeling and optimization for heterogeneous digital materials | Synapse