Hi everybody
When I try to compile FlowSolve.F90 with elmerf90 under either Linux or Windows 7, I get an error about
a variable MeshChanged undefined in structure solver_t.
A look at http://www.elmerfem.org/doxygen/structt ... er__t.html
indeed confirms that it is not part of this structure.
This problem was resolved by replacing line 286 of FlowSolve.F90:
IF ( .NOT.AllocationsDone .OR. Solver % MeshChanged ) THEN
by
IF ( .NOT.AllocationsDone ) THEN
I hope this was the right thing to do.
MeshChanged undefined in solver_t [SOLVED]
-
- Site Admin
- Posts: 4825
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: MeshChanged undefined in solver_t
Hi
Are you sure that your ElmerSolver library and the FlowSolve.F90 are from the same version of the code? Usually there is no need to compile FlowSolve.F90 by hand as it is compiled with the system. There indeed is a new flag that is part of active code. The doxygen documentation unfortunately is not that fresh. Look at $SRC/fem/src/Types.F90 for the Solver_t stucture.
-Peter
Are you sure that your ElmerSolver library and the FlowSolve.F90 are from the same version of the code? Usually there is no need to compile FlowSolve.F90 by hand as it is compiled with the system. There indeed is a new flag that is part of active code. The doxygen documentation unfortunately is not that fresh. Look at $SRC/fem/src/Types.F90 for the Solver_t stucture.
-Peter
Re: MeshChanged undefined in solver_t
No, I am not sure. Under Windows 7, the .dll library files have a date modified of April 8 2020 whereas the .F90 source files have a date modified of April 17 2020 . The only reason I want to compile FlowSolve.F90 is that I need to change the continuity equation to
drho/dt +div(V*rho) = S
where S is not equal to 0 because I am dealing with plasma ions and electrons in the air. And so, apart from extra declarations, allocations , string definitions and MATC code for the .sif file, I added a line
Residual(DIM+1) = Residual(DIM+1) + SUM( NodalPlasmaDensity(1:n) * Basis(1:n) )
at the end of function FlowInsideResidual.
This might not be the right place to insert such code because I see pointers to 3 residual functions in a call to refineMesh and this call is after DefaultSolve(). And I had no intention to refine the mesh. Maybe you would care to elaborate on the proper code placement.
Thanks anyhow
drho/dt +div(V*rho) = S
where S is not equal to 0 because I am dealing with plasma ions and electrons in the air. And so, apart from extra declarations, allocations , string definitions and MATC code for the .sif file, I added a line
Residual(DIM+1) = Residual(DIM+1) + SUM( NodalPlasmaDensity(1:n) * Basis(1:n) )
at the end of function FlowInsideResidual.
This might not be the right place to insert such code because I see pointers to 3 residual functions in a call to refineMesh and this call is after DefaultSolve(). And I had no intention to refine the mesh. Maybe you would care to elaborate on the proper code placement.
Thanks anyhow
Re: MeshChanged undefined in solver_t
It is kind of incredible but the file FlowSolver.F90 I downloaded onto my Win7 laptop was corrupted !
IF ( .NOT.AllocationsDone .OR. Solver % MeshChanged ) THEN
was actually supposed to be
IF ( .NOT.AllocationsDone .OR. Solver % Mesh % Changed ) THEN
as I found out from another file FlowSolver.F90 in a Linux account at another institution.
Now it compiles right.
Deeply sorry for the false alarm.
IF ( .NOT.AllocationsDone .OR. Solver % MeshChanged ) THEN
was actually supposed to be
IF ( .NOT.AllocationsDone .OR. Solver % Mesh % Changed ) THEN
as I found out from another file FlowSolver.F90 in a Linux account at another institution.
Now it compiles right.
Deeply sorry for the false alarm.