LucÃ­a y el sexo

LucÃ­a (Paz Vega), a waitress, is talking on the phone with her depressed writer boyfriend Lorenzo (TristÃ¡n Ulloa) after they had a nasty argument, where, afterward, she walked out. Since he's been in a 'funk' for a while, she's worried, and goes home to console him. Finding an empty apartment, LucÃ­a is frantic. She receives a phone call from the police while finding a suicide note, and is so afraid of bad news that she hangs up, assuming the worst. They call back, but she ignores the ringing phone, packs a bag, and flees. Looking for a new beginning, LucÃ­a travels to the mysterious Balearic Islands that Lorenzo had always talked of, but had recently been very negative about.
The plot breaks to six years earlier: Lorenzo is having casual sex in the ocean, on a bright moon-lit night, with a beautiful married woman he just met named Elena. They part ways, expecting to never see each other again. She discovers she is pregnant with his child, and attempts to find him, but, not knowing much about him, is unable to.
Later, as Lorenzo talks with his literary agent at a restaurant, discussing his writer's block, LucÃ­a catches his attention as he gets up from his table to get cigarettes. She asks to speak to him and he joins her. She brazenly tells him that ever since she read his latest book, she has been following him and has fallen passionately in love with him. A smitten Lorenzo immediately engages the sexy, passionate LucÃ­a and she moves into Lorenzo's apartment.
The film then interweaves the past and present, of the characters in the film, and the characters in Lorenzo's novel.
Lorenzo repeatedly stalls for time on his new book with his editor, while his relationship with LucÃ­a deepens. About six years pass. Lorenzo learns he has a daughter as a result of his encounter with Elena and begins to visit the child at her school, meeting her babysitter BelÃ©n. BelÃ©n tells Lorenzo her mother is a recently retired porn actress with a new hot boyfriend, and virtually seduces Lorenzo with chatter of sexual context and banter about her fantasies. Lorenzo uses these encounters and his fantasies about BelÃ©n and her mother as content for his book, and LucÃ­a reads about it, thinking it fiction. Meanwhile, he does not disclose his fatherhood to LucÃ­a or the child, nor even attempt to contact Elena.
BelÃ©n flirts with Lorenzo and eventually invites him over to Elena's house while she babysits his daughter, Luna. Lorenzo tells Luna a bedtime story, and after she falls asleep, he and BelÃ©n begin to have sex. They are interrupted as Luna knocks at the bedroom door, and they watch in horror as the family dog, a large Rotweiler in 'protect mode' kills Luna. BelÃ©n is stunned. Lorenzo runs away and falls into a deep depression.
Lorenzo's writing turns dark, towards depraved sex and death. He anonymously contacts Elena, who has moved to the island to find solace and recall better days, and provides her a nice story about a beautiful child that loves to swim in the sea, to cheer her spirits. But his now guilt-ridden and uncommunicative relationship with LucÃ­a begins to collapse.
Back in the present, LucÃ­a meets a scuba diver on the island, Carlos, and through him, Elena, who runs an inn on the island. LucÃ­a rents a room, and the women bond as friends, not knowing their intimate connection. But when LucÃ­a mentions Lorenzo by name, and his past visit to the island long ago, Elena deduces the connection. LucÃ­a sees a picture of Luna (looking remarkably like her father and remembering the name from Lorenzo's novel) and she makes the connection too.
Lorenzo's editor visits Lorenzo in the hospital, where he was taken after being in an 'accident', spending several weeks in recovery. When Lorenzo asks about LucÃ­a, the editor tells Lorenzo he thinks LucÃ­a thinks he is dead. Lorenzo guesses LucÃ­a is on the island and has the editor take him there. After both women discover that Lorenzo isn't dead, the three characters cope with and finally understand the entanglements of their interwoven relationships.

Question: The film is based on whose novel?
Answer: Lorenzo's