One area where Mr. Trump and his advisers have been unswerving is their repeated denunciation of “radical Islamic terrorism.”

But his position on barring Muslim immigrants has gone through various modifications since December 2015, when he first called for a “total and complete shutdown of Muslims entering the United States until our country’s representatives can figure out what is going on.”

Philip D. Zelikow, who served in the administrations of both Presidents Bush and now teaches at the University of Virginia, said there were three guiding themes in Mr. Trump’s foreign policy: economic nationalism, a war against “radical Islamic terrorism,” and a “deliberate aloofness” toward the actions of other countries — for example, Russia. “Beyond that,” Mr. Zelikow said, “there is an ambient prickliness. We could end up picking fights with three-quarters of the world.”

On Wednesday, Mr. Trump and his national security adviser, Michael T. Flynn, met with a delegation of generals and admirals from the Pentagon’s joint staff at the president-elect’s Palm Beach club. A day earlier, Mr. Flynn met in Washington with Vice President-elect Mike Pence and Mr. Trump’s nominees for secretary of defense, Gen. James N. Mattis; secretary of state, Rex W. Tillerson; and secretary of Homeland Security, John F. Kelly.

The military officers at the meeting focus mostly on the acquisition of equipment, including the F-35 Joint Strike Fighter, whose costs Mr. Trump recently complained had spiraled “out of control.” This suggests that his first major Pentagon briefing was about hardware and budgets, not military operations.

Advisers to Mr. Trump did not discuss the meetings or say how he planned to respond to the attack in Germany, as well as ones in Turkey and Switzerland. In a Twitter post on Monday, the president-elect said that terrorism was “getting worse” and that “the civilized world must change thinking!”