These two circuits can be used to calculate the average of current (cap circuit) and voltage (inductor circuit). Just connect the inputs of the controlled sources to the current or voltage of interest. The procedure is as follows, if you are averaging current first set the cap value to the period of the input current and close the switch for a single period of the input current then observe the average value as the voltage on the capacitor. To average voltage set the inductor value to the period of the input voltage and open the switch for one period of the input voltage then the averaged value will be the current in the inductor.
I used this method to quickly calculate the efficieny of an SMPS i built, it'll save you the time and hassle, trust me.