Commit 2a2655d6 authored by Kirill Terekhov's avatar Kirill Terekhov

fix to adfvdiscr example

parent b802fb8f
Pipeline #141 failed with stages
in 8 minutes and 41 seconds
......@@ -114,24 +114,7 @@ int main(int argc,char ** argv)
tag_K[*cell][0] = 1.0; // Store the tensor K value into the tag
}
if( m->HaveTag("FORCE") )
{
tag_F = m->GetTag("FORCE");
makerefsol = false;
std::cout << "Force from grid" << std::endl;
}
else
{
std::cout << "Set rhs" << std::endl;
tag_F = m->CreateTag("FORCE",DATA_REAL,CELL,NONE,1); // Create a new tag for external force
double x[3];
for( Mesh::iteratorCell cell = m->BeginCell(); cell != m->EndCell(); ++cell ) // Loop over mesh cells
{
cell->Centroid(x);
tag_F[*cell] = -func_rhs(x,1);
//tag_F[*cell] = -cell->Mean(func_rhs,1);
}
}
if( m->HaveTag("BOUNDARY_CONDITION") )
{
......@@ -154,6 +137,25 @@ int main(int argc,char ** argv)
}
}
if( m->HaveTag("FORCE") )
{
tag_F = m->GetTag("FORCE");
makerefsol = false;
std::cout << "Force from grid" << std::endl;
}
else if( makerefsol )
{
std::cout << "Set rhs" << std::endl;
tag_F = m->CreateTag("FORCE",DATA_REAL,CELL,NONE,1); // Create a new tag for external force
double x[3];
for( Mesh::iteratorCell cell = m->BeginCell(); cell != m->EndCell(); ++cell ) // Loop over mesh cells
{
cell->Centroid(x);
tag_F[*cell] = -func_rhs(x,1);
//tag_F[*cell] = -cell->Mean(func_rhs,1);
}
}
if(m->HaveTag("REFERENCE_SOLUTION") )
phi_ref = m->GetTag("REFERENCE_SOLUTION");
else if( makerefsol )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment