Skip to content
Snippets Groups Projects
Commit 26e17892 authored by Matouš Fencl's avatar Matouš Fencl Committed by Tomáš Oberhuber
Browse files

Change of int to IndexType and preparations for OpenMPI.

parent b387127c
No related branches found
No related tags found
1 merge request!27Hamilton jacobi
......@@ -25,6 +25,8 @@
#include <solvers/pde/tnlLinearSystemAssembler.h>
#include <functions/tnlMeshFunction.h>
#include <TNL/Meshes/DistributedMeshes/DistributedGridIO.h>
template< typename Mesh,
typename DifferentialOperator,
typename BoundaryCondition,
......
......@@ -123,12 +123,24 @@ setInitialCondition( const Config::ParameterContainer& parameters,
{
this->bindDofs( mesh, dofs );
const String& initialConditionFile = parameters.getParameter< String >( "initial-condition" );
if( ! this->solution.boundLoad( initialConditionFile ) )
if(CommunicatorType::isDistributed())
{
std::cerr << "I am not able to load the initial condition from the file " << initialConditionFile << "." <<std::endl;
return false;
std::cout<<"Nodes Distribution: " << uPointer->getMesh().getDistributedMesh()->printProcessDistr() << std::endl;
if(distributedIOType==Meshes::DistributedMeshes::MpiIO)
Meshes::DistributedMeshes::DistributedGridIO<MeshFunctionType,Meshes::DistributedMeshes::MpiIO> ::load(initialConditionFile, *uPointer );
if(distributedIOType==Meshes::DistributedMeshes::LocalCopy)
Meshes::DistributedMeshes::DistributedGridIO<MeshFunctionType,Meshes::DistributedMeshes::LocalCopy> ::load(initialConditionFile, *uPointer );
uPointer->template synchronize<CommunicatorType>();
}
return true;
else
{
if( ! this->solution.boundLoad( initialConditionFile ) )
{
std::cerr << "I am not able to load the initial condition from the file " << initialConditionFile << "." <<std::endl;
return false;
}
}
return true;
}
template< typename Mesh,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment