Commit e4ef3df6 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Changing the interface for the right hand side of the PDE solvers.

parent de4c99d8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
TODO: napsat FunctionDiscretizer pro jednotne rozhrani RightHandSide

TODO: doladit vse s CUDA
TODO: doplnit mesh travelsals pro jine mesh entity nez cell
TODO: implementovat tnlProblem
TODO: implementace maticovych resicu
      * Gaussova eliminace
      * SOR metoda
+0 −2
Original line number Diff line number Diff line
@@ -27,11 +27,9 @@ dist: $(DIST)

install: $(TARGET)
	cp $(TARGET) $(INSTALL_DIR)/bin
	cp $(CONFIG_FILE) $(INSTALL_DIR)/share/tnl-0.1/examples/heat-equation

uninstall: $(TARGET)
	rm -f $(INSTALL_DIR)/bin/$(TARGET) 
	rm -f $(CONFIG_FILE) $(INSTALL_DIR)/share/tnl-0.1/examples/heat-equation

$(TARGET): $(OBJECTS)
	$(CXX) -o $(TARGET) $(OBJECTS) $(LD_FLAGS)
+10 −7
Original line number Diff line number Diff line
@@ -116,7 +116,8 @@ class tnlExplicitUpdater
                                                                               index,
                                                                               userData.u,
                                                                               userData.time );
               userData.fu[ index ] += userData.rightHandSide.getValue( mesh.getEntityCenter< EntityDimensions >( index ),
               userData.fu[ index ] += userData.rightHandSide.getValue( mesh,
                                                                        index,
                                                                        userData.time );
            }

@@ -206,7 +207,9 @@ class tnlExplicitUpdater< tnlGrid< Dimensions, Real, Device, Index >,
                                                                              userData.u,
                                                                              userData.time );

               userData.fu[ index ] += userData.rightHandSide.getValue( mesh.template getCellCenter< VertexType >( coordinates ),
               userData.fu[ index ] += userData.rightHandSide.getValue( mesh,
                                                                        index,
                                                                        coordinates,
                                                                        userData.time );
            }

+5 −2
Original line number Diff line number Diff line
@@ -151,7 +151,8 @@ class tnlLinearSystemAssembler
                             const IndexType index )
         {
            userData.b[ index ] = userData.u[ index ] +
                                  userData.tau * userData.rightHandSide.getValue( mesh.getEntityCenter< EntityDimensions >( index ),
                                  userData.tau * userData.rightHandSide.getValue( mesh,
                                                                                  index,
                                                                                  userData.time );
            typename MatrixType::IndexType rowLength;
            userData.differentialOperator.updateLinearSystem( userData.time,
@@ -258,7 +259,9 @@ class tnlLinearSystemAssembler< tnlGrid< Dimensions, Real, Device, Index >,
         {
            typedef typename MeshType::VertexType VertexType;
            userData.b[ index ] = userData.u[ index ] +
                                  userData.tau * userData.rightHandSide.template getValue< VertexType >( mesh.template getCellCenter< VertexType >( index ),
                                  userData.tau * userData.rightHandSide.template getValue< VertexType >( mesh,
                                                                                                         index,
                                                                                                         coordinates,
                                                                                                         userData.time );
            typename MatrixType::IndexType rowLength;
            userData.differentialOperator.updateLinearSystem( userData.time,