USTAL
This commit is contained in:
@@ -111,6 +111,7 @@
|
|||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<AdditionalIncludeDirectories>./include</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "Solver.hpp"
|
#include "Solver.hpp"
|
||||||
void Solver::SolveExplicit(System& program, double tstop) const {
|
void Solver::SolveImplicit(System& program, double tstop) const {
|
||||||
std::ofstream output(filename_expl);
|
std::ofstream output(filename_impl);
|
||||||
//output << "t x y T" << std::endl;
|
//output << "t x y T" << std::endl;
|
||||||
|
|
||||||
for (double t = 0.0; t < tstop; t += delta) {
|
for (double t = 0.0; t < tstop; t += delta) {
|
||||||
@@ -50,8 +50,8 @@ void Solver::SolveExplicit(System& program, double tstop) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Solver::SolveImplicit(System& sys, double tstop) const {
|
void Solver::SolveExplicit(System& sys, double tstop) const {
|
||||||
std::ofstream output(filename_impl);
|
std::ofstream output(filename_expl);
|
||||||
//output << "t x y T" << std::endl;
|
//output << "t x y T" << std::endl;
|
||||||
|
|
||||||
for (double t = 0.; t < tstop; t += delta) {
|
for (double t = 0.; t < tstop; t += delta) {
|
||||||
@@ -66,7 +66,7 @@ void Solver::SolveImplicit(System& sys, double tstop) const {
|
|||||||
|
|
||||||
double tx = (node->r()->T() - 2 * node->T() + node->l()->T()) / pow(sys.step(), 2);
|
double tx = (node->r()->T() - 2 * node->T() + node->l()->T()) / pow(sys.step(), 2);
|
||||||
double ty = (node->u()->T() - 2 * node->T() + node->d()->T()) / pow(sys.step(), 2);
|
double ty = (node->u()->T() - 2 * node->T() + node->d()->T()) / pow(sys.step(), 2);
|
||||||
double t = delta * (tx + ty) + node->T();
|
double t = delta * (tx + ty) * sys.a1()/pow(sys.step(), 2) + node->T();
|
||||||
node->SetT(t);
|
node->SetT(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user