Another decorous wartime melodrama from James Kent, who made his feature directorial debut with “Testament of Youth,” a glossy dramatization of pacifist Vera Brittain’s memoirs about her experiences in World War I. That film was like a Hollywood woman’s picture from the 1940s done up in “Masterpiece Theatre” style, and so is this follow-up.

“The Aftermath” is not, however, based on a true story, but on a novel by Rhidian Brook, who also served as one of the three adapters. The title refers, in one sense, to what followed in Germany after the end of World War II. There is, first of all, destruction and death to deal with: it’s set in Hamburg, where massive bombing has left the city in rubble and thousands missing, presumably buried in the ruins. Added to that is humiliation, as the residents must endure occupation by victorious troops who examine them for possible Nazi ties and requisition the still-standing homes while forcing them to live in hovels.

Among the British officers who are part of the peace-and-order-keeping force in the city is Captain Lewis Morgan (Jason Clarke), whose wife Rachael (Keira Knightley) joins him after a long separation. Together they go to the house that has been assigned to them: a beautiful mansion belonging to architect Stefan Lubert (Alexander Skarsgård), a widower who now lives there with his teen daughter Freda (Flora Li Thiemann). They will leave for an unknown domicile as the Morgans move in.

Rachael is clearly hostile to all Germans—a dislike explained by the fact that her only child, an eleven-year old boy, was killed during the Blitz in London—but Lewis, an enlightened man who wants to treat the locals with compassion, persuades his wife to let Stefan and Freda stay, occupying the attic. The tension within the Morgan marriage left by the loss of their son and Lewis’ inability to deal with it is the second sense in which the title applies, and it’s exacerbated by the presence of Stefan; he too is in mourning for his wife, whose continued presence in the house is represented by her Steinway piano.

The major thrust of the remainder of the film is the attraction that grows between Rachael and Stefan, culminating in ardent lovemaking. They have ample opportunity to indulge, given that Lewis is called away on an assignment to uncover the identities of young men, marked by the tattoo “88”—which signifies “Heil Hitler”—engaged in guerilla violence against their occupiers. That subplot is complicated by the fact the Freda, outwardly stoic but inwardly traumatized, skips school to aid in cleanup work in the ruins. There she meets, and falls for, a hunky fellow (Jannik Schümann) who belongs to the “88” and is willing to use her to get at the Morgans.

“The Aftermath” is very handsomely appointed—the production design (Sonja Klaus), costumes (Bojana Nikitovic) and cinematography (Franz Lustig) are all estimable, and the cast certainly commit themselves to their roles, with Knightley, Clarke and Skarsgård all having opportunities to exhibit their thespian strengths, with an especially weepy monologue for Knightley and a major breakdown for Clarke. Thiemann, on the other hand, is allowed only a good cry, though at one point she’s also granted a hiss.

Still, the script undermines the best efforts on both sides of the camera. It indulges in crudities that veer in the direction of the overwrought, even as it strains to remain dignified. Among the colleagues of Clarke is an obnoxious fellow (Martin Compston) who ridicules his softness toward Germans, especially Lubert, whose piano he intentionally abuses during one visit to the house. Compston plays him way over-the-top, making him sound like an ugly American (though his nationality is never made clear—he certainly sounds American, but his wife, played as one of those snootier-than-thou types by Kate Phillips, is as English as all get-out). Then there’s Lewis’ boyish driver (Fionn O’Shea), whose sweetness will be, to anyone who’s seen a movie before, a dead giveaway about his ultimate fate.

That’s revealed in a last-act resolution of the “boy Nazi” subplot, which is rather confusingly staged, action frankly not being Kent’s forte. But that’s not entirely his fault: the episode is not effectively set out by the screenwriters—just one of several instances in which the film falls short in terms of narrative coherence. This is something that cannot be blamed on Beverly Mills’ editing. Simply put, there are gaps in the storytelling, not only in this instance (how the perpetrator plans his scheme is unclear) but in others. Freda’s sudden change of attitude toward Rachael, for instance, is so abrupt—apparently brought about by playing “Claire de Lune” jointly—as to seem inexplicable. Even worse, the passionate attachment of Rachael and Stefan isn’t developed gradually enough, and so seems more theatrical than real, meaning that Rachael’s final dilemma—which man should she choose?—proves far less than a “Casablanca” moment. In an era when many films are needlessly protracted, one hesitates to suggest that one should be longer, but this one does.

One doesn’t want to be overly hard on “The Aftermath.” As far as wartime soap operas go, it’s a beautifully appointed, civilized example of the genre—but not a particularly compelling or credible one.