A. The court from time to time, after considering the financial resources of both parties and the reasonableness of the positions each party has taken throughout the proceedings, may order a party to pay a reasonable amount to the other party for the costs and expenses of maintaining or defending any proceeding under this chapter or chapter 4, article 1 of this title. On request of a party or another court of competent jurisdiction, the court shall make specific findings concerning the portions of any award of fees and expenses that are based on consideration of financial resources and that are based on consideration of reasonableness of positions. The court may make these findings before, during or after the issuance of a fee award.
B. If the court determines that a party filed a petition under one of the following circumstances, the court shall award reasonable costs and attorney fees to the other party:
1. The petition was not filed in good faith.
2. The petition was not grounded in fact or based on law.
3. The petition was filed for an improper purpose, such as to harass the other party, to cause an unnecessary delay or to increase the cost of litigation to the other party.
C. For the purpose of this section, costs and expenses may include attorney fees, deposition costs and other reasonable expenses as the court finds necessary to the full and proper presentation of the action, including any appeal.
D. The court may order all amounts paid directly to the attorney, who may enforce the order in the attorney’s name with the same force and effect, and in the same manner, as if the order had been made on behalf of any party to the action.