I think I actually groaned out loud during “Asylum” when it became apparent (only 10 minutes in) that the repressed housewife was going to sleep with the dangerous but handsome stranger she had just met, and that the resultant adultery melodrama would be as formal and crisp as its 1950s English setting.

Having accepted my fate, however, I was pleased to find myself intrigued by Natasha Richardson’s performance as Stella, an icy woman whose cold husband (Hugh Bonneville) moves them to the grounds of a cheerless asylum where he has just been appointed deputy superintendent. Stella goes through so much hell, and Richardson pulls it off so ably, you forget that all you’re watching is a buffet of laughable insanity. (It’s like “Grizzly Man”: You know right off that these people are crazy; the only question is how crazy they’re going to get.)

It is among the patients at the facility that Stella accidentally finds her lover; he is Edgar (Marton Csokas), a great Frankenstein-monster of a man with meaty hands and an unnervingly calm manner who is permitted, with other patients, to do gardening and other handy work on the asylum grounds. A former sculptor, he is in the nuthouse because, in his own words, “I killed my wife. She betrayed me.”

It takes very little common sense to avoid becoming involved with such a man, yet before long he and Stella are having a brief, animalistic encounter in an unfinished greenhouse, and meeting thereafter for other tawdry yet thrilling encounters. They talk very little, focusing their relationship instead on the sex, which makes Edgar’s impractical dream of Stella running off with him permanently all the more ridiculous.

And yet — well, let’s just say Edgar’s not the only one behaving irrationally around here. Over time, Stella becomes infected with a kind of madness herself, and it is the cause of much suffering for her and her loved ones. (She has a son, too, a 10-year-old lad named Charlie.) Her husband may be insensitive — his idea of an apology is to say, “Forgive me,” and to immediately start engaging her in sex — but surely he does not deserve to be tossed aside for a murderer.

There is a tasty supporting performance by Ian McKellen as Edgar’s psychologist, tart of tongue and ambiguous of sexuality, who plays a key role in the film’s conclusion. In fact, it is this character who proves to be the most manipulative — no mean feat given how obsessed some of the other figures are.

Directed by David Mackenzie (from the equally dour adultery drama “Young Adam”) and adapted from Patrick McGrath’s novel by Patrick Marber (“Closer,” a fairly dour adultery drama in its own right) and Chrysanthy Balis, “Asylum” doesn’t quite reach the depths of love-induced delirium that it aims for, but it tells its gritty, weepy story well enough to satisfy those who crave a little more melodrama and madness in their lives.

B- (1 hr., 30 min.; R, one F-word, some strong sexuality and nudity, a little violence.)