Commit 9f44ea1d authored by Matouš Fencl's avatar Matouš Fencl Committed by Tomáš Oberhuber

Change of int to IndexType and preparations for OpenMPI.

parent 552e90c4
......@@ -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,
......
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