\section{Introduction}\label{sec:intro}
Neutron stars are promising compact objects
to obtain the information on
 the equation of state of dense matter
 and investigate physics of strong gravity.
The direct detections of gravitational waves
 from merging compact objects
 opened up a new window to access
 such information through the observation
 (\citealp{PhysRevLett.116.061102,PhysRevLett.119.161101,Abbott_2021}).
The neutron star is born in core-collapse supernova
~(for a review see, \citealp{Janka2012,Burrows:2020qrp}).
A successful explosion leaves a proto-neutron star~(PNS)
in its supernova remnant,
being decoupled from the expanding ejecta.
At its birth, the PNS is initially hot
and proton-rich (that is why it is called the proto-neutron star)
and has a radius a few times larger than the typical
 size, $10 \mathrm{km}$, of neutron stars.
Neutrinos and gravitational waves
carry away energy from the PNS and cool it down
 to the neutron star on a diffusion timescale~(a few tens of seconds) much longer
than the dynamical timescale~(\citealp{Prakash:1996xs}).

It is quite numerically costly and impossible to follow the whole evolution
 of the PNS cooling
 by a dynamical simulation in multi-dimensions.
Even recent core-collapse supernova simulations
covered only the first
$10$ \textrm{seconds} at most
~(\citealp{Muller:2018utr,Nakamura:2019snn,Burrows:2019zce,Nagakura:2017mnp}).
Thanks to the large separation of the two timescales,
this long, quasi-static evolution of the PNS
cooling may be approximated in a sequence of
equilibrium configurations with gradually changing thermal
and lepton contents.
In fact, this was the common strategy in the past
~(\citealp{Burrows:1986me,Keil:1996ab,Pons:1998mm}).
Note that this was made possible by the fact
that the Lagrangian formulation is easily employed
in spherical symmetry.

It is not a trivial task, however,
to adopt the same strategy in multi-dimensions
for rotating stars.
One of the big issues to be resolved is
to devise a Lagrangian formulation that enables us
to construct the equilibrium configurations of rotating stars.
To the best of our knowledge, there has been no such method
so far except for our own previous attempt in
Newtonian gravity~(\citealp{Yasutake:2015,Yasutake:2016}),
in which we employ a triangular Lagrangian grid.
It turns out, unfortunately, this scheme was neither robust
nor very efficient.
We hence need to
build a new numerical scheme that
is suitable for the study of the secular evolution
of relativistic rotating stars such as PNSs
to construct stationary rotating stars
and solve two major issues:
(i) to conceive a Lagrangian formulation in general relativity
and (ii) its robust and efficient implementation\footnote{
A relativistic smoothed-particle-hydrodynamics formulation has been recently considered
as dynamical problems in~\citet{Rosswog:2020kwm,Diener:2022hui},
whereas the Lagrange formulation as boundary value problems is not investigated in general relativity so far.}.
The latter is rather technical but turns out to be
crucial as we explain later in detail.

The equilibrium configurations of
relativistic rotating stars
have been extensively investigated
in the Eulerian formulation
 so far~(see \citealp{Paschalidis:2016vmz} for review):
Rotating solutions in general relativity were discussed by \cite{Hartle:1967} and
\cite{Butterworth:1976},
differentially rotating stars were
successfully constructed by~\citet{Komatsu1989b,Cook:1992}
\footnote{This scheme was implemented in the RNS code by~\cite{Stergioulas1995} which is now put in the public domain.};
higher accuracy was attained by a
spectral solver in~\cite{Bonazzola:1993} and
~\cite{Ansorg:2002}.
More recent progresses now allow triaxial stars and magnetized stars
~(\citealp{Uryu:2011ky,Zhou:2017xhf,Uryu:2019ckz}).
Note, however, that all these works made two assumptions \textit{a priori}:
(i) the barotropic condition, i.e., the pressure depends only on the density and
(ii) the rotation law that assumes a functional relation between specific angular momentum and angular velocity, i.e., $F=F(\Omega)$~(\citealp{Komatsu1989b}) or $\Omega=\Omega (F)$~(\citealp{Uryu:2017obi}).
Under these assumptions, one can analytically
integrate the Euler equation and the main task is
to solve the Einstein equations.
Non-barotropic stars in general relativity
have been also built, though.
In general relativity, for example,
\cite{Camelio:2019rsz} proposed
a restrictive formulation by introducing
$p-\Omega$ coordinates

whereas there has been more
works in the Newtonian gravity
~(\citet{Uryu:1994,Uryu:1995,Roxburgh2006,Espinosa-Lara2007,Espinosa-Lara2013,Yasutake:2015,Yasutake:2016,Fujisawa:2015}).

Based on the above Eulerian formulation of rotating stars,
many authors have attempted to describe rotating PNSs
~(\citet{Goussard:1996dp,Goussard:1997bn,Sumiyoshi1999,Strobel:1999vn,Villain:2003ey,Camelio:2016fan}).
Thanks to sophistication of numerical relativity
with the rapid increase in computational power,
on the other hand,
some groups have started to use dynamical simulations~(\citet{Camelio:2019rsz,Zhou:2021upu,Fujibayashi:2021wvv})
although they are limited to rather short periods.
The dynamical simulations are put aside
and the Eulerian formulation faces
a difficulty when
applied to the evolution of rotating stars:
the angular momentum distribution \textit{in space}
is not known a priori~(see assumption (ii) above)
as a function of time even if there is no angular momentum
transfer in the star.
This is because in such a situation
the specific angular momentum is conserved
for the individual fluid element but the angular momentum distribution
in space changes in time.
This problem is automatically solved
if one employs a Lagrangian formulation
although it is highly nontrivial.
That is our core idea in this paper.

The organization of the paper is as follows.
In Sec.~\ref{sec:method}, we

present this Lagrangian formulation of our devising.
We then explain rather in detail how this formulation is implemented as a numerical scheme, since this part is actually crucial.
We describe the models constructed in this paper
to demonstrate the capability of our new method
 in Sec.~\ref{sec:model}
and show the results in Sec.~\ref{sec:result}.
Finally, we summarize our findings and give future prospects in Sec.~\ref{sec:conclusion}.
Throughout this paper, geometrized units, i.e., $c=G=1$ are used unless otherwise noted.

\section{Method}\label{sec:method}
We start with a brief review of the ordinary numerical
construction of axisymmetric rotating stars in
general relativitic gravity in e.g.~\citet{Komatsu:1989,Cook:1992,Cook:1993qj}.
Under axisymmetry and stationarity without circulation
flows\footnote{The metric ansatz for the case
with circulation flows is
discussed in \cite{Birkl:2010hc}.  In this case,
there are eight metric functions instead of four.}
the line element is given in general as
\begin{equation}
 {\rm d} s^2 = -N^{2} {\rm d} t^2
  +A^{-2}\left({\rm d} r^2 +r^2{\rm d} \theta^2\right)
  +B^{-2}r^2\sin^2\theta
  \left({\rm d}\varphi -\omega{\rm d} t\right)^2,
  \nonumber\\
\end{equation}
where $N(r,\theta), A(r,\theta), B(r,\theta), $ and $\omega(r,\theta)$
are functions of the radius and the zenith angle.
Note that the metric components are not written
in the exponential form
~(\cite{Komatsu1989b}) but in the $3+1$ style in~\cite{Bonazzola:1993}.
The matter is assumed to be a perfect fluid
and its energy momentum tensor is given as
\begin{eqnarray}
 T_{\mu\nu} = \left(\varepsilon+P\right)u_{\mu}u_{\nu} +Pg_{\mu\nu},
\end{eqnarray}
where $u^{\mu}$ is the 4-velocity and $\varepsilon \equiv \rho +\rho_{th}$
is the energy composed of the rest mass density~$\rho$ and the internal energy density~$\rho_{th}$.
The four-velocity is given as
\begin{eqnarray}
 u^{\mu}=\left(\frac{1}{N\sqrt{1-v^2}},
	  0,
	  0,
	  \frac{\Omega}{N\sqrt{1-v^2}}\right)^{T},
\end{eqnarray}
where $v=\left(\Omega-\omega\right)N^{-1}B^{-1}r\sin\theta$
and $u^{\mu}u_{\mu}=-1$.
The angular velocity observed by the Zero
Angular Momentum Observer~(ZAMO)
is denoted by $\Omega(r,\theta)$.

Four metric functions~$N(r,\theta), A(r,\theta), B(r,\theta)$
and $\omega(r,\theta)$ are determined
by solving the Einstein equation~$\displaystyle G_{\mu\nu}=8\pi T_{\mu\nu}$.
The energy-momentum conservation equation or the relativistic Euler equation is given by
$\nabla_{\nu}T_{\mu}^{\ \nu}=0$.
The explicit differential forms of all these equations are presented in App.~\ref{sec:diffeqs}.
If the matter is barotropic, i.e., its pressure depends only on the density~$P=P(\rho)$, the equation of state~(EOS) closes the system equation.
If the matter is baroclinic, i.e., the pressure depends
on another thermodynamic quantity, say the specific entropy~$s$ as $P=P(\rho,s)$\footnote{More generally, the pressure may depend on yet another thermodynamic quantity such as
the electron fraction: $P=P(\rho,s,Y_e)$.},
then the equation is augmented with the equation for energy.
One often needs to solve the radiation transport equation as well
~(\cite{Pons:1998mm}).

There is a successful strategy
 common to the methods proposed in the literatures to numerically construct general relativistic rotating stars~(see ~\cite{Paschalidis:2016vmz} for a recent review):
(i) the Einstein equation is first solved for a given matter
configuration; fixing the metric so obtained, we solve
 the Euler equation for density; replacing the matter configuration
employed in the first step with the density distribution obtained in the second step,
we iterate these two steps
until the convergence is achieved
as the self-consistent field method for Newtonian rotating stars in ~\cite{Hachisu:1986};
(ii) the Euler equation is analytically integrated in advance,
which is actually possible for
the barotropic case: $\varepsilon=\varepsilon(P)$ or $P=P(\varepsilon)$
with $F(\Omega)= u^{t}u_{\varphi}$ where $F(\Omega)$ is
an arbitrary function.
In fact, the Euler equation under those assumptions:
\begin{eqnarray}
 \frac{1}{\varepsilon+P}{\rm d} P -{\rm d} \ln u^{t} +u^{t}u_{\varphi}{\rm d}\Omega = 0,\label{eq:Euler}
\end{eqnarray}
leads to the first integral as follows:
\begin{eqnarray}
 \mathcal{H}(P) -\ln u^{t} +\mathcal{F}(\Omega) = \mathcal{C},
\end{eqnarray}
where $\mathcal{H}$ and $\mathcal{F}$ are given as
\begin{eqnarray}
 \mathcal{H}(P) \equiv \int^{P} \frac{{\rm d} P'}{\varepsilon(P')+P'},\quad
  \mathcal{F}(\Omega) \equiv \int^{\Omega}F(\Omega'){\rm d}\Omega',
\end{eqnarray}
and $\mathcal{C}$ is an integration constant
and may be determined at the pole.
Although the methods based on this strategy have been
successful in the numerical construction of a rotational
configuration for a given functional form of angular velocity~$F(\Omega)$, they are not suited for the study of
secular evolutions of rotating stars.
There are two problems in fact:
firstly, these methods are in principle applicable
only to the barotropic case; secondly,
the angular velocity distribution should be given in advance,
which is normally impossible.
The latter point will be understood
if one considers the secular thermal evolution
with the specific angular momentum
being conserved in each fluid element.
In fact, the spatial distribution of the angular velocity
changes in time in this case even though
there is no angular momentum transfer.
This last point motivated us to develop a Lagrangian method
in this paper, with which such a change of the angular velocity
distribution can be automatically solved.
Note also that it is not necessary to use the first integral
in our formulation~(see
\ref{eq:Euler_r} and \ref{eq:Euler_th}).

\subsection{Lagrangian method}
In the Eulerian formulation, one first introduces
the coordinates
rather arbitrarily according to the convenience
in their applications; once chosen,
they are unchanged; we then solve the
density(or pressure)
and the metric functions of the coordinates so that
they should satisfy the Euler equation
and the Einstein equation, respectively.
As mentioned earlier,
the angular velocity profile, or equivalently the angular
momentum distribution should be given as input
normally.
It is also mentioned that
the mass and angular momentum
that characterizes a rotational star are normally obtained
only after the solution is obtained.

In sharp contrast, in the Lagrangian formulation we solve the Euler
equation to obrain the coordinates,
which are attached to fluid elements.
More specifically, assigning the mass, specific angular momentum
and specific entropy to each fluid element\footnote{The specific angular momentum and specific entropy hence regarded as functions of fluid elements. We may also give the electron fraction~$Y_e$.},
we will look for the positions of fluid elements that satisfy
the Euler equation.  In so doing,
the density is a functional of the coordinate configurations.
The pressure at each fluid element is derived with the equation
of state once the density is known there as the specific entropy
is also known \textit{a priori}.
The spatial distribution of the angular velocity,
or equivalently the angular momentum, is obtained
once the coordinate configuration is determined.
It should be apparent that the mass and angular momentum
are automatically conserved in this formulation.
In the following we will explain more in detail
how these procedures are realized and implemented
in the numerical construction of rotating stars.

\subsubsection{Density in a Finite Element}
\begin{figure}
 \psfrag{x}{$x$}
 \psfrag{z}{$z$}
 \psfrag{r11}{\small \hspace{-5mm}$(r_{11},\theta_{11})$}
 \psfrag{r12}{\small \hspace{0mm}$(r_{12},\theta_{12})$}
 \psfrag{r13}{\small \hspace{0mm}$(r_{13},\theta_{13})$}
 \psfrag{r14}{\small \vspace{-5mm}$(r_{14},\theta_{14})$}
 \psfrag{r21}{\small \hspace{0mm}$(r_{21},\theta_{21})$}
 \psfrag{r22}{\small \vspace{5mm}$(r_{22},\theta_{22})$}
 \psfrag{r23}{\small \hspace{0mm}$(r_{23},\theta_{23})$}
 \psfrag{r24}{\small \hspace{-3mm}$(r_{24},\theta_{24})$}
 \psfrag{rho11}{\small \hspace{0mm}$\boxed{\bar\rho_{11}}$}
 \psfrag{rho12}{\small \hspace{0mm}$\boxed{\bar\rho_{12}}$}
 \psfrag{rho13}{\small \hspace{0mm}$\boxed{\bar\rho_{13}}$}
 \psfrag{rho21}{\small \hspace{0mm}$\boxed{\bar\rho_{21}}$}
 \psfrag{rho22}{\small \hspace{0mm}$\boxed{\bar\rho_{22}}$}
 \psfrag{rho23}{\small \hspace{0mm}$\boxed{\bar\rho_{23}}$}
 \includegraphics[width=7.5cm]{Figs/def_FE2.eps}
 \caption{Schematic picture of finite elements.
 The circles denote the Lagrange nodes
 and the evaluation point for the Euler equation.
 Other physical variables are defined at the crosses
 and the Einstein equation is solved there.
 }
 \label{fig:def_FE}
\end{figure}
In our brand new Lagrangian formulation of
axisymmetric stars in permanent rotation,
the starting point is to express the density
in terms of the coordinates configuration.
For its numerical realization on the finite-elements~(FEs),
we approximate each fluid element in the meridian section by
a quadrilateral FE and assign
mass~$\Delta m$, specific angular momentum~$\Delta j$, specific entropy~$\Delta s$,
and electron fraction~$\Delta Y_e$, etc.
The configuration of FE is specified by the coordinates~$(x_{jk}, y_{jk})$, or specifically $(r_{jk},\theta_{jk})$ in axisymmetric stars, of its four corners
as shown in Fig.~\ref{fig:def_FE}
and its area may be calculated conveniently with the isoparametric
formulation as follows~(see, e.g., \cite{bathe2006finite}).
In this formulation, we
introduce the natural coordinates~$(\alpha,\beta)$,
 $-1\ge \alpha, \beta \ge 1$, which specify an arbitrary point
in the FE as
\begin{eqnarray}
 x(\alpha,\beta) &=& \sum_{j=1}^{2}\sum_{k=1}^{2}
  \hat{N}_{j}(\alpha)\hat{N}_{k}(\beta)x_{jk},\nonumber\\
 y(\alpha,\beta) &=& \sum_{j=1}^{2}\sum_{k=1}^{2}
  \hat{N}_{j}(\alpha)\hat{N}_{k}(\beta)y_{jk},\label{eq:map_FE1}
\end{eqnarray}
where $\hat{N}_{j} (j=1,2)$ are called the shape function;
$x_{jk}$ and $y_{jk}$ are the original coordinates
at the four corners.
Equation~\eqref{eq:map_FE1} is actually an interpolation
formula and the linear shape functions are given as
\begin{eqnarray}
  \hat{N}_{1}(\alpha) = \frac{1-\alpha}{2},\quad
  \hat{N}_{2}(\alpha) = \frac{1+\alpha}{2}.
\end{eqnarray}
In App.~\ref{sec:isoparametric},
we explain the basic idea underlying this formulation.
The coordinate transformation from $(x,y)$ to $(\alpha,\beta)$
is characterized by
the Jacobian matrix
\begin{eqnarray}
 J =
   \begin{pmatrix}
    \displaystyle \frac{\partial x}{\partial \alpha} &
    \displaystyle \frac{\partial y}{\partial \alpha}\\
    & \\
    \displaystyle \frac{\partial x}{\partial \beta} &
    \displaystyle \frac{\partial y}{\partial \beta}
   \end{pmatrix}.
\end{eqnarray}
For instance, the elements of which are given as
\begin{eqnarray}
 \frac{\partial x}{\partial \alpha} =  \sum_{j=1}^{2}\sum_{k=1}^{2}
  \frac{{\rm d} \hat{N}_{j}}{{\rm d} \alpha}(\alpha)\hat{N}_{k}(\beta)x_{jk}.
\end{eqnarray}
Adopting $x_{jk}=r_{jk}^3/3$ and $y_{jk}=\cos\theta_{jk}$
in the current case,
we define the volume of the FE in the flat space as
\begin{eqnarray}
 \Delta V = 2\pi |\det J|.
\end{eqnarray}
By accounting for the curvature of the space,
 the baryonic density for the FE is given by

\begin{eqnarray}
 \bar{\rho} = \frac{\Delta m}{\sqrt{-g}\Delta V},
  \label{eq:density_def}
\end{eqnarray}
where the $g$ is the determinant of the spacetime metric.
Since we evaluate the Einstein equation at each
cell boundary as marked with crosses in Fig.~\ref{fig:def_FE},
we need the densities at these boundaries.
In this paper, they are given as a simple arithmetic mean
of the densities for the adjascent FEs as
$\rho_{jk} \equiv \left(\bar{\rho}_{jk} + \bar{\rho}_{jk-1}\right)/2$.
Note again that the density itself is the variable to be solved
in the Eulerian formulation, whereas
the coordinates are to be solved
in the Lagrangian formulation.

\subsubsection{Isoparametric interpolation and differentiation}
In order to solve the Einstein and Euler equations in their differential forms, Eqs.~\eqref{eq:Euler_r}-\eqref{eq:Etph}, in the Lagrangian formulation,
we need to evaluate not only the values of variables but also their derivatives at an arbitrary position.
It is not a difficult task in the FE description.
Since we need to evaluate second-order derivatives in the
Einstein equation, we employ the second-order interpolation,
in which we use quadratic shape functions
and not the values of four but nine nearby points.
Then the coordinates are expressed in terms of the natural coordinates~$\alpha$ and $\beta$ as
\begin{eqnarray}
 x(\alpha,\beta) &=& \sum_{j=1}^{3}\sum_{k=1}^{3}
  \hat{M}_{j}(\alpha)\hat{M}_{k}(\beta)x_{jk},\label{eq:xiso}\\
 y(\alpha,\beta) &=& \sum_{j=1}^{3}\sum_{k=1}^{3}
  \hat{M}_{j}(\alpha)\hat{M}_{k}(\beta)y_{jk},\label{eq:yiso}\
\end{eqnarray}
where the shape functions are given by
\begin{eqnarray}
  \hat{M}_{1}(\alpha) &=& -\frac{\alpha}{2}(1-\alpha),\nonumber\\
  \hat{M}_{2}(\alpha) &=& (1+\alpha)(1-\alpha),\nonumber\\
  \hat{M}_{3}(\alpha) &=& \frac{\alpha}{2}(1+\alpha).
\end{eqnarray}
We expand any function~$\phi(x(\alpha,\beta),y(\alpha,\beta))$
with the same shape functions as
\begin{eqnarray}
 \phi (\alpha,\beta) &=& \sum_{j=1}^{3}\sum_{k=1}^{3}
  \hat{M}_{j}(\alpha)\hat{M}_{k}(\beta)\phi_{jk}.
\label{eq:fiso}
\end{eqnarray}
It is straightforward to evaluate the derivatives of such a function
with the derivatives of the shape functions:
\begin{eqnarray}
 \frac{{\rm d}\hat{M}_{1}}{{\rm d} \alpha}(\alpha)
  &=& -\frac{1}{2} +\alpha,\nonumber\\
 \frac{{\rm d}\hat{M}_{2}}{{\rm d} \alpha}(\alpha)
  &=& -2\alpha,\nonumber\\
 \frac{{\rm d}\hat{M}_{3}}{{\rm d} \alpha}(\alpha)
  &=& \frac{1}{2} +\alpha.
\end{eqnarray}
For instance, the first derivative with respect to $x$ can be obtained at any point as
\begin{eqnarray}
 \frac{\partial \phi}{\partial x}
 &=& \sum_{j,k=1}^{3}
 \left\{ \frac{\partial\alpha}{\partial x}\frac{{\rm d} \hat{M}_{j}}{{\rm d} \alpha}\hat{M}_{k}
  +\frac{\partial\beta}{\partial x}\hat{M}_{j}\frac{{\rm d} \hat{M}_{k}}{{\rm d} \beta}
 \right\}\phi_{jk},
\end{eqnarray}
where the coefficients~$\displaystyle\frac{\partial\alpha}{\partial x}$
and~$\displaystyle\frac{\partial\beta}{\partial x}$ are
computed straightforwardly from Eq.~\eqref{eq:xiso}
as the coefficients of the inverse of the Jacobian matrix:
\begin{eqnarray}
 J^{-1} =
   \begin{pmatrix}
    \displaystyle \frac{\partial \alpha}{\partial x} &
    \displaystyle \frac{\partial \beta}{\partial x}\\
    & \\
    \displaystyle \frac{\partial \beta}{\partial y} &
    \displaystyle \frac{\partial \alpha}{\partial y}
   \end{pmatrix}
   =
   \frac{1}{\det J}
   \begin{pmatrix}
    \displaystyle \frac{\partial y}{\partial \beta} &
    \displaystyle -\frac{\partial y}{\partial \alpha}\\
    & \\
    \displaystyle -\frac{\partial x}{\partial \beta} &
    \displaystyle \frac{\partial x}{\partial \alpha}
   \end{pmatrix}.
\end{eqnarray}

\subsubsection{Angular momentum}
There are different definitions of specific angular momentum
employed in the literature.
For example, in the stationary and axisymmetric spacetime,
the following specific angular momentum~$\ell$ is introduced:
\begin{eqnarray}
 \label{eq:lmom}
 \ell = -\frac{u_{\varphi}}{u_t}
 = \frac{\left(\Omega-\omega\right) r^2\sin^2\theta}
 {N^2B^2+\omega\left(\Omega-\omega\right)r^2\sin^2\theta},
\end{eqnarray}
which is conserved along a stream line~(\cite{Birkl:2010hc}).
EoM, which can be written as
\begin{eqnarray}

 \nabla^{\nu} T_{\mu\nu} &=&
  u^{\nu}\nabla_{\nu}\left[\left(\varepsilon+P\right)u_{\mu}\right]
  +\left(\varepsilon+P\right)u_{\mu}\nabla_{\nu}u^{\nu} +\nabla_{\mu}P
  \nonumber\\
 &=&
  u^{\nu}\nabla_{\nu}\left[\frac{\left(\varepsilon+P\right)}{\rho}u_{\mu}\rho\right]
  -\frac{\left(\varepsilon+P\right)}{\rho}u_{\mu}u^{\nu}\nabla_{\nu}\rho +\nabla_{\mu}P\nonumber\\
&=& \rho u^{\nu}\nabla_{\nu}\left[\frac{\left(\varepsilon+P\right)}{\rho}u_{\mu}\right]
  +\nabla_{\mu}P = 0,
\end{eqnarray}
where the continuity equation is substituted, i.e.
~$\rho\nabla_{\nu}u^{\nu} = -u^{\nu}\nabla_{\nu}\rho$,
one finds for the spacetime with the asymptotically
timelike and axial Killing vectors
there are actually two quantities conserved along each stream line:
\begin{eqnarray}
 j_{t} = \frac{\varepsilon+P}{\rho} u_{t}\quad \mathrm{and}\quad
 j_{\varphi} = \frac{\varepsilon+P}{\rho} u_{\varphi}.
\end{eqnarray}
The specific angular momentum defined in Eq.~\eqref{eq:lmom}
is nothing but
the ratio of these two:~$\ell=-j_{\varphi}/j_{t}$
Since we are interested in the formulation that
can be applied to the evolution of rotating stars,
the existence of the timeline Killing vector cannot be assumed.
It should be noted that $j_{\varphi}$ is still conserved
along the stream line even in this case
as long as the spacetime is axisymmetric.
We will hence employ this specific angular momentum
and assume that it is conserved for each fluid element
unless some mechanism to exchange angular momenta
between fluid elements is in operation.
Note, however, that
the specific angular momentum~$\ell$ is still very convenient
from numerical point of view.
In fact, it is simple
to convert $\ell$
to the angular velocity~$\Omega$
\begin{eqnarray}
 F\left(\Omega\right) = u^tu_{\varphi} = \frac{\ell}{1-\Omega\ell},
  \label{eq:Fomegaell}
\end{eqnarray}
where $u_{\mu}u^{\mu}=-1$ and $u^{\varphi}=\Omega u^{t}$.

\subsection{Diagnostics}
The following
 global quantities are useful for characterizing
rotational equilibria.
Following ~(\citet{Cook:1992,Nozawa1998,Paschalidis:2016vmz}), we define
the baryon mass, proper mass and gravitational mass, respectively, as
\begin{eqnarray}
 M_b &=& 2\pi\int \frac{\rho }{A^2B\sqrt{1-v^2}}
  r^2\sin\theta{\rm d} r{\rm d}\theta,\\
 M_p &=& 2\pi\int \frac{\epsilon}{A^2B\sqrt{1-v^2}}
  r^2\sin\theta{\rm d} r{\rm d}\theta,\\
 M &=& 2\pi\int \frac{1}{A^2B^2}
  \left[ NB\left\{ \frac{\left(\epsilon  +P\right)\left(1+v^2\right)}{\left(1-v^2\right)}
			+2P\right\}\right.\nonumber\\
&&\left. \quad\quad\quad\quad\quad  +2rv\omega\sin\theta \frac{\left(\epsilon +P\right)}{1-v^2}
  \right] r^2\sin\theta{\rm d} r{\rm d}\theta.
\end{eqnarray}
On the other hand, the quantities employed to measure how fast the rotation is are
the total angular momentum, rotational energy
and gravitational energy, respectively, as
\begin{eqnarray}
 J &=& 2\pi\int \frac{\left(\epsilon +P\right)v}{A^2B^2\left(1-v^2\right)}
  r^3\sin^2\theta{\rm d} r{\rm d}\theta,\\
 T &=& 2\pi\int \frac{\left(\epsilon +P\right)v\Omega}{A^2B^2\left(1-v^2\right)}
  r^3\sin^2\theta{\rm d} r{\rm d}\theta,\\
 W &=& M_p +T -M.
\end{eqnarray}
\subsubsection{Isoparametric integration}
The integrations above are evaluated in each FE
and summed as follows:
\begin{eqnarray}
 S &\equiv& \int\!\!\!\!\int\!\!\! \phi(x,y){\rm d} x{\rm d} y
  = \int\!\!\!\!\int\!\!\! \phi\left(x(\alpha,\beta),y(\alpha,\beta)\right)
  |\det J|{\rm d}\alpha{\rm d}\beta\nonumber\\
 &=& \int\!\!\!\!\int\!\!\! \phi
  \left|\frac{\partial x}{\partial\alpha}\frac{\partial y}{\partial\beta}
  -\frac{\partial x}{\partial\beta}\frac{\partial y}{\partial\alpha}\right|
  {\rm d}\alpha{\rm d}\beta\nonumber\\
 &=& \sum_{i,j,k,l,m,n}^{2}\!\!\!\!\!\!
  \frac{\phi_{ij} x_{kl} y_{mn}}{4}\left|(-1)^{k+n}\mathcal{N}_{im}\mathcal{N}_{jl}
	      -(-1)^{m+l}\mathcal{N}_{ik}\mathcal{N}_{jn}
	     \right|,\nonumber\\
\end{eqnarray}
where the shape functions are analytically integrated
 over the ranges $-1\leq \alpha \leq 1$
 and $-1\leq \beta \leq 1$ in advance as
\begin{eqnarray}
 \mathcal{N}_{ij} = \frac{1}{6}
 \begin{pmatrix}
  1 & 2\\
  2 & 1
 \end{pmatrix}.
\end{eqnarray}

\subsection{Strategy to solve the system}
To solve the whole system, we adopt the traditional iterative scheme~(\citealp{Hachisu:1986,Komatsu:1989}).
Specifically, it consists of two parts:
(i) solving the Einstein equation, Eqs.~\eqref{eq:Ett}-\eqref{eq:Etph}, with the matter quantities unchanged
and (ii) solving the Euler equation, Eqs.~\eqref{eq:Euler_r}
 and~\eqref{eq:Euler_th}, with the metric functions fixed.
Both equations in their differential forms are
discretized on the FE grid and the resultant nonlinear
algebraic equations are solved alternately
until the changes in the solutions for
both equations become smaller than certain values.
As may be understood from the fact that many efforts have been made to
choose a nice set of equations even in the Eulerian formulation,
these nonlinear equations are difficult to solve and,
it turns out,
the original Newton-Raphson method does not work for our equations.

In order to tackle this problem, we deploy two new schemes
of our own devising:
(i) for the Einstein equation,
the W4IX method is applied;
as described in App.~\ref{app:W4IX},
it is an extension of the original W4 method
and requires only $\mathcal{O}(N^2)$ calculations to obtain a solution, in contrast to $\mathcal{O}(N^3)$
operations in
 the original W4 method with either the UL or LH decomposition
~(see \citet{Okawa:2018smx,Fujisawa:2018dnh} for details);
(ii) for the Euler equation on the other hand,
we find that a particular iteration scheme dubbed
the slice shooting is very powerful to obtain convergence;
as demonstrated
in App.~\ref{app:sliceshooting},
the Jacobian matrix for the nonlinear force-balance equations
in the $\theta$-direction is especially ill-conditioned
as the size of the matrix becomes bigger;
we find it better to solve
a single radial slice at a time
with all the other slices fixed;
we repeat this for all the slices, starting from the axis,
proceeding to the equator and going back to the axis;
this cycle is repeated until the convergence is obtained
globally.

These two schemes turn out to be very successful.
They are robust and also efficient and actually the key
ingredients of our new formulation.

\section{Models}\label{sec:model}
In this section, we describe some models we employ in this paper
to demonstrate the capability of our new method.
As explained already, in this formulation
we first assign
the mass and specific angular momentum
to the grid points and
find their configuration
that satisfies the Euler equation, or
force-balance equations,
as well as the spacetime metric that is consistent with the matter
distribution by solving the Einstein equation.
The spatial profiles of the density
and angular velocity, respectively,
are obtained from Eqs.~\eqref{eq:density_def} and~\eqref{eq:lmom},
respectively,
 after the equilibrium configurations of
the matter and spacetime are derived.
Having an application to PNSs in mind,
we also allocate the electron fraction to the Lagrange grid points.

The ultimate goal of this project is to
study secular evolutions of relativistic rotating stars.
The models are hence divided into two groups:
\begin{itemize}
 \item Stationary rotating stars constructed either
       with a barotropic EOS or with a baroclinic EOS
       and their accuracies investigated closely with a couple of
       diagnostic quantities; a comparison made with an Eulerian code,
 \item mock evolutionary sequences of rotating stars
       considered for some scenarios:
       cooling, mass-loss, and mass-accretion;
       they are meant for demonstrations.
\end{itemize}
Each model is described more in detail below.

\subsection{Stationary models}
Here we adopt the so-called $j-$const law~(\citealp{Komatsu1989b}).
This is actually the easiest case for our formulation,
in which the specific angular momentum is assigned
to the grid points and fixed.
Then the angular velocity profile is derived
after the equilibrium configuration is obtained.

We begin with a barotropic EOS. In this case,
as mentioned in introduction,
we analytically obtain a first integral of the Euler equation,
which gives for the present case the relation
 that the angular velocity should satisfy as
\begin{eqnarray}
 F(\Omega) &\equiv& u^{t}u_{\varphi}\nonumber\\
 &=& A_c^2(\Omega_c-\Omega) =
  \frac{(\Omega-\omega)r^2\sin^2\theta }
  {N^2B^2-(\Omega-\omega)^2r^2\sin^2\theta },\nonumber\\
 \label{eq:law_diffrot}
\end{eqnarray}
where $A_c$ and $\Omega_c$ are constants.
Once the metric functions are obtained,
we can derive the angular velocity as a function of
$r$ and $\theta$,
which should be compared with the profile derived directly
from the equilibrium configuration.
Note that this relation is reduced to
a cylindrical rotation law in the non-relativistic limit.

As mentioned repeatedly, our new formulation
can accommodate any EOS,
which may depend not only on density and entropy
but also on other quantities
such as electron fraction and mass fractions of various nuclei.
In this paper, we employ a polytropic type of EOS for simplicity:
\begin{eqnarray}
 P(\rho, s(r,\theta)) = K(r,\theta) \rho^{1+\frac{1}{N}},
  \label{eq:eos}
\end{eqnarray}
where $N$ is the polytropic index;
note that $K$, which is normally a constant and is a function of
entropy, is assumed here to be a function of $r$ and $\theta$ as

\begin{eqnarray}
 K(r,\theta) \equiv \hat{K}\left(K_0
			+\epsilon_1\frac{r^2}{R_e^2}\sin^2\theta
			+\epsilon_2\frac{r^2}{R_e^2}\cos^2\theta
			+\epsilon_3\frac{r^2-R_e^2}{R_e^2}
		       \right),
  \label{eq:eosK}
\end{eqnarray}
where $R_e$ is the equatorial surface radius of the star;
$K_0, \epsilon_1, \epsilon_2, \epsilon_3$ are constants.
The polytropic index is set to $N=1$ in the following.
For the stationary models, we set $K_0=1$ as well.
Note that we use the geometrical unit~$c=G=1$
and put $\hat{K}=1$
in actual calculations following~(\cite{Cook:1992}).

It should be apparent that
the baroclinicity is introduced by the non-constancy of $K$
in this EOS. In fact
we set all $\epsilon$'s to $0$ for the barotropic case above.
In the baroclinic case, we solve the Einstein and Euler equations
keeping the specific angular momentum attached to grid points
 the same as that of the reference model.
We have to update the value of $K$
at each grid point according to its current position
 and Eq.~\eqref{eq:eos}.

\begin{figure*}
 \begin{tabular}{cc}
  \includegraphics[width=7.cm]{./Figs/codeRELUME.eps} &
  \includegraphics[width=7.cm]{./Figs/codeRNS.eps}\\
  (a) & (b)
 \end{tabular}
 \caption{Density contour of the uniformly rotatng star
 computed (a) by our new code
 and (b) by RNS code.}
\label{fig:comparison}
\end{figure*}
\begin{table*}
\centering
\begin{tabular}{cccccc}
 Code & $N_r\times N_{\theta}$ & $\rho_c$ & $r_p/r_e$ & $M$ & $M_b$\\\hline
 our code & $32\times 17$ & $0.0562$ & $0.874$ & $0.0958$ & $0.100$\\
 RNS code & $65\times 129$ & $0.0562$ & $0.870$ & $0.0967$ & $0.101$
\\\hline
\end{tabular}
 \caption{Parameters for comparison with the public RNS code by \citet{Stergioulas1995}.}
 \label{table:comparison}
\end{table*}

\subsection{Evolutionary models}
In its real evolution, the PNS cools
down through neutrino emissions
and experiences a sequence of quasi-equilibrium
during a period of about a minute.
If it rotates as normally expected,
these are rotational equilibria with different thermal
and lepton contents but with the same specific
angular momentum if the angular momentum transfer is negligible.
To understand such secular evolutions of PNS,
it is necessary to construct a series of configurations
of rotational equilibria and to compute
the neutrino transfer on top of them.
The main aim of this paper is to
provide a new numerical tool to treat the first step,
i.e., the building of a sequence of rotational equilibria that
are supposed to represent the secular evolution
of the rotating PNS.
The purpose of the models considered here is to
demonstrate the capability of our new Lagrangian formulation
in full general relativity with some mock evolutions.
The application of the method to more realistic evolutions is currently underway and will be presented elsewhere in the near future.

For the mock evolutions,
we consider the following three scenarios.
We stress that in our formulation we need to give an
angular velocity distribution
only at the beginning of each sequence and
it is automatically derived thereafter
during the evolution\footnote{We need to specify the specific angular momentum of accreting matter in scenario~(iii).}.

\begin{enumerate}
 \item \underline{Cooling model}:
The first model is intended to mimic
       a cooling evolution by the neutrino emission,
in which the PNS shrinks as the thermal energy is carried away by
neutrinos.
       In realistic simulations~(\citet{Pons:1998mm,Villain:2003ey}), we need to calculate the entropy~(and electron fraction) evolution with the neutrino transfer.
       For the demonstrative purpose here,
       it suffices to prescribe the time-dependence of
$K$ in the Polytropic EOS by hand so that
it should mimic the cooling.
 \item \underline{Wind model}:
       The second model is to mimic the evolution
of a rotating star via the mass-loss from the surface as a wind.

The neutrino-driven wind from the PNS has been considered in~\citet{Meyer:1992zz,Witti:1992fn,Woosley:1994ux,Otsuki:1999kb,Sumiyoshi:1999rh,Terasawa:2001wn,Wanajo:2001pu,Panov:2008tr}.
 Such a stellar wind carries not only mass but also angular momentum.
In this toy model,
we emulate the mass-loss process by
taking a certain fraction of mass and angular momentum
away from the grid points near the stellar surface
at a certain rate.

 \item \underline{Accretion model}:
       In the third model, we consider the evolution
induced by the accretion of matter,
the process opposite to the one in model~(ii).
       Recent core-collapse supernova simulations~(e.g.~\citet{Muller:2018utr,Burrows2019,Nakamura:2019snn,Janka:2021deg}) indicate that
asymmetric accretion flows continue to exist
for a few seconds after the revival of a stalled shock wave
 and may affect the angular momentum of PNS
~(\citet{Blondin2007,Fernandez2010,Wongwathanarat:2012zp,Guilet:2013bxa,Kazeroni:2017fup}).
 In this model, we simply increase the masses
and angular momenta of the grid points near the surface
at a certain rate, to consider the spin-up evolution of PNS.

\end{enumerate}

\begin{table*}
\centering
\begin{tabular}{cccccccc}
 Model & Number of Grids($N_r\times N_{\theta}$)
 & $R_p/R_e$ & $M_b$ & $M$ & $J$ & $T/|W|$ & GRV \\\hline
Reference & $32\times 17$ & $0.893$ & $0.0999$ & $0.0961$ & $3.91\times 10^{-3}$
 & $6.02\times 10^{-2}$ & $0.976\times 10^{-3}$ \\
Middle-Resolution & $16\times 9$ & $0.891$ & $0.0999$ & $0.0958$ & $3.77\times 10^{-3}$
 & $5.61\times 10^{-2}$ & $4.51\times 10^{-2}$ \\
Low-Resolution & $8\times 5$ & $0.885$ & $0.0986$ & $0.0950$ & $1.93\times 10^{-3}$
 & $3.66\times 10^{-2}$ & $1.22\times 10^{-1}$ \\
EOS-a  & $32\times 17$ & $0.874$ & $0.0994$ & $0.0946$ & $3.95\times 10^{-3}$
 & $5.14\times 10^{-2}$ & $2.07\times 10^{-3}$ \\
EOS-b  & $32\times 17$ & $0.911$ & $0.100$ & $0.0956$ & $3.87\times 10^{-3}$
 & $5.34\times 10^{-2}$ & $3.78\times 10^{-3}$ \\
EOS-c  & $32\times 17$ & $0.894$ & $0.0999$ & $0.0954$ & $3.91\times 10^{-3}$
 & $5.32\times 10^{-2}$ & $2.91\times 10^{-3}$ \\
Middle-Rotation  & $32\times 17$ & $0.812$ & $0.0997$ & $0.0951$ & $5.79\times 10^{-3}$
 & $9.88\times 10^{-2}$ & $6.75\times 10^{-3}$ \\
Cooling  & $32\times 17$ & $0.895$ & $0.0989$ & $0.0955$ & $3.85\times 10^{-3}$
 & $6.47\times 10^{-2}$ & $8.02\times 10^{-3}$ \\
Wind  & $32\times 17$ & $0.890$ & $0.0980$ & $0.0943$ & $3.80\times 10^{-3}$
 & $5.90\times 10^{-2}$ & $7.27\times 10^{-3}$ \\
Accretion  & $32\times 17$ & $0.895$ & $0.102$ & $0.0981$ & $4.22\times 10^{-3}$
 & $6.71\times 10^{-2}$ & $4.74\times 10^{-3}$
\end{tabular}
 \caption{
 List of models:
 The first column shows the model name.
 The second corresponds to the number of grid points,
 followed by the ratio of the polar radius to the equatorial radius of the star, the baryon mass, the gravitational mass, the total angular momentum, $T/|W|$, and relativistic Virial relation~(GRV2)
 in~\citet{Nozawa1998}.
 }
 \label{table:model}
\end{table*}

\section{Results}\label{sec:result}
In this section,
starting from the comparison of our solution with
that by the public RNS code,
we show barotropic stationary models and baroclinic stationary models, followed by the three mock evolutionary models, namely, cooling, wind, and accretion models.

\subsection{Uniformly rotating stars}
Fortunately, it is possible to directly compare
our result in the Lagrange formulation
with the solution given by the well-known public RNS code for uniformly-rotating stars~(\cite{Stergioulas1995}).
In Fig.~\ref{fig:comparison},
we show the density contour of a uniformly rotating star
(a) by our new code in the Lagrangian formulation
and (b) by the RNS code in the literature.
Since the input parameters to construct equilibrium configurations are different in the Eurelian and Lagrangian formulations,
we finetune those parameters to obtain almost the same rotating star as possible as we can,
which the global quantities are compared in Table~\ref{table:comparison}.
Note also that the relativistic Virial relation of our solution
is $8.94\times 10^{-3}$,
which indicates the accuracy of solutions~(\cite{Nozawa1998}).

\subsection{Stationary models with barotropic EOS}
\begin{figure}
 \includegraphics[width=8.5cm]{./Figs/DiffRotModel.eps}
 \caption{Stationary barotropic rotating stars
 with the differential rotation law.
 The shape of the reference model with the red circles
 is compared with those of the spherical model with the green lines
 and the middle-rotation model with the black circles.
 }
 \label{fig:diffrot}
\end{figure}

\begin{figure}
 \begin{tabular}{c}
  \includegraphics[width=8.5cm]{./Figs/ResolutionTest.eps}\\
  (a)
\\  \includegraphics[width=8.5cm]{./Figs/ResolutionTest_surface.eps}\\
  (b)
 \end{tabular}
 \caption{(a) Shape of the rotating stars
 in the reference model with different
 resolutions. The lowest, middle and highest solutions are
 displayed with the green crosses,
 the red open circles, and the black filled circles.
 (b) Surface radii as a function of the number of radial meshes.
 The polar radii are shown by the purple squares,
 while the equatorial radii are shown by the red triangles,
 which are fitted by $R=\alpha N_r^{-\beta} +\gamma$ curves.}
 \label{fig:resolution}
\end{figure}
We first focus on the barotropic rotating stars with $\epsilon_1=\epsilon_2=\epsilon_3=0$ and the EOS described in Eq.~\eqref{eq:eos}.
As the angular velocity is faster,
the star is oblater.
In Fig.~\ref{fig:diffrot},
the spherical and middle-rotation models are compared
with the reference model.
Furthermore, the resolution dependence is investigated in Fig.~\ref{fig:resolution}.
The solution converges as the resolution increases.
As shown in Fig.~\ref{fig:resolution}~(b),
the convergence order is 1.5, which is
expected because we employ the first-order FE scheme to calculate the baryon density while we use the second-order FE scheme to evaluate the derivatives.
In this work, we adopt the model with $N_r\times N_{\theta}=32\times 17$ as the reference model for other computations.
Note that our solutions with the resolution~$(N_r\times N_{\theta}=32\times 17)$
 typically has the Virial relation of $\mathcal{O}(10^{-3})$
 in Table~\ref{table:model}.

\subsection{Stationary models with baroclinic EOS}
Next, we investigate the effect of the baroclinicity on the equilibrium configuration of rotating stars.
In Fig.~\ref{fig:baroclinic}, we observe the baroclinic feature,
which is the misalignment between the pressure and density gradients
as Figs.~\ref{fig:baroclinic}~(b), (d) and (f).
To clearly see the difference between the barotropic and baroclinic models, we show the angular velocity as a function of the specific angular momentum in
Figs.~\ref{fig:baroclinic}~(a), (c) and (e) as shown in~\cite{Camelio:2019rsz}.
Isentropic rotating stars in general relativity
satisfy the condition that
is expressed as the black solid line by $\ell = \ell(\Omega)$
from Eqs.~\eqref{eq:Fomegaell} and~\eqref{eq:law_diffrot}.
Although a type of shellular rotation has been considered
as the initial rotation in core-collapse
supernova simulations~(e.g.~\citet{Yamada:1994,Harada:2018ubo,Iwakami:2021pwo}), the self-consistent stationary solutions
with baroclinicity have been
obtained only in the Newtonian gravity
so far~(\citet{Roxburgh2006,Fujisawa:2015}).
We first obtain such a self-consistent stationary solution
with baroclinicity in general relativity
in Fig.~\ref{fig:baroclinic}~(d).
Since the model~(EOS-c) does not satisfy
the H{\o}iland criterion in the Newtonian limit
and may be dynamically unstable~(\cite{Tassoul:1978}),
we leave the detailed investigation on the dynamical stability
for baroclinic rotating stars in the future study.

\begin{figure*}
\begin{tabular}{cc}
 \includegraphics[width=8.5cm]{./Figs/Comp_Baroclinic_model1.eps} &
 \includegraphics[width=8.5cm]{./Figs/Baroclinic_eos1.eps}\\
 (a) $\Omega$ and $\ell$ of the model EOS-a &
     \begin{minipage}{0.5\textwidth}
      (b) Model EOS-a. (Left) Contours of pressure and density
      and (Right) color map of $K$
      and contour of $\Omega$
     \end{minipage} \\
 \includegraphics[width=8.5cm]{./Figs/Comp_Baroclinic_model2.eps} &
 \includegraphics[width=8.5cm]{./Figs/Baroclinic_eos2.eps} \\
 (c) $\Omega$ and $\ell$ of the model EOS-b &
     \begin{minipage}{0.5\textwidth}
      (d) Model EOS-b. (Left) Contours of pressure and density
      and (Right) color map of $K$
      and contour of $\Omega$
     \end{minipage} \\
 \includegraphics[width=8.5cm]{./Figs/Comp_Baroclinic_model3.eps} &
 \includegraphics[width=8.5cm]{./Figs/Baroclinic_eos3.eps} \\
 (e) $\Omega$ and $\ell$ of the model EOS-c &
     \begin{minipage}{0.5\textwidth}
      (f) Model EOS-c (Left) Contours of pressure and density
      and (Right) color map of $K$
      and contour of $\Omega$
     \end{minipage}
\end{tabular}
 \caption{Baroclinic rotating stars in general relativity.  The top, middle and bottom panels are the results of
the model EOS-a ($\epsilon_1=0.15, \epsilon_2=\epsilon_3=0$),
EOS-b ($\epsilon_2=0.15, \epsilon_3=\epsilon_1=0$)
 and EOS-c ($\epsilon_3=0.05, \epsilon_1=\epsilon_2=0$)
 in the entropy configuration, i.e., Eq.~\eqref{eq:eosK}, respectively.
 The left column shows the angular velocity as a function of the angular momentum of baroclinic rotating stars
and that of barotropic ones shown by the black line.
The right column displays the misalignment between the density~(dashed)
 and pressure~(solid) contours in the left panel, which directly indicates the baroclinicity.
In the right panel of the right column,
the color map of $K(r,\theta)$ is shown as well as
the contour of angular velocity.
 }
 \label{fig:baroclinic}
\end{figure*}

\subsection{Cooling of rotating stars}
As an evolution test by cooling,
 we vary the polytropic constant~$K_0$
keeping the other parameters constant.
In Fig.~\ref{fig:coolingtest}~(a),
we compare the cooling model~($K_0=0.95$)
 with the reference model~($K_0=1$).
Rotating stars shrink for nonlinear balance equations between the pressure and the gravity to be satisfied.
We emphasize that we do not impose any rotational law explicitly but keep the specific angular momentum~$j_{\varphi}$ of each FE.
As mentioned, barotropic rotating stars satisfy
the condition~$\ell=\ell(\Omega)$ between $\ell$ and $\Omega$
 for any equilibria configurations.
In fact, Fig.~\ref{fig:coolingtest}~(b) shows that the angular velocity of the cooling model as a function of the specific angular momentum is still expressed as the line, which is highly non-trivial in this Lagrangian formulation.

\subsection{Wind and accretion models}
For the wind model, we assume
the mass-loss from the outer layer of rotating stars.
Specifically, we decrease the specific masses of the outer two layers by hand as a toy model and compute a new equilibrium configuration.
For the accretion model, on the other hand,
we assume the accreting matter that is composed of both the $5\%$ mass
and angular momentum of
outer layers of rotating stars for simplicity.
By the mass-loss or accretion, the total mass
and total angular momentum are expected to change accordingly.
In Fig.~\ref{fig:masschange},
we show $T/|W|$ as a function of the mass change.

\begin{figure}
 \begin{tabular}{c}
  \includegraphics[width=8.5cm]{./Figs/Cooling_evolution.eps}\\
  (a)\\
  \includegraphics[width=8.5cm]{./Figs/Cooling_Omegalphi.eps}\\
  (b)
 \end{tabular}
 \caption{(a) Rotating stars for cooling model~($K_0=0.95$)
 compared to the reference model~($K_0=1$)
 (b) Angular velocity as a function of the specific angular momentum
 of the reference and cooling models
 }
 \label{fig:coolingtest}
\end{figure}
\begin{figure}
 \begin{tabular}{c}

  \includegraphics[width=8.5cm]{./Figs/EvolutionModel.eps

 \end{tabular}
 \caption{T/|W| as a function of the mass variation
  by the wind and accretion.
 }
 \label{fig:masschange}
\end{figure}

\section{Conclusions}\label{sec:conclusion}
We have proposed a new scheme to
construct the equilibrium configuration
of general relativistic rotating stars in the Lagrangian
formulation,
which maintains the mass and angular momentum automatically
when no angular momentum transfer exists, in contrast to the Eulerian
formulation.
We employed the traditional iterative scheme~(\cite{Hachisu:1986})
to solve the whole system derived from discretizing the Einstein and Euler equations on the finite-elements grid,
 which consists of two new schemes of our own devising:
for the Einstein equation, the W4IX method in App.~\ref{app:W4IX} is applied and
 for the Euler equation, the slice-shooting scheme is adopted in
App.~\ref{app:sliceshooting}.

Our formulation does need an angular velocity profile only at initial
and employ any equation of state.
It enables us to find the evolutionary sequence
by keeping the mass, specific angular momentum,
specific entropy, electron fraction and mass fraction of
various nuclei.
In order to demonstrate the capability of our new formulation,
we first compare our result of uniformly-rotating stars
with that given by the public RNS code~(\cite{Stergioulas1995}).
Next, we present the stationary rotating stars with
the barotropic and baroclinic equations of state.
Finally, we consider the mock evolutionary sequences
for cooling, wind and accretion as toy models
and show those results.

In this paper, we adopt simple models for finding the evolutionary sequence, since our focus is on the way of constructing the equilibrium configuration in the Lagrangian formulation.
The application of our new method to more realistic situations
is currently underway and will be presented in the near future.

\section*{Acknowledgements}

We would like to thank K-i. Maeda for helpful comments.
This work was supported by JSPS KAKENHI Grant Number
20K03951, 20K03953, 20K14512, 20H04728, 20H04742,
and by Waseda University Grant for Special Research Projects(Project Number: 2019C-640).
\section*{Data Availability}
The data underlying this paper will be available from the corresponding author on reasonable request.

\bibliographystyle{mnras}